Fix TestResult and Step parameter ordering to make "name" required.#118
Merged
mjohanse-emr merged 4 commits intomainfrom Feb 25, 2026
Merged
Fix TestResult and Step parameter ordering to make "name" required.#118mjohanse-emr merged 4 commits intomainfrom
mjohanse-emr merged 4 commits intomainfrom
Conversation
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #103 by reordering parameters in the TestResult and Step classes to make the name parameter required instead of optional. The change moves name before the * in the parameter lists, forcing callers to provide it as a positional argument, which aligns the Python API with the proto file specifications where name is a required field.
Changes:
- Moved
nameparameter before*inTestResultandStepclass constructors to make it required - Updated all callers (tests, examples, notebooks, and documentation) to pass
nameas the first parameter - Updated docstrings to reflect the new parameter ordering
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ni/datastore/data/_types/_test_result.py | Moved name parameter before * in __init__, updated docstring, updated from_protobuf method, and adjusted initialization order |
| src/ni/datastore/data/_types/_step.py | Moved name parameter before * in __init__, updated docstring, updated from_protobuf method, and adjusted initialization order |
| tests/unit/data/test_create_metadata.py | Updated test cases to pass name as first parameter for both Step and TestResult |
| tests/acceptance/test_publish_with_metadata.py | Updated test cases to pass name as first parameter for both Step and TestResult |
| examples/notebooks/voltage-regulator/publish_waveforms.ipynb | Updated TestResult instantiation to pass name first; includes unintentional kernel metadata changes |
| examples/notebooks/query/publish_sample_data.ipynb | Updated three TestResult instantiations to pass name first; includes unintentional kernel metadata changes |
| docs/reference/using-measurement-data-services.md | Updated documentation examples to show name as the first parameter for both TestResult and Step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dixonjoel
approved these changes
Feb 25, 2026
csjall
approved these changes
Feb 25, 2026
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request accomplish?
Re-order the parameters to the
TestResultandStepso thatnameappears as a required parameter before the*in the parameter list.Update all callers to put name first. This includes fixing tests and examples.
Why should this Pull Request be merged?
Fixes #103
What testing has been done?
I ran all the unit and acceptance tests.
I ran all the jupyter notebooks and examples