UncountablePythonSDK 0.0.16__py3-none-any.whl → 0.0.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of UncountablePythonSDK might be problematic. Click here for more details.

Files changed (81) hide show
  1. {UncountablePythonSDK-0.0.16.dist-info → UncountablePythonSDK-0.0.18.dist-info}/METADATA +14 -1
  2. {UncountablePythonSDK-0.0.16.dist-info → UncountablePythonSDK-0.0.18.dist-info}/RECORD +81 -33
  3. {UncountablePythonSDK-0.0.16.dist-info → UncountablePythonSDK-0.0.18.dist-info}/top_level.txt +1 -0
  4. docs/.gitignore +1 -0
  5. docs/conf.py +52 -0
  6. docs/index.md +13 -0
  7. docs/justfile +12 -0
  8. docs/quickstart.md +19 -0
  9. docs/requirements.txt +7 -0
  10. docs/static/favicons/android-chrome-192x192.png +0 -0
  11. docs/static/favicons/android-chrome-512x512.png +0 -0
  12. docs/static/favicons/apple-touch-icon.png +0 -0
  13. docs/static/favicons/browserconfig.xml +9 -0
  14. docs/static/favicons/favicon-16x16.png +0 -0
  15. docs/static/favicons/favicon-32x32.png +0 -0
  16. docs/static/favicons/manifest.json +18 -0
  17. docs/static/favicons/mstile-150x150.png +0 -0
  18. docs/static/favicons/safari-pinned-tab.svg +32 -0
  19. docs/static/logo_blue.png +0 -0
  20. examples/create_entity.py +23 -16
  21. pkgs/argument_parser/_is_enum.py +1 -1
  22. pkgs/argument_parser/argument_parser.py +26 -19
  23. pkgs/serialization/serial_class.py +3 -3
  24. pkgs/serialization_util/_get_type_for_serialization.py +1 -3
  25. pkgs/serialization_util/serialization_helpers.py +1 -3
  26. pkgs/strenum_compat/strenum_compat.py +1 -9
  27. pkgs/type_spec/actions_registry/__init__.py +0 -0
  28. pkgs/type_spec/actions_registry/__main__.py +114 -0
  29. pkgs/type_spec/actions_registry/emit_typescript.py +120 -0
  30. pkgs/type_spec/builder.py +14 -10
  31. pkgs/type_spec/config.py +3 -2
  32. pkgs/type_spec/emit_python.py +54 -17
  33. pkgs/type_spec/emit_typescript.py +8 -9
  34. pkgs/type_spec/emit_typescript_util.py +1 -2
  35. pkgs/type_spec/load_types.py +2 -1
  36. pkgs/type_spec/open_api_util.py +2 -2
  37. pkgs/type_spec/parts/base.py.prepart +2 -1
  38. pkgs/type_spec/util.py +9 -9
  39. pkgs/type_spec/value_spec/__main__.py +2 -2
  40. pkgs/type_spec/value_spec/emit_python.py +1 -0
  41. type_spec/external/api/batch/execute_batch_load_async.yaml +18 -0
  42. type_spec/external/api/chemical/convert_chemical_formats.yaml +33 -0
  43. type_spec/external/api/entity/create_entities.yaml +1 -1
  44. type_spec/external/api/entity/create_entity.yaml +1 -1
  45. type_spec/external/api/id_source/list_id_source.yaml +35 -0
  46. type_spec/external/api/id_source/match_id_source.yaml +32 -0
  47. type_spec/external/api/recipe_links/create_recipe_link.yaml +25 -0
  48. type_spec/external/api/recipes/associate_recipe_as_input.yaml +19 -0
  49. type_spec/external/api/recipes/associate_recipe_as_lot.yaml +19 -0
  50. type_spec/external/api/recipes/create_recipe.yaml +38 -0
  51. type_spec/external/api/recipes/get_recipes_data.yaml +21 -21
  52. type_spec/external/api/recipes/set_recipe_inputs.yaml +6 -0
  53. type_spec/external/api/recipes/set_recipe_metadata.yaml +19 -0
  54. type_spec/external/api/triggers/run_trigger.yaml +18 -0
  55. uncountable/core/client.py +13 -14
  56. uncountable/types/__init__.py +30 -0
  57. uncountable/types/api/batch/execute_batch_load_async.py +35 -0
  58. uncountable/types/api/chemical/__init__.py +1 -0
  59. uncountable/types/api/chemical/convert_chemical_formats.py +50 -0
  60. uncountable/types/api/entity/create_entities.py +1 -1
  61. uncountable/types/api/entity/create_entity.py +1 -1
  62. uncountable/types/api/id_source/__init__.py +1 -0
  63. uncountable/types/api/id_source/list_id_source.py +46 -0
  64. uncountable/types/api/id_source/match_id_source.py +48 -0
  65. uncountable/types/api/recipe_links/__init__.py +1 -0
  66. uncountable/types/api/recipe_links/create_recipe_link.py +39 -0
  67. uncountable/types/api/recipes/associate_recipe_as_input.py +35 -0
  68. uncountable/types/api/recipes/associate_recipe_as_lot.py +36 -0
  69. uncountable/types/api/recipes/create_recipe.py +43 -0
  70. uncountable/types/api/recipes/set_recipe_inputs.py +2 -0
  71. uncountable/types/api/recipes/set_recipe_metadata.py +36 -0
  72. uncountable/types/api/triggers/__init__.py +1 -0
  73. uncountable/types/api/triggers/run_trigger.py +36 -0
  74. uncountable/types/async_batch.py +45 -0
  75. uncountable/types/base.py +2 -1
  76. uncountable/types/chemical_structure.py +27 -0
  77. uncountable/types/client_base.py +404 -2
  78. uncountable/types/id_source.py +49 -0
  79. uncountable/types/identifier.py +54 -0
  80. uncountable/types/recipe_identifiers.py +62 -0
  81. {UncountablePythonSDK-0.0.16.dist-info → UncountablePythonSDK-0.0.18.dist-info}/WHEEL +0 -0
