Skip to content

Update ni.protobuf.types dependency and corresponding code changes#137

Merged
dixonjoel merged 7 commits into
mainfrom
users/jdixon/update-ni-protobuf-types
Jun 12, 2026
Merged

Update ni.protobuf.types dependency and corresponding code changes#137
dixonjoel merged 7 commits into
mainfrom
users/jdixon/update-ni-protobuf-types

Conversation

@dixonjoel

@dixonjoel dixonjoel commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What does this Pull Request accomplish?

AB#3877568

Bubbling up changes from ni.protobuf.types to datastore-python.

Why should this Pull Request be merged?

This brings in changes from ni.protobuf.types. Prior to this, I published a new version of that package to be consumed here.

What testing has been done?

I did this in stages, i.e. make the expected code changes, see that there were several failing tests (11) with the change. Then I updated the ni.protobuf.types version and make more changes to the expected waveforms in several tests until they passed locally.

…abilities, and get tests passing by adding timing and scale mode information where needed.
@dixonjoel dixonjoel marked this pull request as ready for review June 10, 2026 18:21
@dixonjoel dixonjoel requested a review from csjall as a code owner June 10, 2026 18:21
Copilot AI review requested due to automatic review settings June 10, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ni-protobuf-types dependency to a newer prerelease and updates datastore-python code/tests to match the updated nitypes/protobuf waveform shapes (notably timing/scale metadata expectations).

Changes:

  • Bump ni-protobuf-types to >=1.2.0dev1 (prerelease) and refresh poetry.lock accordingly.
  • Update multiple acceptance tests to construct expected waveforms with explicit Timing(...) (and NoneScaleMode() where applicable).
  • Adjust gRPC conversion logic to pass iterables directly into nitypes.Vector(...) rather than materializing into lists.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/acceptance/test_publish_with_metadata.py Updates expected AnalogWaveform construction to include new timing/scale metadata.
tests/acceptance/test_publish_measurement_batch_and_read_data.py Updates expected batch AnalogWaveform values to include timing/scale metadata.
tests/acceptance/test_publish_measurement_and_read_data.py Updates expected waveform values to include timing metadata (and adjusts imports).
src/ni/datastore/data/_grpc_conversion.py Updates iterable→Vector conversion behavior for condition/measurement batch publishing.
pyproject.toml Bumps ni-protobuf-types requirement to a newer prerelease and allows prereleases.
poetry.lock Locks updated dependency versions and metadata after the dependency bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/acceptance/test_publish_measurement_and_read_data.py
Comment thread src/ni/datastore/data/_grpc_conversion.py Outdated
@dixonjoel dixonjoel changed the title Update ni.protobuf.types dependency, update code to match the new cap… Update ni.protobuf.types dependency and corresponding code changes Jun 10, 2026
Comment thread src/ni/datastore/data/_grpc_conversion.py
Comment thread pyproject.toml
Comment thread tests/acceptance/test_publish_with_metadata.py

@mjohanse-emr mjohanse-emr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll defer to Hunter on the _grpc_conversion changes. The test changes look good to me, though.

Comment thread tests/unit/data/test_grpc_conversion.py

@hunter-ni hunter-ni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve with Suggestions

Comment thread tests/unit/data/test_grpc_conversion.py
@dixonjoel dixonjoel merged commit 2640371 into main Jun 12, 2026
29 checks passed
@dixonjoel dixonjoel deleted the users/jdixon/update-ni-protobuf-types branch June 12, 2026 17:12
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.

6 participants