Skip to content

Conversation

@bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Apr 25, 2025

What does this Pull Request accomplish?

Add AnalogWaveform.append(), which accepts:

  • A np.ndarray, AnalogWaveform, or a sequence of AnalogWaveforms
  • An optional sequence of irregular timestamps

Add AnalogWaveform._base_timing, to enable internal-only polymorphic timing access.

Add BaseTiming._append_timing, which appends irregular timestamps. This class is still immutable.

Add a _sample_interval subpackage defining the SampleIntervalMode enum and new SampleIntervalStrategy classes.

Why should this Pull Request be merged?

Closes AB#3082119 - Add waveform appending

What testing has been done?

Ran unit tests
Used test coverage to guide error testing

@bkeryan bkeryan requested a review from csjall as a code owner April 25, 2025 01:26
csjall
csjall previously requested changes Apr 25, 2025
@csjall csjall requested a review from jfriedri-ni April 25, 2025 21:07
@bkeryan bkeryan force-pushed the users/bkeryan/append-waveform branch from 53aaf60 to 6934f10 Compare April 26, 2025 16:00
@bkeryan bkeryan changed the base branch from users/bkeryan/refactor-error-messages to main April 26, 2025 16:01
@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2025

Test Results

   10 files  ±  0     10 suites  ±0   22s ⏱️ +4s
  350 tests + 82    344 ✅ + 81   6 💤 + 1  0 ❌ ±0 
3 500 runs  +820  3 440 ✅ +810  60 💤 +10  0 ❌ ±0 

Results for commit b54f0a1. ± Comparison against base commit f33ea2f.

This pull request removes 2 and adds 84 tests. Note that renamed tests count towards both.
tests.unit.waveform._timing.test_precision ‑ test___timestamps___create_with_irregular_interval___creates_waveform_timing_with_timestamps
tests.unit.waveform._timing.test_standard ‑ test___timestamps___create_with_irregular_interval___creates_waveform_timing_with_timestamps
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets0-right_offsets0]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets1-right_offsets1]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets2-right_offsets2]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets3-right_offsets3]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets4-right_offsets4]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets5-right_offsets5]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets6-right_offsets6]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets7-right_offsets7]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets8-right_offsets8]
tests.unit.waveform._timing.test_precision ‑ test___monotonic_timestamps___append_timing___appends_timestamps[left_offsets9-right_offsets9]
…

♻️ This comment has been updated with latest results.

@bkeryan bkeryan force-pushed the users/bkeryan/append-waveform branch from 3caa239 to 18a9000 Compare April 26, 2025 16:30
@bkeryan bkeryan changed the title nitypes: Implement append waveform waveform: Implement append Apr 28, 2025
@bkeryan bkeryan force-pushed the users/bkeryan/append-waveform branch from bead0e1 to 2d6664c Compare April 28, 2025 23:48
@bkeryan bkeryan requested review from csjall and jfriedri-ni April 29, 2025 20:54
@bkeryan bkeryan dismissed csjall’s stale review April 29, 2025 21:40

@csjall is OOO, attending the NI Connect conference. I have addressed his feedback and @jfriedri-ni has approved these changes.

@bkeryan bkeryan merged commit 0d515bc into main Apr 29, 2025
13 checks passed
@bkeryan bkeryan deleted the users/bkeryan/append-waveform branch April 29, 2025 21:41
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.

4 participants