@@ -9,13 +9,20 @@ import typing # noqa: F401
9
9
  import datetime # noqa: F401
10
10
  from decimal import Decimal # noqa: F401
11
11
  from pkgs.serialization import OpaqueKey
12
+ import uncountable.types.api.recipes.associate_recipe_as_input as associate_recipe_as_input_t
13
+ import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe_as_lot_t
14
+ from . import async_batch as async_batch_t
12
15
  from . import base as base_t
16
+ import uncountable.types.api.chemical.convert_chemical_formats as convert_chemical_formats_t
13
17
  import uncountable.types.api.entity.create_entities as create_entities_t
14
18
  import uncountable.types.api.entity.create_entity as create_entity_t
15
19
  import uncountable.types.api.inputs.create_inputs as create_inputs_t
20
+ import uncountable.types.api.recipes.create_recipe as create_recipe_t
21
+ import uncountable.types.api.recipe_links.create_recipe_link as create_recipe_link_t
16
22
  import uncountable.types.api.recipes.create_recipes as create_recipes_t
17
23
  from . import entity as entity_t
18
24
  import uncountable.types.api.batch.execute_batch as execute_batch_t
25
+ import uncountable.types.api.batch.execute_batch_load_async as execute_batch_load_async_t
19
26
  from . import field_values as field_values_t
20
27
  import uncountable.types.api.recipes.get_curve as get_curve_t
21
28
  import uncountable.types.api.entity.get_entities_data as get_entities_data_t
@@ -33,12 +40,20 @@ import uncountable.types.api.recipe_metadata.get_recipe_metadata_data as get_rec
33
40
  import uncountable.types.api.recipes.get_recipe_names as get_recipe_names_t
34
41
  import uncountable.types.api.recipes.get_recipe_output_metadata as get_recipe_output_metadata_t
35
42
  import uncountable.types.api.recipes.get_recipes_data as get_recipes_data_t
43
+ from . import id_source as id_source_t
44
+ from . import identifier as identifier_t
36
45
  import uncountable.types.api.entity.list_entities as list_entities_t
46
+ import uncountable.types.api.id_source.list_id_source as list_id_source_t
47
+ import uncountable.types.api.id_source.match_id_source as match_id_source_t
48
+ from . import recipe_identifiers as recipe_identifiers_t
37
49
  from . import recipe_links as recipe_links_t
50
+ from . import recipe_metadata as recipe_metadata_t
38
51
  import uncountable.types.api.entity.resolve_entity_ids as resolve_entity_ids_t
39
52
  import uncountable.types.api.outputs.resolve_output_conditions as resolve_output_conditions_t
53
+ import uncountable.types.api.triggers.run_trigger as run_trigger_t
40
54
  import uncountable.types.api.inputs.set_input_attribute_values as set_input_attribute_values_t
41
55
  import uncountable.types.api.recipes.set_recipe_inputs as set_recipe_inputs_t
56
+ import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
42
57
  import uncountable.types.api.recipes.set_recipe_outputs as set_recipe_outputs_t
43
58
  import uncountable.types.api.entity.set_values as set_values_t
44
59
  from abc import ABC, abstractmethod
@@ -61,13 +76,81 @@ class ClientMethods(ABC):
61
76
  ...
62
77
 
63
78
 
