Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make testmonitor step examples show up in docs and fix update_results example #120

Merged
merged 2 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Create, update, query, and delete steps

.. literalinclude:: ../examples/testmonitor/steps.py
:language: python
:linenos
:linenos:

Notebook API
-------
Expand Down
10 changes: 7 additions & 3 deletions examples/testmonitor/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
ResultField,
Status,
StatusType,
UpdateResultRequest,
)

program_name = "Example Name"
Expand Down Expand Up @@ -70,9 +71,12 @@ def create_some_results():

# Update the first result that you just created and replace the keywords
updated_result = create_response.results[0]
updated_result.keywords = ["new keyword"]
updated_result.properties = {"new property key": "new value"}
update_response = client.update_results([create_response.results[0]], replace=True)
updated_result = UpdateResultRequest(
id=create_response.results[0].id,
keywords=["new keyword"],
properties={"new property key": "new value"},
)
update_response = client.update_results([updated_result], replace=True)

# Query for just the ids of results that match the family
values_query = QueryResultValuesRequest(
Expand Down