Skip to content

Commit dacfdfb

Browse files
authored
fix: make testmonitor step examples show up in docs and fix update_results example (#120)
1 parent 01af009 commit dacfdfb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/getting_started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Create, update, query, and delete steps
286286

287287
.. literalinclude:: ../examples/testmonitor/steps.py
288288
:language: python
289-
:linenos
289+
:linenos:
290290

291291
Notebook API
292292
-------

examples/testmonitor/results.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
ResultField,
77
Status,
88
StatusType,
9+
UpdateResultRequest,
910
)
1011

1112
program_name = "Example Name"
@@ -70,9 +71,12 @@ def create_some_results():
7071

7172
# Update the first result that you just created and replace the keywords
7273
updated_result = create_response.results[0]
73-
updated_result.keywords = ["new keyword"]
74-
updated_result.properties = {"new property key": "new value"}
75-
update_response = client.update_results([create_response.results[0]], replace=True)
74+
updated_result = UpdateResultRequest(
75+
id=create_response.results[0].id,
76+
keywords=["new keyword"],
77+
properties={"new property key": "new value"},
78+
)
79+
update_response = client.update_results([updated_result], replace=True)
7680

7781
# Query for just the ids of results that match the family
7882
values_query = QueryResultValuesRequest(

0 commit comments

Comments
 (0)