79
+ def associate_recipe_as_input(
80
+ self,
81
+ *,
82
+ recipe_key: identifier_t.IdentifierKey,
83
+ ) -> associate_recipe_as_input_t.Data:
84
+ """Create or return the input association for a recipe
85
+
86
+ :param recipe_key: Identifier for the recipe
87
+ """
88
+ args = associate_recipe_as_input_t.Arguments(
89
+ recipe_key=recipe_key,
90
+ )
91
+ api_request = APIRequest(
92
+ method=associate_recipe_as_input_t.ENDPOINT_METHOD,
93
+ endpoint=associate_recipe_as_input_t.ENDPOINT_PATH,
94
+ args=args,
95
+ )
96
+ return self.do_request(api_request=api_request, return_type=associate_recipe_as_input_t.Data)
97
+
98
+
99
+ def associate_recipe_as_lot(
100
+ self,
101
+ *,
102
+ recipe_key: identifier_t.IdentifierKey,
103
+ ingredient_key: identifier_t.IdentifierKey,
104
+ ) -> associate_recipe_as_lot_t.Data:
105
+ """Create a new lot association for the provided recipe with the provided ingredient
106
+
107
+ :param recipe_key: Identifier for the recipe
108
+ :param ingredient_key: Identifier for the ingredient
109
+ """
110
+ args = associate_recipe_as_lot_t.Arguments(
111
+ recipe_key=recipe_key,
112
+ ingredient_key=ingredient_key,
113
+ )
114
+ api_request = APIRequest(
115
+ method=associate_recipe_as_lot_t.ENDPOINT_METHOD,
116
+ endpoint=associate_recipe_as_lot_t.ENDPOINT_PATH,
117
+ args=args,
118
+ )
119
+ return self.do_request(api_request=api_request, return_type=associate_recipe_as_lot_t.Data)
120
+
121
+
122
+ def convert_chemical_formats(
123
+ self,
124
+ *,
125
+ source_chemical_structures: list[convert_chemical_formats_t.ChemicalStructureFile],
126
+ ) -> convert_chemical_formats_t.Data:
127
+ """Converts chemical formats, into the format used by Uncountable and usable in other APIs for eg. set_input_attribute_values
128
+
129
+ """
130
+ args = convert_chemical_formats_t.Arguments(
131
+ source_chemical_structures=source_chemical_structures,
132
+ )
133
+ api_request = APIRequest(
134
+ method=convert_chemical_formats_t.ENDPOINT_METHOD,
135
+ endpoint=convert_chemical_formats_t.ENDPOINT_PATH,
136
+ args=args,
137
+ )
138
+ return self.do_request(api_request=api_request, return_type=convert_chemical_formats_t.Data)
139
+
140
+
64
141
  def create_entities(
65
142
  self,
66
143
  *,
67
144
  definition_id: base_t.ObjectId,
68
- entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT]],
145
+ entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS]],
69
146
  entities_to_create: list[create_entities_t.EntityToCreate],
70
147
  ) -> create_entities_t.Data:
148
+ """Creates new Uncountable entities
149
+
150
+ :param definition_id: Definition id for the entities to create
151
+ :param entity_type: The type of the entities to create
152
+ :param entities_to_create: A list of the entities to create
153
+ """
71
154
  args = create_entities_t.Arguments(
72
155
  definition_id=definition_id,
73
156
  entity_type=entity_type,
@@ -85,9 +168,14 @@ class ClientMethods(ABC):
85
168
  self,
86
169
  *,
87
170
  definition_id: base_t.ObjectId,
88
- entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT]],
171
+ entity_type: typing.Union[typing.Literal[entity_t.EntityType.LAB_REQUEST], typing.Literal[entity_t.EntityType.APPROVAL], typing.Literal[entity_t.EntityType.CUSTOM_ENTITY], typing.Literal[entity_t.EntityType.TASK], typing.Literal[entity_t.EntityType.PROJECT], typing.Literal[entity_t.EntityType.EQUIPMENT], typing.Literal[entity_t.EntityType.INV_LOCAL_LOCATIONS]],
89
172
  field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None,
90
173
  ) -> create_entity_t.Data:
174
+ """Creates a new Uncountable entity
175
+
176
+ :param definition_id: Definition id of the entity to create
177
+ :param entity_type: The type of the entities requested
178
+ """
91
179
  args = create_entity_t.Arguments(
92
180
  definition_id=definition_id,
93
181
  entity_type=entity_type,
@@ -106,6 +194,10 @@ class ClientMethods(ABC):
106
194
  *,
107
195
  inputs_to_create: list[create_inputs_t.InputToCreate],
108
196
  ) -> create_inputs_t.Data:
197
+ """Creates new inputs
198
+
199
+ :param inputs_to_create: A list of inputs to create
200
+ """
109
201
  args = create_inputs_t.Arguments(
110
202
  inputs_to_create=inputs_to_create,
111
203
  )
@@ -117,6 +209,73 @@ class ClientMethods(ABC):
117
209
  return self.do_request(api_request=api_request, return_type=create_inputs_t.Data)
118
210
 
119
211
 
