Skip to content

Address additional feedback on the refactoring of stream_readers and stream_writers#825

Merged
mikeprosserni merged 5 commits intomasterfrom
users/mprosser/stream-file-cleanup-feedback
Sep 8, 2025
Merged

Address additional feedback on the refactoring of stream_readers and stream_writers#825
mikeprosserni merged 5 commits intomasterfrom
users/mprosser/stream-file-cleanup-feedback

Conversation

@mikeprosserni
Copy link
Contributor

@mikeprosserni mikeprosserni commented Sep 8, 2025

  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • Make the stream_reader and stream_writer modules private (like the task submodules)
  • Fix test folder structure to parallel the production code
  • Fix AUTO_START_UNSET compatibility breakage
  • Change relative imports to absolute imports

Why should this Pull Request be merged?

Addressing these comments:
#819 (comment)
#816 (comment)
#816 (comment)
#819 (comment)

What testing has been done?

Ran all autotests

Testing the import of AUTO_START_UNSET:

PS C:\dev\fireserp\nidaqmx-python> C:/dev/fireserp/nidaqmx-python/.venv/Scripts/python.exe -c "from nidaqmx.stream_writers import AUTO_START_UNSET; print('SUCCESS: AUTO_START_UNSET import works!'); print(f'AUTO_START_UNSET: {AUTO_START_UNSET}'); print(f'Type: {type(AUTO_START_UNSET)}')"
SUCCESS: AUTO_START_UNSET import works!
AUTO_START_UNSET: <nidaqmx.stream_writers._channel_writer_base.UnsetAutoStartSentinel object at 0x0000024392016790>
Type: <class 'nidaqmx.stream_writers._channel_writer_base.UnsetAutoStartSentinel'>

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

Test Results

    38 files  ±0      38 suites  ±0   59m 30s ⏱️ - 4m 18s
 2 675 tests ±0   2 232 ✅ ±0    443 💤 ±0  0 ❌ ±0 
47 382 runs  ±0  40 226 ✅ ±0  7 156 💤 ±0  0 ❌ ±0 

Results for commit 51d9f1a. ± Comparison against base commit 397c22b.

This pull request removes 296 and adds 296 tests. Note that renamed tests count towards both.
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[library_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample___returns_valid_samples[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample___returns_valid_samples[library_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample_with_wrong_dtype___raises_error_with_correct_dtype[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample_with_wrong_dtype___raises_error_with_correct_dtype[library_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample___returns_valid_samples[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample___returns_valid_samples[library_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample_with_wrong_dtype___raises_error_with_correct_dtype[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample_with_wrong_dtype___raises_error_with_correct_dtype[library_init_kwargs]
…
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[library_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample___returns_valid_samples[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample___returns_valid_samples[library_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample_with_wrong_dtype___raises_error_with_correct_dtype[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_many_sample_with_wrong_dtype___raises_error_with_correct_dtype[library_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample___returns_valid_samples[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample___returns_valid_samples[library_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample_with_wrong_dtype___raises_error_with_correct_dtype[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_one_sample_with_wrong_dtype___raises_error_with_correct_dtype[library_init_kwargs]
…
This pull request removes 80 skipped tests and adds 80 skipped tests. Note that renamed tests count towards both.
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms___returns_valid_waveforms[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms_in_place___populates_valid_waveforms[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms_no_args___returns_valid_waveforms[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_with_wrong_number_of_waveforms___throws_exception[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_both_flags___read_waveforms___includes_both_timing_and_extended_properties[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_extended_properties_flag___read_waveforms___only_includes_extended_properties[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_none_flag___read_waveforms___minimal_waveform_data[grpc_init_kwargs]
tests.component.readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_timing_flag___read_waveforms___only_includes_timing_data[grpc_init_kwargs]
tests.component.readers.test_analog_single_channel_reader ‑ test___analog_single_channel_reader___read_into_undersized_waveform___throws_exception[grpc_init_kwargs]
…
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_into_undersized_waveforms___throws_exception[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms___returns_valid_waveforms[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms_in_place___populates_valid_waveforms[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_waveforms_no_args___returns_valid_waveforms[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader___read_with_wrong_number_of_waveforms___throws_exception[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_both_flags___read_waveforms___includes_both_timing_and_extended_properties[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_extended_properties_flag___read_waveforms___only_includes_extended_properties[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_none_flag___read_waveforms___minimal_waveform_data[grpc_init_kwargs]
tests.component.stream_readers.test_analog_multi_channel_reader ‑ test___analog_multi_channel_reader_with_timing_flag___read_waveforms___only_includes_timing_data[grpc_init_kwargs]
tests.component.stream_readers.test_analog_single_channel_reader ‑ test___analog_single_channel_reader___read_into_undersized_waveform___throws_exception[grpc_init_kwargs]
…

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions

@mikeprosserni mikeprosserni merged commit faf34c9 into master Sep 8, 2025
27 checks passed
@mikeprosserni mikeprosserni deleted the users/mprosser/stream-file-cleanup-feedback branch September 8, 2025 20:36
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.

stream_readers/writers submodules should be private stream_writers refactor broke compatibility with AUTO_START_UNSET and UnsetAutoStartSentinel

3 participants