Users/kosta/workarounds for tech debt 251#252
Closed
KostaIlic2 wants to merge 17 commits intoni:mainfrom
Closed
Conversation
- Add doctest step to run_unit_tests.yml workflow - Fix DigitalWaveformFailure doctest: remove column_index field that no longer exists in API - Fix _mask_to_column_indices doctest: add missing bitorder parameter This ensures doctests are run as part of CI to catch future API/documentation mismatches. Signed-off-by: Kosta Ilic <kosta.ilic@emerson.com>
With only 6 tests taking ~0.1s to run, acceptance tests provide valuable integration testing coverage for memory-mapping functionality across all OS/Python combinations with minimal CI overhead. Signed-off-by: Kosta Ilic <kosta.ilic@emerson.com>
… same effect in a simpler manner that reduces duplication. Co-authored-by: Brad Keryan <brad.keryan@ni.com>
- Remove __doctest_requires__ statements that cause pytest-doctestplus 1.6.0 to skip tests - Update pytest dependencies to match CI environment - All 22 doctests now pass without skips Signed-off-by: Kosta Ilic <kosta.ilic@emerson.com>
These statements are needed because the doctests actually use NumPy 2.0 features like np.long and np.ulong. The pytest-doctestplus 1.6.0 version has a bug where it doesn't properly parse version requirements, but the requirements themselves are legitimate and necessary.
This workaround addresses pytest-doctestplus 1.6.0 bug that doesn't properly parse version requirements like 'numpy>=2.0'. The inline checks skip doctests that use NumPy 2.0 features (np.long, np.ulong) when running with older NumPy. - Remove __doctest_requires__ statements that were causing pytest failures - Add inline version checks in doctests that use NumPy 2.0 features - Include comprehensive comments explaining the workaround and maintenance notes - This is a temporary solution until pytest-doctestplus is fixed or NumPy < 2.0 support is dropped
Break long comment lines to stay within 100 character limit while preserving meaning and readability.
- Break long comment lines about formatting differences into multiple lines - Split long pytest.skip lines using intermediate variable - Fix doctest syntax errors from line continuation All lines now under 100 character limit while maintaining functionality
Applied black formatting to resolve BLK100 styleguide issue in complex module. Signed-off-by: Kosta Ilic <kosta.ilic@emerson.com>
- Replace inline doctest version checks with module-level pytest.skip in complex module - Remove setup code from docstrings to provide clean user-facing documentation - Maintain doctest functionality while hiding implementation details from generated HTML docs - All 22 doctests continue to pass with NumPy 2.0 compatibility maintained
- Change single quotes to double quotes in version check for Black compliance
- Revert to inline doctest version checks to avoid interfering with module imports - Module-level pytest.skip was causing import failures in CI with older NumPy versions - Maintain clean documentation while preserving import functionality
- Remove trailing spaces from doctest skip comment - Split long version check line to stay under 100 character limit
- Replace __doctest_requires__ with inline version checks in _arguments.py and complex module - pytest-doctestplus 1.6.0: treated 'numpy>=2.0' as literal module name - pytest-doctestplus 1.7.0: has execution pipeline bugs causing incorrect skipping - Inline checks work reliably across CI matrix with different NumPy versions - All doctests now pass locally with NumPy 2.3.4 and will skip correctly with NumPy < 2.0
- Break long comment lines to stay under 100 character limit - Fixes CI linting errors in _arguments.py
Signed-off-by: Kosta Ilic <kosta.ilic@emerson.com>
Replace inline pytest.skip version checks with __doctest_requires__ directive for cleaner and more maintainable doctest configuration.
Contributor
Author
|
I don't want to spend more time on this - I don't think it's worth it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request accomplish?
Workaround for incorrectly skipped documentation tests described in #251. At this point, this draft PR is for COMMUNICATION purposes only.
Why should this Pull Request be merged?
I recommend that we DO NOT merge this PR.
What testing has been done?
Automated testing and checking from the PR. Manual review of skipped tests.