212
+ def create_recipe(
213
+ self,
214
+ *,
215
+ material_family_id: base_t.ObjectId,
216
+ workflow_id: base_t.ObjectId,
217
+ identifiers: recipe_identifiers_t.RecipeIdentifiers,
218
+ name: typing.Optional[str] = None,
219
+ workflow_variant_id: typing.Optional[typing.Optional[base_t.ObjectId]] = None,
220
+ recipe_metadata: typing.Optional[list[recipe_metadata_t.MetadataValue]] = None,
221
+ definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
222
+ ) -> create_recipe_t.Data:
223
+ """Returns the id of the recipe being created.
224
+
225
+ :param name: The name for the recipe
226
+ :param material_family_id: The material family for the recipe
227
+ :param workflow_id: The identifier of the workflow to create the recipe with
228
+ :param workflow_variant_id: The identifier of the workflow variant to create the recipe with
229
+ :param recipe_metadata: Metadata values to populate the recipe with
230
+ :param identifiers: A recipe won't be created if it matches the identifier. An identifier must be unique in the schema
231
+ :param definition_key: The entity definition identifier, default is used if not supplied
232
+ """
233
+ args = create_recipe_t.Arguments(
234
+ name=name,
235
+ material_family_id=material_family_id,
236
+ workflow_id=workflow_id,
237
+ workflow_variant_id=workflow_variant_id,
238
+ recipe_metadata=recipe_metadata,
239
+ identifiers=identifiers,
240
+ definition_key=definition_key,
241
+ )
242
+ api_request = APIRequest(
243
+ method=create_recipe_t.ENDPOINT_METHOD,
244
+ endpoint=create_recipe_t.ENDPOINT_PATH,
245
+ args=args,
246
+ )
247
+ return self.do_request(api_request=api_request, return_type=create_recipe_t.Data)
248
+
249
+
250
+ def create_recipe_link(
251
+ self,
252
+ *,
253
+ recipe_from_key: identifier_t.IdentifierKey,
254
+ recipe_to_key: identifier_t.IdentifierKey,
255
+ link_type: typing.Union[typing.Literal[recipe_links_t.RecipeLinkType.CHILD], typing.Literal[recipe_links_t.RecipeLinkType.CONTROL], typing.Literal[recipe_links_t.RecipeLinkType.USER_LINK]],
256
+ name: str,
257
+ ) -> create_recipe_link_t.Data:
258
+ """Create a link between two recipes. Skip if the link already exists
259
+
260
+ :param recipe_from_key: Identifier for the recipe the link comes from
261
+ :param recipe_to_key: Identifier for the recipe the link goes to
262
+ :param link_type: The type of link being created
263
+ :param name: The name used for the link
264
+ """
265
+ args = create_recipe_link_t.Arguments(
266
+ recipe_from_key=recipe_from_key,
267
+ recipe_to_key=recipe_to_key,
268
+ link_type=link_type,
269
+ name=name,
270
+ )
271
+ api_request = APIRequest(
272
+ method=create_recipe_link_t.ENDPOINT_METHOD,
273
+ endpoint=create_recipe_link_t.ENDPOINT_PATH,
274
+ args=args,
275
+ )
276
+ return self.do_request(api_request=api_request, return_type=create_recipe_link_t.Data)
277
+
278
+
120
279
  def create_recipes(
121
280
  self,
122
281
  *,
@@ -124,6 +283,11 @@ class ClientMethods(ABC):
124
283
  recipe_definitions: list[create_recipes_t.CreateRecipeDefinition],
125
284
  project_id: typing.Optional[base_t.ObjectId] = None,
126
285
  ) -> create_recipes_t.Data:
286
+ """Sets inputs values for an experiment. Values set can be numeric, text or categorical types in the Uncountable system
287
+
288
+ :param material_family_id: The identifier of the material family to create the recipes in
289
+ :param project_id: The identifier of the project to create the recipes in
290
+ """
127
291
  args = create_recipes_t.Arguments(
128
292
  material_family_id=material_family_id,
129
293
  project_id=project_id,
@@ -142,6 +306,9 @@ class ClientMethods(ABC):
142
306
  *,
143
307
  requests: list[execute_batch_t.BatchRequest],
144
308
  ) -> execute_batch_t.Data:
309
+ """Run multiple API calls via one request
310
+
311
+ """
145
312
  args = execute_batch_t.Arguments(
146
313
  requests=requests,
147
314
  )
@@ -153,11 +320,34 @@ class ClientMethods(ABC):
153
320
  return self.do_request(api_request=api_request, return_type=execute_batch_t.Data)
154
321
 
155
322
 
323
+ def execute_batch_load_async(
324
+ self,
325
+ *,
326
+ requests: list[async_batch_t.AsyncBatchRequest],
327
+ ) -> execute_batch_load_async_t.Data:
328
+ """Run multiple API calls via one request
329
+
330
+ """
331
+ args = execute_batch_load_async_t.Arguments(
332
+ requests=requests,
333
+ )
334
+ api_request = APIRequest(
335
+ method=execute_batch_load_async_t.ENDPOINT_METHOD,
336
+ endpoint=execute_batch_load_async_t.ENDPOINT_PATH,
337
+ args=args,
338
+ )
339
+ return self.do_request(api_request=api_request, return_type=execute_batch_load_async_t.Data)
340
+
341
+
156
342
  def get_curve(
157
343
  self,
158
344
  *,
159
345
  recipe_output_id: base_t.ObjectId,
160
346
  ) -> get_curve_t.Data:
347
+ """Returns an array of values for the specified curve id.
348
+
349
+ :param recipe_output_id: The recipe output ID to fetch the curve for. This must be a curve recipe output. Recipe Outputs can be found from external_get_recipes_data
350
+ """
161
351
  args = get_curve_t.Arguments(
162
352
  recipe_output_id=recipe_output_id,
163
353
  )
