Skip to content

Add TimeDeltaArray to bintime#160

Merged
jfriedri-ni merged 70 commits intomainfrom
users/jfriedri/ab3137071-add-bintime-array-wrappers
Aug 8, 2025
Merged

Add TimeDeltaArray to bintime#160
jfriedri-ni merged 70 commits intomainfrom
users/jfriedri/ab3137071-add-bintime-array-wrappers

Conversation

@jfriedri-ni
Copy link
Copy Markdown
Collaborator

@jfriedri-ni jfriedri-ni commented Jul 24, 2025

What does this Pull Request accomplish?

  • Adds new class TimeDeltaArray to nitypes.bintime
  • Adds unit tests and a benchmark test for the constructor

Why should this Pull Request be merged?

  • AB#3137071
  • Support irregular timing with NI-BTF timestamps

What testing has been done?

  • See tests/unit/bintime/test_timedelta_array.py
  • See tests/benchmark/bintime/test_timedelta_array.py

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 24, 2025

Test Results

    44 files  ±    0      44 suites  ±0   25m 6s ⏱️ + 5m 46s
 2 004 tests +  264   2 004 ✅ +  264  0 💤 ±0  0 ❌ ±0 
45 460 runs  +6 064  45 460 ✅ +6 064  0 💤 ±0  0 ❌ ±0 

Results for commit 157d3e4. ± Comparison against base commit 36eee3c.

♻️ This comment has been updated with latest results.

@jfriedri-ni jfriedri-ni requested a review from bkeryan July 24, 2025 21:14
Copy link
Copy Markdown
Collaborator Author

@jfriedri-ni jfriedri-ni left a comment

Choose a reason for hiding this comment

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

This sketch is a basic TimeDeltaArray class with tests for its constructor.

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator Author

@jfriedri-ni jfriedri-ni left a comment

Choose a reason for hiding this comment

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

One behavior decision to make below.

@jfriedri-ni jfriedri-ni requested a review from bkeryan August 6, 2025 22:42
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
…ices

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Raise when trying to grow the array

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
- replace and remove when assigning fewer values than the slice
- replace and insert when assigning more values than the slice
- replace directly when assigning same number of values as the slice

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@jfriedri-ni jfriedri-ni requested a review from bkeryan August 7, 2025 22:27
Copy link
Copy Markdown
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

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@jfriedri-ni jfriedri-ni merged commit f0a8889 into main Aug 8, 2025
28 checks passed
@jfriedri-ni jfriedri-ni deleted the users/jfriedri/ab3137071-add-bintime-array-wrappers branch August 8, 2025 15:40
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.

3 participants