UncountablePythonSDK 0.0.91__py3-none-any.whl → 0.0.93__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 (193) hide show
  1. {UncountablePythonSDK-0.0.91.dist-info → UncountablePythonSDK-0.0.93.dist-info}/METADATA +2 -2
  2. UncountablePythonSDK-0.0.93.dist-info/RECORD +301 -0
  3. {UncountablePythonSDK-0.0.91.dist-info → UncountablePythonSDK-0.0.93.dist-info}/WHEEL +1 -1
  4. examples/set_recipe_metadata_file.py +1 -1
  5. examples/upload_files.py +1 -2
  6. pkgs/argument_parser/__init__.py +3 -0
  7. pkgs/argument_parser/argument_parser.py +52 -23
  8. pkgs/filesystem_utils/__init__.py +1 -0
  9. pkgs/filesystem_utils/_gdrive_session.py +4 -4
  10. pkgs/filesystem_utils/_s3_session.py +2 -1
  11. pkgs/filesystem_utils/_sftp_session.py +2 -3
  12. pkgs/filesystem_utils/file_type_utils.py +10 -10
  13. pkgs/serialization/annotation.py +5 -5
  14. pkgs/serialization/missing_sentry.py +1 -1
  15. pkgs/serialization/serial_alias.py +3 -3
  16. pkgs/serialization/serial_class.py +10 -10
  17. pkgs/serialization/serial_generic.py +1 -1
  18. pkgs/serialization/serial_union.py +10 -10
  19. pkgs/serialization_util/__init__.py +2 -0
  20. pkgs/serialization_util/serialization_helpers.py +1 -4
  21. pkgs/type_spec/actions_registry/__main__.py +0 -4
  22. pkgs/type_spec/builder.py +121 -40
  23. pkgs/type_spec/config.py +10 -5
  24. pkgs/type_spec/emit_open_api.py +2 -2
  25. pkgs/type_spec/emit_open_api_util.py +1 -1
  26. pkgs/type_spec/emit_python.py +145 -63
  27. pkgs/type_spec/emit_typescript.py +57 -10
  28. pkgs/type_spec/load_types.py +1 -2
  29. pkgs/type_spec/open_api_util.py +1 -2
  30. pkgs/type_spec/parts/base.py.prepart +2 -0
  31. pkgs/type_spec/type_info/emit_type_info.py +8 -8
  32. pkgs/type_spec/util.py +5 -7
  33. pkgs/type_spec/value_spec/__main__.py +15 -5
  34. pkgs/type_spec/value_spec/emit_python.py +5 -2
  35. pkgs/type_spec/value_spec/types.py +1 -1
  36. uncountable/core/client.py +16 -15
  37. uncountable/core/file_upload.py +39 -15
  38. uncountable/integration/construct_client.py +3 -3
  39. uncountable/integration/executors/generic_upload_executor.py +1 -1
  40. uncountable/integration/job.py +2 -2
  41. uncountable/integration/queue_runner/command_server/types.py +1 -1
  42. uncountable/integration/queue_runner/worker.py +1 -1
  43. uncountable/integration/server.py +4 -4
  44. uncountable/integration/telemetry.py +11 -0
  45. uncountable/types/__init__.py +0 -1
  46. uncountable/types/api/batch/execute_batch.py +1 -2
  47. uncountable/types/api/batch/execute_batch_load_async.py +0 -1
  48. uncountable/types/api/chemical/convert_chemical_formats.py +0 -1
  49. uncountable/types/api/entity/create_entities.py +3 -4
  50. uncountable/types/api/entity/create_entity.py +4 -5
  51. uncountable/types/api/entity/get_entities_data.py +0 -1
  52. uncountable/types/api/entity/grant_entity_permissions.py +3 -4
  53. uncountable/types/api/entity/list_entities.py +5 -6
  54. uncountable/types/api/entity/lock_entity.py +1 -2
  55. uncountable/types/api/entity/resolve_entity_ids.py +2 -3
  56. uncountable/types/api/entity/set_entity_field_values.py +0 -1
  57. uncountable/types/api/entity/set_values.py +0 -1
  58. uncountable/types/api/entity/transition_entity_phase.py +1 -2
  59. uncountable/types/api/entity/unlock_entity.py +0 -1
  60. uncountable/types/api/equipment/associate_equipment_input.py +0 -1
  61. uncountable/types/api/field_options/upsert_field_options.py +3 -4
  62. uncountable/types/api/files/download_file.py +1 -2
  63. uncountable/types/api/id_source/list_id_source.py +3 -4
  64. uncountable/types/api/id_source/match_id_source.py +1 -2
  65. uncountable/types/api/input_groups/get_input_group_names.py +0 -1
  66. uncountable/types/api/inputs/create_inputs.py +4 -5
  67. uncountable/types/api/inputs/get_input_data.py +5 -6
  68. uncountable/types/api/inputs/get_input_names.py +3 -4
  69. uncountable/types/api/inputs/get_inputs_data.py +0 -1
  70. uncountable/types/api/inputs/set_input_attribute_values.py +2 -3
  71. uncountable/types/api/inputs/set_input_category.py +2 -3
  72. uncountable/types/api/inputs/set_input_subcategories.py +0 -1
  73. uncountable/types/api/inputs/set_intermediate_type.py +1 -2
  74. uncountable/types/api/material_families/update_entity_material_families.py +1 -2
  75. uncountable/types/api/outputs/get_output_data.py +6 -7
  76. uncountable/types/api/outputs/get_output_names.py +2 -3
  77. uncountable/types/api/outputs/resolve_output_conditions.py +2 -3
  78. uncountable/types/api/permissions/set_core_permissions.py +3 -4
  79. uncountable/types/api/project/get_projects.py +3 -4
  80. uncountable/types/api/project/get_projects_data.py +4 -5
  81. uncountable/types/api/recipe_links/create_recipe_link.py +1 -2
  82. uncountable/types/api/recipe_links/remove_recipe_link.py +1 -2
  83. uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +3 -4
  84. uncountable/types/api/recipes/add_recipe_to_project.py +0 -1
  85. uncountable/types/api/recipes/archive_recipes.py +1 -2
  86. uncountable/types/api/recipes/associate_recipe_as_input.py +2 -3
  87. uncountable/types/api/recipes/associate_recipe_as_lot.py +0 -1
  88. uncountable/types/api/recipes/clear_recipe_outputs.py +0 -1
  89. uncountable/types/api/recipes/create_recipe.py +6 -7
  90. uncountable/types/api/recipes/create_recipes.py +4 -5
  91. uncountable/types/api/recipes/disassociate_recipe_as_input.py +0 -1
  92. uncountable/types/api/recipes/edit_recipe_inputs.py +9 -10
  93. uncountable/types/api/recipes/get_column_calculation_values.py +1 -2
  94. uncountable/types/api/recipes/get_curve.py +2 -3
  95. uncountable/types/api/recipes/get_recipe_calculations.py +3 -4
  96. uncountable/types/api/recipes/get_recipe_links.py +1 -2
  97. uncountable/types/api/recipes/get_recipe_names.py +0 -1
  98. uncountable/types/api/recipes/get_recipe_output_metadata.py +0 -1
  99. uncountable/types/api/recipes/get_recipes_data.py +22 -23
  100. uncountable/types/api/recipes/lock_recipes.py +3 -4
  101. uncountable/types/api/recipes/remove_recipe_from_project.py +0 -1
  102. uncountable/types/api/recipes/set_recipe_inputs.py +6 -7
  103. uncountable/types/api/recipes/set_recipe_metadata.py +0 -1
  104. uncountable/types/api/recipes/set_recipe_output_annotations.py +5 -6
  105. uncountable/types/api/recipes/set_recipe_output_file.py +2 -3
  106. uncountable/types/api/recipes/set_recipe_outputs.py +8 -9
  107. uncountable/types/api/recipes/set_recipe_tags.py +2 -3
  108. uncountable/types/api/recipes/unarchive_recipes.py +0 -1
  109. uncountable/types/api/recipes/unlock_recipes.py +2 -3
  110. uncountable/types/api/triggers/run_trigger.py +1 -2
  111. uncountable/types/api/uploader/invoke_uploader.py +2 -3
  112. uncountable/types/async_batch.py +0 -1
  113. uncountable/types/async_batch_processor.py +23 -24
  114. uncountable/types/async_batch_t.py +5 -6
  115. uncountable/types/async_jobs.py +0 -1
  116. uncountable/types/async_jobs_t.py +1 -2
  117. uncountable/types/auth_retrieval.py +0 -1
  118. uncountable/types/auth_retrieval_t.py +2 -3
  119. uncountable/types/base.py +0 -1
  120. uncountable/types/base_t.py +2 -1
  121. uncountable/types/calculations.py +0 -1
  122. uncountable/types/calculations_t.py +0 -1
  123. uncountable/types/chemical_structure.py +0 -1
  124. uncountable/types/chemical_structure_t.py +3 -4
  125. uncountable/types/client_base.py +65 -66
  126. uncountable/types/client_config.py +0 -1
  127. uncountable/types/client_config_t.py +1 -2
  128. uncountable/types/curves.py +0 -1
  129. uncountable/types/curves_t.py +4 -5
  130. uncountable/types/entity.py +0 -1
  131. uncountable/types/entity_t.py +3 -4
  132. uncountable/types/experiment_groups.py +0 -1
  133. uncountable/types/experiment_groups_t.py +0 -1
  134. uncountable/types/field_values.py +0 -1
  135. uncountable/types/field_values_t.py +6 -7
  136. uncountable/types/fields.py +0 -1
  137. uncountable/types/fields_t.py +0 -1
  138. uncountable/types/generic_upload.py +0 -1
  139. uncountable/types/generic_upload_t.py +7 -8
  140. uncountable/types/id_source.py +0 -1
  141. uncountable/types/id_source_t.py +2 -3
  142. uncountable/types/identifier.py +0 -1
  143. uncountable/types/identifier_t.py +1 -2
  144. uncountable/types/input_attributes.py +0 -1
  145. uncountable/types/input_attributes_t.py +2 -3
  146. uncountable/types/inputs.py +0 -1
  147. uncountable/types/inputs_t.py +2 -3
  148. uncountable/types/integration_server.py +0 -1
  149. uncountable/types/integration_server_t.py +2 -3
  150. uncountable/types/job_definition.py +0 -1
  151. uncountable/types/job_definition_t.py +16 -17
  152. uncountable/types/outputs.py +0 -1
  153. uncountable/types/outputs_t.py +1 -2
  154. uncountable/types/overrides.py +0 -1
  155. uncountable/types/overrides_t.py +0 -1
  156. uncountable/types/permissions.py +0 -1
  157. uncountable/types/permissions_t.py +1 -2
  158. uncountable/types/phases.py +0 -1
  159. uncountable/types/phases_t.py +0 -1
  160. uncountable/types/post_base.py +0 -1
  161. uncountable/types/post_base_t.py +1 -2
  162. uncountable/types/queued_job.py +0 -1
  163. uncountable/types/queued_job_t.py +2 -3
  164. uncountable/types/recipe_identifiers.py +0 -1
  165. uncountable/types/recipe_identifiers_t.py +3 -4
  166. uncountable/types/recipe_inputs.py +0 -1
  167. uncountable/types/recipe_inputs_t.py +1 -2
  168. uncountable/types/recipe_links.py +0 -1
  169. uncountable/types/recipe_links_t.py +2 -3
  170. uncountable/types/recipe_metadata.py +0 -1
  171. uncountable/types/recipe_metadata_t.py +6 -7
  172. uncountable/types/recipe_output_metadata.py +0 -1
  173. uncountable/types/recipe_output_metadata_t.py +0 -1
  174. uncountable/types/recipe_tags.py +0 -1
  175. uncountable/types/recipe_tags_t.py +0 -1
  176. uncountable/types/recipe_workflow_steps.py +0 -1
  177. uncountable/types/recipe_workflow_steps_t.py +2 -3
  178. uncountable/types/recipes.py +0 -1
  179. uncountable/types/recipes_t.py +0 -1
  180. uncountable/types/response.py +0 -1
  181. uncountable/types/response_t.py +0 -1
  182. uncountable/types/secret_retrieval.py +0 -1
  183. uncountable/types/secret_retrieval_t.py +3 -4
  184. uncountable/types/units.py +0 -1
  185. uncountable/types/units_t.py +0 -1
  186. uncountable/types/users.py +0 -1
  187. uncountable/types/users_t.py +0 -1
  188. uncountable/types/webhook_job.py +0 -1
  189. uncountable/types/webhook_job_t.py +0 -1
  190. uncountable/types/workflows.py +0 -1
  191. uncountable/types/workflows_t.py +1 -2
  192. UncountablePythonSDK-0.0.91.dist-info/RECORD +0 -301
  193. {UncountablePythonSDK-0.0.91.dist-info → UncountablePythonSDK-0.0.93.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -7,7 +6,7 @@ from __future__ import annotations
7
6
  import typing # noqa: F401
8
7
  import datetime # noqa: F401
9
8
  from decimal import Decimal # noqa: F401
10
- from pkgs.strenum_compat import StrEnum
9
+ from enum import StrEnum
11
10
  import dataclasses
12
11
  from pkgs.serialization import serial_class
13
12
  from pkgs.serialization import serial_union_annotation
@@ -62,7 +61,7 @@ class AuthRetrievalBasic(AuthRetrievalBase):
62
61
 
63
62
  # DO NOT MODIFY -- This file is generated by type_spec
64
63
  AuthRetrieval = typing.Annotated[
65
- typing.Union[AuthRetrievalOAuth, AuthRetrievalBasic],
64
+ AuthRetrievalOAuth | AuthRetrievalBasic,
66
65
  serial_union_annotation(
67
66
  named_type_path="sdk.auth_retrieval.AuthRetrieval",
68
67
  discriminator="type",
uncountable/types/base.py CHANGED
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -39,6 +38,8 @@ PureJsonScalar = Union[str, float, bool, None]
39
38
  # Regular expressions for identifying ref names and IDs. Ref names should be
40
39
  # using this regular expression as a constriant in the database.
41
40
  REF_NAME_REGEX = r"^[a-zA-Z0-9_/-]+$"
41
+ REF_NAME_STRICT_REGEX_STRING = "^[a-zA-Z_][a-zA-Z0-9_]*$"
42
+ REF_NAME_STRICT_REGEX = rf"{REF_NAME_STRICT_REGEX_STRING}"
42
43
  # Ids matching a strict integer number are converted to integers
43
44
  ID_REGEX = r"-?[1-9][0-9]{0,20}"
44
45
 
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -22,7 +21,7 @@ __all__: list[str] = [
22
21
  )
23
22
  @dataclasses.dataclass(kw_only=True)
24
23
  class ChemicalStructure:
25
- ketcher_file: typing.Optional[str] = None
26
- gross_formula: typing.Optional[str] = None
27
- molecular_weight: typing.Optional[Decimal] = None
24
+ ketcher_file: str | None = None
25
+ gross_formula: str | None = None
26
+ molecular_weight: Decimal | None = None
28
27
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -132,7 +131,7 @@ class ClientMethods(ABC):
132
131
  self,
133
132
  *,
134
133
  recipes: list[identifier_t.IdentifierKey],
135
- reason: typing.Optional[str] = None,
134
+ reason: str | None = None,
136
135
  ) -> archive_recipes_t.Data:
137
136
  """Archive the provided recipes and their children
138
137
 
@@ -176,8 +175,8 @@ class ClientMethods(ABC):
176
175
  self,
177
176
  *,
178
177
  recipe_key: identifier_t.IdentifierKey,
179
- input_key: typing.Optional[identifier_t.IdentifierKey] = None,
180
- show_in_listings: typing.Optional[bool] = None,
178
+ input_key: identifier_t.IdentifierKey | None = None,
179
+ show_in_listings: bool | None = None,
181
180
  ) -> associate_recipe_as_input_t.Data:
182
181
  """Create or return the input association for a recipe
183
182
 
@@ -261,8 +260,8 @@ class ClientMethods(ABC):
261
260
  *,
262
261
  entity_type: entity_t.LimitedEntityType,
263
262
  entities_to_create: list[create_entities_t.EntityToCreate],
264
- definition_id: typing.Optional[base_t.ObjectId] = None,
265
- definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
263
+ definition_id: base_t.ObjectId | None = None,
264
+ definition_key: identifier_t.IdentifierKey | None = None,
266
265
  ) -> create_entities_t.Data:
267
266
  """Creates new Uncountable entities
268
267
 
@@ -288,9 +287,9 @@ class ClientMethods(ABC):
288
287
  self,
289
288
  *,
290
289
  entity_type: entity_t.LimitedEntityType,
291
- definition_id: typing.Optional[base_t.ObjectId] = None,
292
- definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
293
- field_values: typing.Optional[typing.Optional[list[field_values_t.FieldRefNameValue]]] = None,
290
+ definition_id: base_t.ObjectId | None = None,
291
+ definition_key: identifier_t.IdentifierKey | None = None,
292
+ field_values: list[field_values_t.FieldRefNameValue] | None = None,
294
293
  ) -> create_entity_t.Data:
295
294
  """Creates a new Uncountable entity
296
295
 
@@ -335,12 +334,12 @@ class ClientMethods(ABC):
335
334
  *,
336
335
  material_family_id: base_t.ObjectId,
337
336
  workflow_id: base_t.ObjectId,
338
- name: typing.Optional[str] = None,
339
- project_id: typing.Optional[base_t.ObjectId] = None,
340
- workflow_variant_id: typing.Optional[typing.Optional[base_t.ObjectId]] = None,
341
- recipe_metadata: typing.Optional[list[recipe_metadata_t.MetadataValue]] = None,
342
- identifiers: typing.Optional[recipe_identifiers_t.RecipeIdentifiers] = None,
343
- definition_key: typing.Optional[identifier_t.IdentifierKey] = None,
337
+ name: str | None = None,
338
+ project_id: base_t.ObjectId | None = None,
339
+ workflow_variant_id: base_t.ObjectId | None = None,
340
+ recipe_metadata: list[recipe_metadata_t.MetadataValue] | None = None,
341
+ identifiers: recipe_identifiers_t.RecipeIdentifiers | None = None,
342
+ definition_key: identifier_t.IdentifierKey | None = None,
344
343
  ) -> create_recipe_t.Data:
345
344
  """Returns the id of the recipe being created.
346
345
 
@@ -375,7 +374,7 @@ class ClientMethods(ABC):
375
374
  *,
376
375
  recipe_from_key: identifier_t.IdentifierKey,
377
376
  recipe_to_key: identifier_t.IdentifierKey,
378
- 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]],
377
+ link_type: typing.Literal[recipe_links_t.RecipeLinkType.CHILD] | typing.Literal[recipe_links_t.RecipeLinkType.CONTROL] | typing.Literal[recipe_links_t.RecipeLinkType.USER_LINK],
379
378
  name: str,
380
379
  ) -> create_recipe_link_t.Data:
381
380
  """Create a link between two recipes. Skip if the link already exists
@@ -403,7 +402,7 @@ class ClientMethods(ABC):
403
402
  *,
404
403
  material_family_id: base_t.ObjectId,
405
404
  recipe_definitions: list[create_recipes_t.CreateRecipeDefinition],
406
- project_id: typing.Optional[base_t.ObjectId] = None,
405
+ project_id: base_t.ObjectId | None = None,
407
406
  ) -> create_recipes_t.Data:
408
407
  """Sets inputs values for an experiment. Values set can be numeric, text or categorical types in the Uncountable system
409
408
 
@@ -525,8 +524,8 @@ class ClientMethods(ABC):
525
524
  def get_curve(
526
525
  self,
527
526
  *,
528
- recipe_output_id: typing.Optional[base_t.ObjectId] = None,
529
- recipe_input_id: typing.Optional[base_t.ObjectId] = None,
527
+ recipe_output_id: base_t.ObjectId | None = None,
528
+ recipe_input_id: base_t.ObjectId | None = None,
530
529
  ) -> get_curve_t.Data:
531
530
  """Returns an array of values for the specified curve id.
532
531
 
@@ -570,10 +569,10 @@ class ClientMethods(ABC):
570
569
  self,
571
570
  *,
572
571
  material_family_id: base_t.ObjectId,
573
- input_ids: typing.Optional[list[base_t.ObjectId]],
574
- is_parameter: typing.Optional[bool],
575
- offset: typing.Optional[typing.Optional[int]] = None,
576
- limit: typing.Optional[typing.Optional[int]] = None,
572
+ input_ids: list[base_t.ObjectId] | None,
573
+ is_parameter: bool | None,
574
+ offset: int | None = None,
575
+ limit: int | None = None,
577
576
  ) -> get_input_data_t.Data:
578
577
  """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
579
578
 
@@ -620,9 +619,9 @@ class ClientMethods(ABC):
620
619
  self,
621
620
  *,
622
621
  material_family_id: base_t.ObjectId,
623
- is_parameter: typing.Optional[bool],
624
- offset: typing.Optional[typing.Optional[int]] = None,
625
- limit: typing.Optional[typing.Optional[int]] = None,
622
+ is_parameter: bool | None,
623
+ offset: int | None = None,
624
+ limit: int | None = None,
626
625
  ) -> get_input_names_t.Data:
627
626
  """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
628
627
 
@@ -667,9 +666,9 @@ class ClientMethods(ABC):
667
666
  self,
668
667
  *,
669
668
  material_family_id: base_t.ObjectId,
670
- output_ids: typing.Optional[list[base_t.ObjectId]] = None,
671
- offset: typing.Optional[int] = None,
672
- limit: typing.Optional[int] = None,
669
+ output_ids: list[base_t.ObjectId] | None = None,
670
+ offset: int | None = None,
671
+ limit: int | None = None,
673
672
  ) -> get_output_data_t.Data:
674
673
  """Gets the attribute, categorization and other metadata associated with a set of outputs
675
674
 
@@ -695,8 +694,8 @@ class ClientMethods(ABC):
695
694
  self,
696
695
  *,
697
696
  material_family_id: base_t.ObjectId,
698
- offset: typing.Optional[int] = None,
699
- limit: typing.Optional[int] = None,
697
+ offset: int | None = None,
698
+ limit: int | None = None,
700
699
  ) -> get_output_names_t.Data:
701
700
  """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
702
701
 
@@ -720,7 +719,7 @@ class ClientMethods(ABC):
720
719
  self,
721
720
  *,
722
721
  all_material_families: bool,
723
- material_family_id: typing.Optional[base_t.ObjectId],
722
+ material_family_id: base_t.ObjectId | None,
724
723
  ) -> get_projects_t.Data:
725
724
  """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
726
725
 
@@ -742,8 +741,8 @@ class ClientMethods(ABC):
742
741
  self,
743
742
  *,
744
743
  project_ids: list[base_t.ObjectId],
745
- offset: typing.Optional[typing.Optional[int]] = None,
746
- limit: typing.Optional[typing.Optional[int]] = None,
744
+ offset: int | None = None,
745
+ limit: int | None = None,
747
746
  ) -> get_projects_data_t.Data:
748
747
  """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
749
748
 
@@ -767,7 +766,7 @@ class ClientMethods(ABC):
767
766
  self,
768
767
  *,
769
768
  recipe_ids: list[base_t.ObjectId],
770
- calculation_ids: typing.Optional[list[base_t.ObjectId]] = None,
769
+ calculation_ids: list[base_t.ObjectId] | None = None,
771
770
  ) -> get_recipe_calculations_t.Data:
772
771
  """Gets the calculations for the passed recipes
773
772
 
@@ -790,7 +789,7 @@ class ClientMethods(ABC):
790
789
  *,
791
790
  recipe_ids: list[base_t.ObjectId],
792
791
  depth: int = 1,
793
- link_types: typing.Optional[list[recipe_links_t.RecipeLinkType]],
792
+ link_types: list[recipe_links_t.RecipeLinkType] | None,
794
793
  ) -> get_recipe_links_t.Data:
795
794
  """Gets the links for the passed recipes
796
795
 
@@ -814,9 +813,9 @@ class ClientMethods(ABC):
814
813
  self,
815
814
  *,
816
815
  material_family_id: base_t.ObjectId,
817
- recipe_metadata_ids: typing.Optional[list[base_t.ObjectId]],
818
- offset: typing.Optional[typing.Optional[int]] = None,
819
- limit: typing.Optional[typing.Optional[int]] = None,
816
+ recipe_metadata_ids: list[base_t.ObjectId] | None,
817
+ offset: int | None = None,
818
+ limit: int | None = None,
820
819
  ) -> get_recipe_metadata_data_t.Data:
821
820
  """Gets the recipe metadata. Recipe metadata is data associated with experiments that is not an input, output or calculation, such as a sample ID.
822
821
 
@@ -879,10 +878,10 @@ class ClientMethods(ABC):
879
878
  def get_recipes_data(
880
879
  self,
881
880
  *,
882
- recipe_ids: typing.Optional[typing.Optional[list[base_t.ObjectId]]] = None,
883
- project_id: typing.Optional[typing.Optional[base_t.ObjectId]] = None,
884
- offset: typing.Optional[typing.Optional[int]] = None,
885
- limit: typing.Optional[typing.Optional[int]] = None,
881
+ recipe_ids: list[base_t.ObjectId] | None = None,
882
+ project_id: base_t.ObjectId | None = None,
883
+ offset: int | None = None,
884
+ limit: int | None = None,
886
885
  ) -> get_recipes_data_t.Data:
887
886
  """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
888
887
 
@@ -910,9 +909,9 @@ class ClientMethods(ABC):
910
909
  entity_type: entity_t.LimitedEntityType,
911
910
  entity_key: identifier_t.IdentifierKey,
912
911
  permission_types: list[entity_t.GrantableEntityPermissionType],
913
- user_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
914
- user_group_keys: typing.Optional[list[identifier_t.IdentifierKey]] = None,
915
- all_users: typing.Optional[bool] = None,
912
+ user_keys: list[identifier_t.IdentifierKey] | None = None,
913
+ user_group_keys: list[identifier_t.IdentifierKey] | None = None,
914
+ all_users: bool | None = None,
916
915
  ) -> grant_entity_permissions_t.Data:
917
916
  """Grant entity permissions to a list of users or user groups or to all users.
918
917
 
@@ -937,8 +936,8 @@ class ClientMethods(ABC):
937
936
  *,
938
937
  uploader_key: identifier_t.IdentifierKey,
939
938
  destination: generic_upload_t.UploadDestination,
940
- file_id: typing.Optional[base_t.ObjectId] = None,
941
- file_ids: typing.Optional[list[base_t.ObjectId]] = None,
939
+ file_id: base_t.ObjectId | None = None,
940
+ file_ids: list[base_t.ObjectId] | None = None,
942
941
  ) -> invoke_uploader_t.Data:
943
942
  """Runs a file through an uploader.
944
943
 
@@ -961,10 +960,10 @@ class ClientMethods(ABC):
961
960
  self,
962
961
  *,
963
962
  config_reference: str,
964
- entity_type: typing.Optional[entity_t.EntityType] = None,
965
- attributes: typing.Optional[dict[OpaqueKey, base_t.JsonValue]] = None,
966
- offset: typing.Optional[typing.Optional[int]] = None,
967
- limit: typing.Optional[typing.Optional[int]] = None,
963
+ entity_type: entity_t.EntityType | None = None,
964
+ attributes: dict[OpaqueKey, base_t.JsonValue] | None = None,
965
+ offset: int | None = None,
966
+ limit: int | None = None,
968
967
  ) -> list_entities_t.Data:
969
968
  """Uses a structured loading configuration to list entities in the system
970
969
 
@@ -993,8 +992,8 @@ class ClientMethods(ABC):
993
992
  *,
994
993
  spec: id_source_t.IdSourceSpec,
995
994
  search_label: str,
996
- offset: typing.Optional[typing.Optional[int]] = None,
997
- limit: typing.Optional[typing.Optional[int]] = None,
995
+ offset: int | None = None,
996
+ limit: int | None = None,
998
997
  ) -> list_id_source_t.Data:
999
998
  """Lists id and label pairs
1000
999
 
@@ -1021,7 +1020,7 @@ class ClientMethods(ABC):
1021
1020
  *,
1022
1021
  entity_key: identifier_t.IdentifierKey,
1023
1022
  entity_type: entity_t.EntityType,
1024
- globally_removable: typing.Optional[bool] = None,
1023
+ globally_removable: bool | None = None,
1025
1024
  ) -> lock_entity_t.Data:
1026
1025
  """Lock an entity
1027
1026
 
@@ -1046,8 +1045,8 @@ class ClientMethods(ABC):
1046
1045
  type: lock_recipes_t.RecipeLockType = lock_recipes_t.RecipeLockType.ALL,
1047
1046
  recipes: list[identifier_t.IdentifierKey],
1048
1047
  globally_removable: bool,
1049
- lock_samples: typing.Optional[bool] = None,
1050
- comments: typing.Optional[str] = None,
1048
+ lock_samples: bool | None = None,
1049
+ comments: str | None = None,
1051
1050
  ) -> lock_recipes_t.Data:
1052
1051
  """Lock experiments. Experiments will require unlocking to be editable. Edits to the experiments are blocked while they are locked.
1053
1052
 
@@ -1123,7 +1122,7 @@ class ClientMethods(ABC):
1123
1122
  *,
1124
1123
  recipe_from_key: identifier_t.IdentifierKey,
1125
1124
  recipe_to_key: identifier_t.IdentifierKey,
1126
- 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]],
1125
+ link_type: typing.Literal[recipe_links_t.RecipeLinkType.CHILD] | typing.Literal[recipe_links_t.RecipeLinkType.CONTROL] | typing.Literal[recipe_links_t.RecipeLinkType.USER_LINK],
1127
1126
  ) -> remove_recipe_link_t.Data:
1128
1127
  """Remove a link between two recipes. Skip if the link doesn't already exist
1129
1128
 
@@ -1146,7 +1145,7 @@ class ClientMethods(ABC):
1146
1145
  def resolve_entity_ids(
1147
1146
  self,
1148
1147
  *,
1149
- entity_ids: list[typing.Union[str, base_t.ObjectId]],
1148
+ entity_ids: list[str | base_t.ObjectId],
1150
1149
  entity_type: entity_t.EntityType,
1151
1150
  ) -> resolve_entity_ids_t.Data:
1152
1151
  """Gets the names for passed in ids
@@ -1187,7 +1186,7 @@ class ClientMethods(ABC):
1187
1186
  self,
1188
1187
  *,
1189
1188
  trigger_ref_name: str,
1190
- entity: typing.Optional[entity_t.Entity] = None,
1189
+ entity: entity_t.Entity | None = None,
1191
1190
  ) -> run_trigger_t.Data:
1192
1191
  """Runs a trigger. Requires admin access
1193
1192
 
@@ -1209,8 +1208,8 @@ class ClientMethods(ABC):
1209
1208
  scope: set_core_permissions_t.PermissionsScope,
1210
1209
  permissions_types: list[permissions_t.CorePermissionType],
1211
1210
  update_type: post_base_t.UpdateType,
1212
- user_group_ids: typing.Optional[list[int]] = None,
1213
- user_ids: typing.Optional[list[int]] = None,
1211
+ user_group_ids: list[int] | None = None,
1212
+ user_ids: list[int] | None = None,
1214
1213
  ) -> set_core_permissions_t.Data:
1215
1214
  """Sets recipe related permissions
1216
1215
 
@@ -1278,8 +1277,8 @@ class ClientMethods(ABC):
1278
1277
  self,
1279
1278
  *,
1280
1279
  input_key: identifier_t.IdentifierKey,
1281
- category_id: typing.Optional[int],
1282
- material_family_ids: typing.Optional[list[int]] = None,
1280
+ category_id: int | None,
1281
+ material_family_ids: list[int] | None = None,
1283
1282
  ) -> set_input_category_t.Data:
1284
1283
  """Sets subcategories for an input
1285
1284
 
@@ -1551,7 +1550,7 @@ class ClientMethods(ABC):
1551
1550
  *,
1552
1551
  type: unlock_recipes_t.RecipeUnlockType = unlock_recipes_t.RecipeUnlockType.STANDARD,
1553
1552
  recipes: list[identifier_t.IdentifierKey],
1554
- unlock_samples: typing.Optional[bool] = None,
1553
+ unlock_samples: bool | None = None,
1555
1554
  ) -> unlock_recipes_t.Data:
1556
1555
  """Unlock experiments. Experiments will edtiable after unlocking if they are currently locked.
1557
1556
 
@@ -1575,7 +1574,7 @@ class ClientMethods(ABC):
1575
1574
  self,
1576
1575
  *,
1577
1576
  entity_key: identifier_t.IdentifierKey,
1578
- entity_type: typing.Union[typing.Literal[entity_t.EntityType.RECIPE_METADATA], typing.Literal[entity_t.EntityType.INGREDIENT], typing.Literal[entity_t.EntityType.OUTPUT], typing.Literal[entity_t.EntityType.CONDITION_PARAMETER], typing.Literal[entity_t.EntityType.INGREDIENT_ATTRIBUTE]],
1577
+ entity_type: typing.Literal[entity_t.EntityType.RECIPE_METADATA] | typing.Literal[entity_t.EntityType.INGREDIENT] | typing.Literal[entity_t.EntityType.OUTPUT] | typing.Literal[entity_t.EntityType.CONDITION_PARAMETER] | typing.Literal[entity_t.EntityType.INGREDIENT_ATTRIBUTE],
1579
1578
  material_family_ids: list[base_t.ObjectId],
1580
1579
  update_type: post_base_t.UpdateType,
1581
1580
  ) -> update_entity_material_families_t.Data:
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -22,5 +21,5 @@ __all__: list[str] = [
22
21
  @dataclasses.dataclass(kw_only=True)
23
22
  class ClientConfigOptions:
24
23
  allow_insecure_tls: bool = False
25
- extra_headers: typing.Optional[typing.Optional[dict[str, str]]] = None
24
+ extra_headers: dict[str, str] | None = None
26
25
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -7,7 +6,7 @@ from __future__ import annotations
7
6
  import typing # noqa: F401
8
7
  import datetime # noqa: F401
9
8
  from decimal import Decimal # noqa: F401
10
- from pkgs.strenum_compat import StrEnum
9
+ from enum import StrEnum
11
10
  import dataclasses
12
11
  from pkgs.serialization import serial_class
13
12
  from . import base_t
@@ -32,7 +31,7 @@ class CurveAxisType(StrEnum):
32
31
  @dataclasses.dataclass(kw_only=True)
33
32
  class Curve:
34
33
  id: base_t.ObjectId
35
- x_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC], typing.Literal[CurveAxisType.TIMESTAMP]]
34
+ x_type: typing.Literal[CurveAxisType.NUMERIC] | typing.Literal[CurveAxisType.TIMESTAMP]
36
35
  x_values: list[CurveValue]
37
36
  y_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC]]
38
37
  y_values: list[CurveValue]
@@ -46,6 +45,6 @@ class Curve:
46
45
  @dataclasses.dataclass(kw_only=True)
47
46
  class CurveValue:
48
47
  index: int
49
- quantity: typing.Optional[Decimal] = None
50
- quantity_timestamp: typing.Optional[datetime.datetime] = None
48
+ quantity: Decimal | None = None
49
+ quantity_timestamp: datetime.datetime | None = None
51
50
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -7,7 +6,7 @@ from __future__ import annotations
7
6
  import typing # noqa: F401
8
7
  import datetime # noqa: F401
9
8
  from decimal import Decimal # noqa: F401
10
- from pkgs.strenum_compat import StrEnum
9
+ from enum import StrEnum
11
10
  import dataclasses
12
11
  from pkgs.serialization import serial_class
13
12
  from pkgs.serialization import serial_alias_annotation
@@ -347,7 +346,7 @@ class EntityType(StrEnum):
347
346
 
348
347
  # DO NOT MODIFY -- This file is generated by type_spec
349
348
  LimitedEntityType = typing.Annotated[
350
- typing.Union[typing.Literal[EntityType.LAB_REQUEST], typing.Literal[EntityType.APPROVAL], typing.Literal[EntityType.CUSTOM_ENTITY], typing.Literal[EntityType.INVENTORY_AMOUNT], typing.Literal[EntityType.TASK], typing.Literal[EntityType.PROJECT], typing.Literal[EntityType.EQUIPMENT], typing.Literal[EntityType.INV_LOCAL_LOCATIONS], typing.Literal[EntityType.FIELD_OPTION_SET], typing.Literal[EntityType.WEBHOOK], typing.Literal[EntityType.SPECS], typing.Literal[EntityType.GOAL], typing.Literal[EntityType.INGREDIENT_TAG_MAP], typing.Literal[EntityType.INGREDIENT_TAG], typing.Literal[EntityType.CONDITION_PARAMETER], typing.Literal[EntityType.OUTPUT], typing.Literal[EntityType.OUTPUT_CONDITION_PARAMETER], typing.Literal[EntityType.ASYNC_JOB]],
349
+ typing.Literal[EntityType.LAB_REQUEST] | typing.Literal[EntityType.APPROVAL] | typing.Literal[EntityType.CUSTOM_ENTITY] | typing.Literal[EntityType.INVENTORY_AMOUNT] | typing.Literal[EntityType.TASK] | typing.Literal[EntityType.PROJECT] | typing.Literal[EntityType.EQUIPMENT] | typing.Literal[EntityType.INV_LOCAL_LOCATIONS] | typing.Literal[EntityType.FIELD_OPTION_SET] | typing.Literal[EntityType.WEBHOOK] | typing.Literal[EntityType.SPECS] | typing.Literal[EntityType.GOAL] | typing.Literal[EntityType.INGREDIENT_TAG_MAP] | typing.Literal[EntityType.INGREDIENT_TAG] | typing.Literal[EntityType.CONDITION_PARAMETER] | typing.Literal[EntityType.OUTPUT] | typing.Literal[EntityType.OUTPUT_CONDITION_PARAMETER] | typing.Literal[EntityType.ASYNC_JOB],
351
350
  serial_alias_annotation(
352
351
  named_type_path="sdk.entity.LimitedEntityType",
353
352
  ),
@@ -365,7 +364,7 @@ class EntityPermissionType(StrEnum):
365
364
 
366
365
  # DO NOT MODIFY -- This file is generated by type_spec
367
366
  GrantableEntityPermissionType = typing.Annotated[
368
- typing.Union[typing.Literal[EntityPermissionType.READ], typing.Literal[EntityPermissionType.WRITE]],
367
+ typing.Literal[EntityPermissionType.READ] | typing.Literal[EntityPermissionType.WRITE],
369
368
  serial_alias_annotation(
370
369
  named_type_path="sdk.entity.GrantableEntityPermissionType",
371
370
  ),
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -7,7 +6,7 @@ from __future__ import annotations
7
6
  import typing # noqa: F401
8
7
  import datetime # noqa: F401
9
8
  from decimal import Decimal # noqa: F401
10
- from pkgs.strenum_compat import StrEnum
9
+ from enum import StrEnum
11
10
  import dataclasses
12
11
  from pkgs.serialization import serial_class
13
12
  from pkgs.serialization import serial_union_annotation
@@ -43,7 +42,7 @@ __all__: list[str] = [
43
42
  class FieldRefNameValue:
44
43
  field_ref_name: str
45
44
  value: base_t.JsonValue
46
- row_index: typing.Optional[typing.Optional[int]] = None
45
+ row_index: int | None = None
47
46
 
48
47
 
49
48
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -56,7 +55,7 @@ class FieldRefIdNameValue:
56
55
  field_id: base_t.ObjectId
57
56
  field_ref_name: str
58
57
  value: base_t.JsonValue
59
- row_index: typing.Optional[typing.Optional[int]] = None
58
+ row_index: int | None = None
60
59
 
61
60
 
62
61
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -68,7 +67,7 @@ class FieldRefIdNameValue:
68
67
  class ArgumentValueRefName:
69
68
  field_ref_name: str
70
69
  value: base_t.JsonValue
71
- row_index: typing.Optional[typing.Optional[int]] = None
70
+ row_index: int | None = None
72
71
 
73
72
 
74
73
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -80,7 +79,7 @@ class ArgumentValueRefName:
80
79
  class ArgumentValueId:
81
80
  field_id: base_t.ObjectId
82
81
  value: base_t.JsonValue
83
- row_index: typing.Optional[typing.Optional[int]] = None
82
+ row_index: int | None = None
84
83
 
85
84
 
86
85
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -186,7 +185,7 @@ class FieldValueBatchReference(FieldValueBase):
186
185
 
187
186
  # DO NOT MODIFY -- This file is generated by type_spec
188
187
  FieldValue = typing.Annotated[
189
- typing.Union[FieldValueFiles, FieldValueId, FieldValueIds, FieldValueText, FieldValueBoolean, FieldValueNumeric, FieldValueBatchReference],
188
+ FieldValueFiles | FieldValueId | FieldValueIds | FieldValueText | FieldValueBoolean | FieldValueNumeric | FieldValueBatchReference,
190
189
  serial_union_annotation(
191
190
  named_type_path="sdk.field_values.FieldValue",
192
191
  ),
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file
@@ -1,5 +1,4 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
- # flake8: noqa: F821
3
2
  # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
@@ -1,4 +1,3 @@
1
- # flake8: noqa: F821
2
1
  # ruff: noqa: E402 Q003
3
2
  # fmt: off
4
3
  # isort: skip_file