@@ -175,6 +365,11 @@ class ClientMethods(ABC):
175
365
  entity_ids: list[base_t.ObjectId],
176
366
  entity_type: entity_t.EntityType,
177
367
  ) -> get_entities_data_t.Data:
368
+ """Gets the details for a passed entity
369
+
370
+ :param entity_ids: Ids of the entity to retrieve
371
+ :param entity_type: The type of the entities requested, e.g. lab_request or approval
372
+ """
178
373
  args = get_entities_data_t.Arguments(
179
374
  entity_ids=entity_ids,
180
375
  entity_type=entity_type,
@@ -196,6 +391,14 @@ class ClientMethods(ABC):
196
391
  offset: typing.Optional[typing.Optional[int]] = None,
197
392
  limit: typing.Optional[typing.Optional[int]] = None,
198
393
  ) -> get_input_data_t.Data:
394
+ """Gets the attribute, categorization and other metadata associated with a set of inputs. An input is either an ingredient or process parameter, with metadata and calculations assigned separately
395
+
396
+ :param material_family_id: The material family ID to get the input values from.
397
+ :param input_ids: The input IDs to get the data from. If this is not filled in, all inputs from a material family will be returned (in paginated form).
398
+ :param offset: Used for pagination, where the number of results returned exceeds the limit. Results are always ordered by the input ID
399
+ :param is_parameter: Whether to get parameters or ingredients. By default both are returned. When set to true, only parameters are returned, and when set to false, only ingredients are returned
400
+ :param limit: The maximum number of results to return. By default this is set to 1,000 and it cannot be set higher than 1,000
401
+ """
199
402
  args = get_input_data_t.Arguments(
200
403
  material_family_id=material_family_id,
201
404
  input_ids=input_ids,
@@ -216,6 +419,10 @@ class ClientMethods(ABC):
216
419
  *,
217
420
  material_family_id: base_t.ObjectId,
218
421
  ) -> get_input_group_names_t.Data:
422
+ """Gets the name of all input groups in a material family that either the user created, or are shared to all users.
423
+
424
+ :param material_family_id: Required: The Material Family ID to get the input groups from.
425
+ """
219
426
  args = get_input_group_names_t.Arguments(
220
427
  material_family_id=material_family_id,
221
428
  )
@@ -235,6 +442,13 @@ class ClientMethods(ABC):
235
442
  offset: typing.Optional[typing.Optional[int]] = None,
236
443
  limit: typing.Optional[typing.Optional[int]] = None,
237
444
  ) -> get_input_names_t.Data:
445
+ """Gets the name of all inputs for a material family. An input is either an ingredient or process parameter, with metadata and calculations assigned separately
446
+
447
+ :param material_family_id: The material family ID to get the input values from
448
+ :param offset: Used for pagination, where the number of results returned exceeds the limit. Results are always ordered by the input ID
449
+ :param is_parameter: Whether to get parameters or ingredients. By default both are returned. When set to true, only parameters are returned, and when set to false, only ingredients are returned
450
+ :param limit: The maximum number of results to return. By default this is set to 20,000 and it cannot be set higher than 20,000
451
+ """
238
452
  args = get_input_names_t.Arguments(
239
453
  material_family_id=material_family_id,
240
454
  offset=offset,
@@ -254,6 +468,10 @@ class ClientMethods(ABC):
254
468
  *,
255
469
  input_ids: list[base_t.ObjectId],
256
470
  ) -> get_inputs_data_t.Data:
471
+ """Gets the details for passed input ids
472
+
473
+ :param input_ids: Ids of the inputs to retrieve
474
+ """
257
475
  args = get_inputs_data_t.Arguments(
258
476
  input_ids=input_ids,
259
477
  )
@@ -273,6 +491,13 @@ class ClientMethods(ABC):
273
491
  offset: typing.Optional[int] = None,
274
492
  limit: typing.Optional[int] = None,
275
493
  ) -> get_output_data_t.Data:
494
+ """Gets the attribute, categorization and other metadata associated with a set of outputs
495
+
496
+ :param material_family_id: The material family ID to get the output values from.
497
+ :param output_ids: The output IDs to get the data from. If this is not filled in, all outputs from a material family will be returned (in paginated form).
498
+ :param offset: Used for pagination, where the number of results returned exceeds the limit. Results are always ordered by the output ID
499
+ :param limit: The maximum number of results to return. By default this is set to 1,000 and it cannot be set higher than 1,000
500
+ """
276
501
  args = get_output_data_t.Arguments(
277
502
  material_family_id=material_family_id,
278
503
  output_ids=output_ids,
@@ -294,6 +519,12 @@ class ClientMethods(ABC):
294
519
  offset: typing.Optional[int] = None,
295
520
  limit: typing.Optional[int] = None,
296
521
  ) -> get_output_names_t.Data:
522
+ """Gets the name of all outputs for a material family. An output represents a measurement value of any time (numeric, text, curve, etc). This includes calculations based off of other outputs, such as a calculated change over time
523
+
524
+ :param material_family_id: The material family ID to get the output values from
525
+ :param offset: Used for pagination, where the number of results returned exceeds the limit. Results are always ordered by the output ID
526
+ :param limit: The maximum number of results to return. By default this is set to 20,000 and it cannot be set higher than 20,000
527
+ """
297
528
  args = get_output_names_t.Arguments(
298
529
  material_family_id=material_family_id,
299
530
  offset=offset,
@@ -313,6 +544,11 @@ class ClientMethods(ABC):
313
544
  all_material_families: bool,
314
545
  material_family_id: typing.Optional[base_t.ObjectId],
315
546
  ) -> get_projects_t.Data:
547
+ """Gets either all projects created in the platform, or the projects associated with a material family ID. Projects are where experiments are placed in Uncountable, similar to folders in a directory structure
548
+
549
+ :param all_material_families: Whether to get projects from all material families. Material families are high level groupings of data, usually separated by functional area
550
+ :param material_family_id: The specific material family ID to get projects from. Only fill this in if all_material_families is set to false
551
+ """
316
552
  args = get_projects_t.Arguments(
317
553
  all_material_families=all_material_families,
318
554
  material_family_id=material_family_id,
@@ -332,6 +568,12 @@ class ClientMethods(ABC):
332
568
  offset: typing.Optional[typing.Optional[int]] = None,
333
569
  limit: typing.Optional[typing.Optional[int]] = None,
334
570
  ) -> get_projects_data_t.Data:
571
+ """Gets either all data associated with a set of projects created in the platform. Because Uncountables recipe structure is complex, various data values are exploded out to increase efficiency in parsing, and this page is paginated to prevent too large of return values
572
+
573
+ :param project_ids: The projects to get the data from
574
+ :param offset: Used for pagination. All pagination is done in order of Project ID
575
+ :param limit: The number of data points to return. If not filled in, it will be set to 100, and cannot be set higher than 100
576
+ """
335
577
  args = get_projects_data_t.Arguments(
336
578
  project_ids=project_ids,
337
579
  offset=offset,
@@ -351,6 +593,11 @@ class ClientMethods(ABC):
351
593
  recipe_ids: list[base_t.ObjectId],
352
594
  calculation_ids: typing.Optional[list[base_t.ObjectId]] = None,
353
595
  ) -> get_recipe_calculations_t.Data:
596
+ """Gets the calculations for the passed recipes
597
+
598
+ :param recipe_ids: Ids of the Recipes to retrieve calculations for
599
+ :param calculation_ids: Optionally a list of ids of calculations to retrieve
600
+ """
354
601
  args = get_recipe_calculations_t.Arguments(
355
602
  recipe_ids=recipe_ids,
356
603
  calculation_ids=calculation_ids,
@@ -370,6 +617,12 @@ class ClientMethods(ABC):
370
617
  depth: int = 1,
371
618
  link_types: typing.Optional[list[recipe_links_t.RecipeLinkType]],
372
619
  ) -> get_recipe_links_t.Data:
620
+ """Gets the links for the passed recipes
621
+
622
+ :param recipe_ids: Ids of the Recipes to retrieve links for
623
+ :param depth: How many layers deep to look for links
624
+ :param link_types: Optional filter to only desired link types
625
+ """
373
626
  args = get_recipe_links_t.Arguments(
374
627
  recipe_ids=recipe_ids,
375
628
  depth=depth,
@@ -391,6 +644,13 @@ class ClientMethods(ABC):
391
644
  offset: typing.Optional[typing.Optional[int]] = None,
392
645
  limit: typing.Optional[typing.Optional[int]] = None,
393
646
  ) -> get_recipe_metadata_data_t.Data:
647
+ """Gets the recipe metadata. Recipe metadata is data associated with experiments that is not an input, output or calculation, such as a sample ID.
648
+
649
+ :param material_family_id: The material family ID to get the recipe metadata values from.
650
+ :param recipe_metadata_ids: The recipe metadata IDs to get the data from. If this is not filled in, all metadata from a material family will be returned (in paginated form).
651
+ :param offset: Used for pagination, where the number of results returned exceeds the limit. Results are always ordered by the metadata ID
652
+ :param limit: The maximum number of results to return. By default this is set to 1,000 and it cannot be set higher than 1,000
653
+ """
394
654
  args = get_recipe_metadata_data_t.Arguments(
395
655
  material_family_id=material_family_id,
396
656
  recipe_metadata_ids=recipe_metadata_ids,
@@ -410,6 +670,10 @@ class ClientMethods(ABC):
410
670
  *,
411
671
  project_id: base_t.ObjectId,
412
672
  ) -> get_recipe_names_t.Data:
673
+ """Gets the name of all recipes (or experiments, used as synonyms by Uncountable) for a project. The call external_get_projects can be used to find projects
674
+
675
+ :param project_id: Required: The project ID to get the recipes/experiments from.
676
+ """
413
677
  args = get_recipe_names_t.Arguments(
414
678
  project_id=project_id,
415
679
  )
