Skip to content

Commit 0eb4e58

Browse files
authored
Merge pull request #749 from CitrineInformatics/update_documentation
Update basic_functionality.rst
2 parents b622411 + 671dc19 commit 0eb4e58

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

docs/source/getting_started/basic_functionality.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,41 @@ The database may decorate the object with additional information, such as a uniq
3939

4040
.. _functionality_reading_label:
4141

42+
Controlling Flow
43+
----------------
44+
45+
It is often useful to know when a resource has completed validating, especially when subsequent lines of code involve the validated resource. The ``wait_while_validating`` function will pause execution of the script until the resource has successfully validated.
46+
47+
.. code-block:: python
48+
49+
sintering_model = sintering_project.predictors.register(sintering_model)
50+
wait_while_validating(collection=sintering_project.predictors, module=sintering_model)
51+
52+
Similarly, the ``wait_while_executing`` function will wait for a design or performance evaluation workflow to complete executing.
53+
54+
.. code-block:: python
55+
56+
pew_workflow = sintering_project.predictor_evaluation_workflows.register(pew_workflow)
57+
pew_workflow = wait_while_validating(collection=sintering_project.predictor_evaluation_workflows, module=pew_workflow)
58+
pew_ex = pew_workflow.trigger(sintering_model)
59+
wait_while_executing(collection=sintering_project.predictor_evaluation_executions, execution=pew_ex, print_status_info=True)
60+
61+
Checking Status
62+
---------------
63+
64+
After registering an asset, the ``status`` command can be used to obtain a static readout of the state of the asset on the platform (e.g., VALID, INVALID, VALIDATING, SUCCEEDED, FAILED, INPROGRESS).
65+
66+
.. code-block:: python
67+
68+
sintering_model = sintering_project.predictors.register(sintering_model)
69+
sintering_model.status
70+
71+
The ``status_info`` command returns additional details about an asset's status that can be very useful for debugging.
72+
73+
.. code-block:: python
74+
75+
sintering_model.status_info
76+
4277
Reading
4378
-------
4479

src/citrine/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.30.2'
1+
__version__ = '1.30.3'

0 commit comments

Comments
 (0)