Skip to content

Add Metadata V1 deletion APIs and Data V2 pagination - #204

Merged
priya-ni merged 7 commits into
mainfrom
users/pgopal/update-python-grpc-client
Nov 20, 2026
Merged

priya-ni merged 7 commits into
mainfrom
users/pgopal/update-python-grpc-client

Conversation

@priya-ni

@priya-ni priya-ni commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What does this Pull Request accomplish?

  • Adds single and batch Metadata V1 deletion methods, with tests and documentation.
  • Adds Data V2 pagination parameters and next_page_token support while retaining next_link as a compatibility alias.
  • Adds Measurement keyword support to match the pinned Data V2 proto.
  • Temporarily pins the Metadata V1 client/proto and Data V2 proto to upstream commit 72f6068c27af07ba8dcf3e2b2f71e4f6838ffe22.

Why should this Pull Request be merged?

It brings the high-level client in line with the merged upstream deletion APIs and Data V2 pagination contract. The Git pins are temporary until the corresponding packages are published to PyPI; then they can be replaced with version constraints.

What testing has been done?

  • pytest tests/unit -q: 485 passed
  • Black formatting check passed
  • Mypy passed
  • Editor diagnostics and git diff --check passed

@priya-ni priya-ni changed the title Update has_children functionality Add Metadata V1 deletion APIs and Data V2 pagination Nov 19, 2026
@priya-ni

Copy link
Copy Markdown
Contributor Author

The dependency pins are temporary while the updated packages are being published. Once the packages are publicly available on PyPI, I’ll update pyproject.toml to use the published versions and regenerate poetry.lock.

The publish workflows for the pinned upstream commit are:

@priya-ni
priya-ni marked this pull request as ready for review November 19, 2026 08:57
@priya-ni
priya-ni requested a review from a team as a code owner November 19, 2026 08:57
@priya-ni
priya-ni requested review from kaviarasu-ni and a balanced review from Copilot November 19, 2026 08:57

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.

🟡 Changes recommended

Git-based dependencies block PyPI and TestPyPI uploads, while passing a bare string to batch_delete_aliases can delete unrelated alias registrations.

2 open issues
What changed in this PR

This PR aligns the high-level Python datastore client with upstream Metadata V1 deletion APIs and Data V2 pagination contracts.

Changes:

  • Adds single-item and batch metadata deletion methods, tests, and documentation.
  • Adds pagination tokens while retaining next_link as an alias, plus measurement keywords and output-only step child indicators.
  • Temporarily pins three upstream client/proto dependencies to a specific Git commit.
File Description
tests/​unit/​metadata/​test_delete_metadata.py Tests deletion request forwarding and force options.
tests/​unit/​data/​test_v2_types.py Tests keywords, child indicators, and field mappings.
tests/​unit/​data/​test_v2_data_store_client.py Tests pagination parameters, tokens, and read masks.
src/​ni/​datastore/​metadata/​_metadata_store_client.py Adds single-item and batch deletion wrappers.
src/​ni/​datastore/​data/​v2/​_types/​_step.py Adds output-only has_children support.
src/​ni/​datastore/​data/​v2/​_types/​_read_fields.py Adds child-indicator and keyword read fields.
src/​ni/​datastore/​data/​v2/​_types/​_query_results.py Adds continuation tokens with a legacy alias.
src/​ni/​datastore/​data/​v2/​_types/​_measurement.py Adds measurement keyword storage and conversion.
src/​ni/​datastore/​data/​v2/​_types/​_create.py Adds typed measurement keyword creation input.
src/​ni/​datastore/​data/​v2/​_data_store_client.py Forwards pagination parameters and returns tokens.
pyproject.toml Pins upstream dependencies to a Git commit.
poetry.lock Records updated dependency versions and Git sources.
docs/​reference/​ni-metadata-store.md Documents deletion APIs and force behavior.
docs/​reference/​ni-data-store-v2.md Documents pagination, keywords, and child indicators.

Review effort: Balanced

Comment thread pyproject.toml Resolved
Comment thread docs/reference/ni-metadata-store.md Resolved
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Comment thread poetry.lock Resolved
@mjohanse-emr

Copy link
Copy Markdown
Contributor

The dependency pins are temporary while the updated packages are being published. Once the packages are publicly available on PyPI, I’ll update pyproject.toml to use the published versions and regenerate poetry.lock.

The publish workflows for the pinned upstream commit are:

@priya-ni I got all the ni-apis-python packages published and updated this PR to use those published packages.

Comment thread tests/unit/data/test_v2_types.py Resolved
@priya-ni
priya-ni merged commit fed445b into main Nov 20, 2026
35 checks passed
@priya-ni
priya-ni deleted the users/pgopal/update-python-grpc-client branch November 20, 2026 06:57
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