@@ -426,6 +690,10 @@ class ClientMethods(ABC):
426
690
  *,
427
691
  recipe_output_ids: list[base_t.ObjectId],
428
692
  ) -> get_recipe_output_metadata_t.Data:
693
+ """Gets the metadata values for the passed recipe outputs
694
+
695
+ :param recipe_output_ids: Ids of the Recipe Outputs to retrieve metadata for
696
+ """
429
697
  args = get_recipe_output_metadata_t.Arguments(
430
698
  recipe_output_ids=recipe_output_ids,
431
699
  )
@@ -445,6 +713,13 @@ class ClientMethods(ABC):
445
713
  offset: typing.Optional[typing.Optional[int]] = None,
446
714
  limit: typing.Optional[typing.Optional[int]] = None,
447
715
  ) -> get_recipes_data_t.Data:
716
+ """Gets all data associated with a set of recipes. Because Uncountables recipe structure is complex, various data values are exploded out to increase efficiency in parsing, and this page is paginated to prevent too large of return values
717
+
718
+ :param recipe_ids: The recipes to get the data from. Either these or project_id must be filled in
719
+ :param project_id: The projects to get the data from. Either these or recipe_ids must be filled in
720
+ :param offset: Used for pagination. All pagination is done in order of Recipe ID
721
+ :param limit: The number of data points to return. If not filled in, it will be set to 100, and cannot be set higher than 100
722
+ """
448
723
  args = get_recipes_data_t.Arguments(
449
724
  recipe_ids=recipe_ids,
450
725
  project_id=project_id,
@@ -468,6 +743,14 @@ class ClientMethods(ABC):
468
743
  offset: typing.Optional[typing.Optional[int]] = None,
469
744
  limit: typing.Optional[typing.Optional[int]] = None,
470
745
  ) -> list_entities_t.Data:
746
+ """Uses a structured loading configuration to list entities in the system
747
+
748
+ :param entity_type: The type of the entities requested, e.g. lab_request, recipe
749
+ :param config_reference: The configuration reference name for the listing config
750
+ :param attributes: Attributes to pass to the configuration for parameterizing filters
751
+ :param offset: Used for pagination. Pagination is done based on the sorting of the config
752
+ :param limit: The number of data points to return. If not filled in, it will be set to 100, and cannot be set higher than 100
753
+ """
471
754
  args = list_entities_t.Arguments(
472
755
  entity_type=entity_type,
473
756
  config_reference=config_reference,
@@ -483,12 +766,69 @@ class ClientMethods(ABC):
483
766
  return self.do_request(api_request=api_request, return_type=list_entities_t.Data)
484
767
 
485
768
 
769
+ def list_id_source(
770
+ self,
771
+ *,
772
+ spec: id_source_t.IdSourceSpec,
773
+ search_label: str,
774
+ offset: typing.Optional[typing.Optional[int]] = None,
775
+ limit: typing.Optional[typing.Optional[int]] = None,
776
+ ) -> list_id_source_t.Data:
777
+ """Lists id and label pairs
778
+
779
+ :param spec: The id source spec to use
780
+ :param search_label: Text to search within the labels to search matches
781
+ :param offset: Used for pagination. Pagination is done based on the sorting of the config
782
+ :param limit: The number of data points to return. If not filled in, it will be set to 100, and cannot be set higher than 100
783
+ """
784
+ args = list_id_source_t.Arguments(
785
+ spec=spec,
786
+ search_label=search_label,
787
+ offset=offset,
788
+ limit=limit,
789
+ )
790
+ api_request = APIRequest(
791
+ method=list_id_source_t.ENDPOINT_METHOD,
792
+ endpoint=list_id_source_t.ENDPOINT_PATH,
793
+ args=args,
794
+ )
795
+ return self.do_request(api_request=api_request, return_type=list_id_source_t.Data)
796
+
797
+
798
+ def match_id_source(
799
+ self,
800
+ *,
801
+ spec: id_source_t.IdSourceSpec,
802
+ names: list[str],
803
+ ) -> match_id_source_t.Data:
804
+ """Lists id and label pairs
805
+
806
+ :param spec: The id source spec to use
807
+ :param names: The names to match with the id source. At most 10 are allowed at a time
808
+ """
809
+ args = match_id_source_t.Arguments(
810
+ spec=spec,
811
+ names=names,
812
+ )
813
+ api_request = APIRequest(
814
+ method=match_id_source_t.ENDPOINT_METHOD,
815
+ endpoint=match_id_source_t.ENDPOINT_PATH,
816
+ args=args,
817
+ )
818
+ return self.do_request(api_request=api_request, return_type=match_id_source_t.Data)
819
+
820
+
486
821
  def resolve_entity_ids(
487
822
  self,
488
823
  *,
489
824
  entity_ids: list[typing.Union[str, base_t.ObjectId]],
490
825
  entity_type: entity_t.EntityType,
491
826
  ) -> resolve_entity_ids_t.Data:
827
+ """Gets the names for passed in ids
828
+
829
+ :param entity_ids: Ids of the entity to retrieve
830
+ :param entity_type: The type of the entities requested
831
+ """
492
832
  args = resolve_entity_ids_t.Arguments(
493
833
  entity_ids=entity_ids,
494
834
  entity_type=entity_type,
@@ -506,6 +846,9 @@ class ClientMethods(ABC):
506
846
  *,
507
847
  requested_conditions: list[resolve_output_conditions_t.ConditionRequest],
508
848
  ) -> resolve_output_conditions_t.Data:
849
+ """For the provided set of condition parameter id and values, returns the existing or newly created output condition id for that value and id pair.
850
+
851
+ """
509
852
  args = resolve_output_conditions_t.Arguments(
510
853
  requested_conditions=requested_conditions,
511
854
  )
@@ -517,11 +860,36 @@ class ClientMethods(ABC):
517
860
  return self.do_request(api_request=api_request, return_type=resolve_output_conditions_t.Data)
518
861
 
519
862
 
863
+ def run_trigger(
864
+ self,
865
+ *,
866
+ trigger_ref_name: str,
867
+ entity: typing.Optional[entity_t.Entity] = None,
868
+ ) -> run_trigger_t.Data:
869
+ """Runs a trigger. Requires admin access
870
+
871
+ """
872
+ args = run_trigger_t.Arguments(
873
+ entity=entity,
874
+ trigger_ref_name=trigger_ref_name,
875
+ )
876
+ api_request = APIRequest(
877
+ method=run_trigger_t.ENDPOINT_METHOD,
878
+ endpoint=run_trigger_t.ENDPOINT_PATH,
879
+ args=args,
880
+ )
881
+ return self.do_request(api_request=api_request, return_type=run_trigger_t.Data)
882
+
883
+
520
884
  def set_input_attribute_values(
521
885
  self,
522
886
  *,
523
887
  attribute_values: list[set_input_attribute_values_t.InputAttributeValue],
524
888
  ) -> set_input_attribute_values_t.Data:
889
+ """Sets attribute values for an input
890
+
891
+ :param attribute_values: The attributes of the input to set
892
+ """
525
893
  args = set_input_attribute_values_t.Arguments(
526
894
  attribute_values=attribute_values,
527
895
  )
@@ -538,6 +906,10 @@ class ClientMethods(ABC):
538
906
  *,
539
907
  input_data: list[set_recipe_inputs_t.RecipeInputValue],
540
908
  ) -> set_recipe_inputs_t.Data:
909
+ """Sets inputs values for an experiment. Values set can be numeric, text or categorical types in the Uncountable system
910
+
911
+ :param input_data: The inputs to set. Must be at most 100 entries long
912
+ """
541
913
  args = set_recipe_inputs_t.Arguments(
542
914
  input_data=input_data,
543
915
  )
@@ -549,11 +921,38 @@ class ClientMethods(ABC):
549
921
  return self.do_request(api_request=api_request, return_type=set_recipe_inputs_t.Data)
550
922
 
551
923
 
924
+ def set_recipe_metadata(
925
+ self,
926
+ *,
927
+ recipe_key: identifier_t.IdentifierKey,
928
+ recipe_metadata: list[recipe_metadata_t.MetadataValue],
929
+ ) -> set_recipe_metadata_t.Data:
930
+ """Set metadata values on a recipe
931
+
932
+ :param recipe_key: Identifier for the recipe
933
+ :param recipe_metadata: Metadata values to populate the recipe with
934
+ """
935
+ args = set_recipe_metadata_t.Arguments(
936
+ recipe_key=recipe_key,
937
+ recipe_metadata=recipe_metadata,
938
+ )
939
+ api_request = APIRequest(
940
+ method=set_recipe_metadata_t.ENDPOINT_METHOD,
941
+ endpoint=set_recipe_metadata_t.ENDPOINT_PATH,
942
+ args=args,
943
+ )
944
+ return self.do_request(api_request=api_request, return_type=set_recipe_metadata_t.Data)
945
+
946
+
552
947
  def set_recipe_outputs(
553
948
  self,
554
949
  *,
555
950
  output_data: list[set_recipe_outputs_t.RecipeOutputValue],
556
951
  ) -> set_recipe_outputs_t.Data:
952
+ """Sets output values for an experiment. Values set can be numeric, text or categorical types in the Uncountable system
953
+
954
+ :param output_data: The outputs to set. Must be at most 100 entries long
955
+ """
557
956
  args = set_recipe_outputs_t.Arguments(
558
957
  output_data=output_data,
559
958
  )
@@ -571,6 +970,9 @@ class ClientMethods(ABC):
571
970
  entity: entity_t.Entity,
572
971
  values: list[field_values_t.ArgumentValueRefName],
573
972
  ) -> set_values_t.Data:
973
+ """Sets field values for an entity
974
+
975
+ """
574
976
  args = set_values_t.Arguments(
575
977
  entity=entity,
576
978
  values=values,