Skip to content

Comments

Users/kosta/workarounds for tech debt 251#252

Closed
KostaIlic2 wants to merge 17 commits intoni:mainfrom
KostaIlic2:users/kosta/workarounds-for-tech-debt-251
Closed

Users/kosta/workarounds for tech debt 251#252
KostaIlic2 wants to merge 17 commits intoni:mainfrom
KostaIlic2:users/kosta/workarounds-for-tech-debt-251

Conversation

@KostaIlic2
Copy link
Contributor

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.

KostaIlic2 and others added 17 commits December 18, 2025 21:02
- 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.
@KostaIlic2 KostaIlic2 closed this Jan 10, 2026
@KostaIlic2
Copy link
Contributor Author

I don't want to spend more time on this - I don't think it's worth it.

@KostaIlic2 KostaIlic2 deleted the users/kosta/workarounds-for-tech-debt-251 branch January 10, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant