UncountablePythonSDK 0.0.38__py3-none-any.whl → 0.0.40__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 (129) hide show
  1. {UncountablePythonSDK-0.0.38.dist-info → UncountablePythonSDK-0.0.40.dist-info}/METADATA +1 -1
  2. UncountablePythonSDK-0.0.40.dist-info/RECORD +222 -0
  3. {UncountablePythonSDK-0.0.38.dist-info → UncountablePythonSDK-0.0.40.dist-info}/WHEEL +1 -1
  4. pkgs/type_spec/emit_python.py +43 -8
  5. pkgs/type_spec/type_info/emit_type_info.py +1 -1
  6. uncountable/core/client.py +1 -1
  7. uncountable/types/__init__.py +32 -30
  8. uncountable/types/api/batch/execute_batch.py +2 -2
  9. uncountable/types/api/batch/execute_batch_load_async.py +3 -3
  10. uncountable/types/api/chemical/convert_chemical_formats.py +2 -2
  11. uncountable/types/api/entity/create_entities.py +4 -4
  12. uncountable/types/api/entity/create_entity.py +4 -4
  13. uncountable/types/api/entity/get_entities_data.py +4 -4
  14. uncountable/types/api/entity/list_entities.py +3 -3
  15. uncountable/types/api/entity/lock_entity.py +4 -4
  16. uncountable/types/api/entity/resolve_entity_ids.py +3 -3
  17. uncountable/types/api/entity/set_values.py +4 -4
  18. uncountable/types/api/entity/transition_entity_phase.py +4 -4
  19. uncountable/types/api/entity/unlock_entity.py +4 -4
  20. uncountable/types/api/equipment/__init__.py +1 -0
  21. uncountable/types/api/equipment/associate_equipment_input.py +37 -0
  22. uncountable/types/api/field_options/upsert_field_options.py +2 -2
  23. uncountable/types/api/id_source/list_id_source.py +3 -3
  24. uncountable/types/api/id_source/match_id_source.py +3 -3
  25. uncountable/types/api/input_groups/get_input_group_names.py +2 -2
  26. uncountable/types/api/inputs/create_inputs.py +4 -4
  27. uncountable/types/api/inputs/get_input_data.py +3 -3
  28. uncountable/types/api/inputs/get_input_names.py +2 -2
  29. uncountable/types/api/inputs/get_inputs_data.py +3 -3
  30. uncountable/types/api/inputs/set_input_attribute_values.py +3 -3
  31. uncountable/types/api/inputs/set_input_category.py +3 -3
  32. uncountable/types/api/inputs/set_input_subcategories.py +4 -4
  33. uncountable/types/api/inputs/set_intermediate_type.py +2 -2
  34. uncountable/types/api/material_families/update_entity_material_families.py +6 -6
  35. uncountable/types/api/outputs/get_output_data.py +3 -3
  36. uncountable/types/api/outputs/get_output_names.py +2 -2
  37. uncountable/types/api/outputs/resolve_output_conditions.py +2 -2
  38. uncountable/types/api/permissions/set_core_permissions.py +4 -4
  39. uncountable/types/api/project/get_projects.py +3 -3
  40. uncountable/types/api/project/get_projects_data.py +5 -5
  41. uncountable/types/api/recipe_links/create_recipe_link.py +4 -4
  42. uncountable/types/api/recipe_links/remove_recipe_link.py +4 -4
  43. uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +2 -2
  44. uncountable/types/api/recipes/add_recipe_to_project.py +2 -2
  45. uncountable/types/api/recipes/archive_recipes.py +2 -2
  46. uncountable/types/api/recipes/associate_recipe_as_input.py +3 -3
  47. uncountable/types/api/recipes/associate_recipe_as_lot.py +3 -3
  48. uncountable/types/api/recipes/create_recipe.py +5 -5
  49. uncountable/types/api/recipes/create_recipes.py +3 -3
  50. uncountable/types/api/recipes/disassociate_recipe_as_input.py +3 -3
  51. uncountable/types/api/recipes/edit_recipe_inputs.py +4 -4
  52. uncountable/types/api/recipes/get_curve.py +3 -3
  53. uncountable/types/api/recipes/get_recipe_calculations.py +3 -3
  54. uncountable/types/api/recipes/get_recipe_links.py +3 -3
  55. uncountable/types/api/recipes/get_recipe_names.py +2 -2
  56. uncountable/types/api/recipes/get_recipe_output_metadata.py +3 -3
  57. uncountable/types/api/recipes/get_recipes_data.py +8 -8
  58. uncountable/types/api/recipes/lock_recipes.py +2 -2
  59. uncountable/types/api/recipes/remove_recipe_from_project.py +2 -2
  60. uncountable/types/api/recipes/set_recipe_inputs.py +2 -2
  61. uncountable/types/api/recipes/set_recipe_metadata.py +3 -3
  62. uncountable/types/api/recipes/set_recipe_output_annotations.py +3 -3
  63. uncountable/types/api/recipes/set_recipe_outputs.py +4 -4
  64. uncountable/types/api/recipes/set_recipe_tags.py +3 -3
  65. uncountable/types/api/recipes/unarchive_recipes.py +2 -2
  66. uncountable/types/api/recipes/unlock_recipes.py +2 -2
  67. uncountable/types/api/triggers/run_trigger.py +3 -3
  68. uncountable/types/async_batch.py +6 -53
  69. uncountable/types/async_batch_processor.py +43 -7
  70. uncountable/types/async_batch_t.py +59 -0
  71. uncountable/types/base.py +5 -79
  72. uncountable/types/base_t.py +85 -0
  73. uncountable/types/calculations.py +3 -18
  74. uncountable/types/calculations_t.py +23 -0
  75. uncountable/types/chemical_structure.py +3 -22
  76. uncountable/types/chemical_structure_t.py +27 -0
  77. uncountable/types/client_base.py +36 -13
  78. uncountable/types/curves.py +5 -42
  79. uncountable/types/curves_t.py +47 -0
  80. uncountable/types/entity.py +4 -269
  81. uncountable/types/entity_t.py +274 -0
  82. uncountable/types/experiment_groups.py +3 -18
  83. uncountable/types/experiment_groups_t.py +23 -0
  84. uncountable/types/field_values.py +6 -60
  85. uncountable/types/field_values_t.py +65 -0
  86. uncountable/types/fields.py +3 -19
  87. uncountable/types/fields_t.py +24 -0
  88. uncountable/types/id_source.py +7 -44
  89. uncountable/types/id_source_t.py +49 -0
  90. uncountable/types/identifier.py +6 -49
  91. uncountable/types/identifier_t.py +54 -0
  92. uncountable/types/input_attributes.py +3 -24
  93. uncountable/types/input_attributes_t.py +29 -0
  94. uncountable/types/inputs.py +5 -57
  95. uncountable/types/inputs_t.py +62 -0
  96. uncountable/types/outputs.py +3 -21
  97. uncountable/types/outputs_t.py +26 -0
  98. uncountable/types/permissions.py +3 -41
  99. uncountable/types/permissions_t.py +46 -0
  100. uncountable/types/phases.py +3 -18
  101. uncountable/types/phases_t.py +23 -0
  102. uncountable/types/post_base.py +3 -25
  103. uncountable/types/post_base_t.py +30 -0
  104. uncountable/types/recipe_identifiers.py +7 -57
  105. uncountable/types/recipe_identifiers_t.py +62 -0
  106. uncountable/types/recipe_inputs.py +4 -25
  107. uncountable/types/recipe_inputs_t.py +30 -0
  108. uncountable/types/recipe_links.py +4 -45
  109. uncountable/types/recipe_links_t.py +50 -0
  110. uncountable/types/recipe_metadata.py +5 -47
  111. uncountable/types/recipe_metadata_t.py +52 -0
  112. uncountable/types/recipe_output_metadata.py +3 -19
  113. uncountable/types/recipe_output_metadata_t.py +24 -0
  114. uncountable/types/recipe_tags.py +3 -18
  115. uncountable/types/recipe_tags_t.py +23 -0
  116. uncountable/types/recipe_workflow_steps.py +9 -83
  117. uncountable/types/recipe_workflow_steps_t.py +88 -0
  118. uncountable/types/recipes.py +3 -16
  119. uncountable/types/recipes_t.py +21 -0
  120. uncountable/types/response.py +3 -20
  121. uncountable/types/response_t.py +25 -0
  122. uncountable/types/units.py +3 -18
  123. uncountable/types/units_t.py +23 -0
  124. uncountable/types/users.py +3 -19
  125. uncountable/types/users_t.py +24 -0
  126. uncountable/types/workflows.py +4 -27
  127. uncountable/types/workflows_t.py +32 -0
  128. UncountablePythonSDK-0.0.38.dist-info/RECORD +0 -191
  129. {UncountablePythonSDK-0.0.38.dist-info → UncountablePythonSDK-0.0.40.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import base as base_t
12
- from ... import recipe_metadata as recipe_metadata_t
11
+ from ... import base_t
12
+ from ... import recipe_metadata_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import async_batch as async_batch_t
12
- from ... import identifier as identifier_t
11
+ from ... import async_batch_t
12
+ from ... import identifier_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -11,9 +11,9 @@ from pkgs.strenum_compat import StrEnum
11
11
  from dataclasses import dataclass
12
12
  from pkgs.serialization import serial_class
13
13
  from pkgs.serialization import serial_union_annotation
14
- from ... import identifier as identifier_t
15
- from ... import recipe_inputs as recipe_inputs_t
16
- from ... import recipe_workflow_steps as recipe_workflow_steps_t
14
+ from ... import identifier_t
15
+ from ... import recipe_inputs_t
16
+ from ... import recipe_workflow_steps_t
17
17
 
18
18
  __all__: list[str] = [
19
19
  "AnnotationEdit",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import base as base_t
12
- from ... import curves as curves_t
11
+ from ... import base_t
12
+ from ... import curves_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,8 +9,8 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
11
  from pkgs.serialization import serial_class
12
- from ... import base as base_t
13
- from ... import calculations as calculations_t
12
+ from ... import base_t
13
+ from ... import calculations_t
14
14
 
15
15
  __all__: list[str] = [
16
16
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import base as base_t
12
- from ... import recipe_links as recipe_links_t
11
+ from ... import base_t
12
+ from ... import recipe_links_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,7 +8,7 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import base as base_t
11
+ from ... import base_t
12
12
 
13
13
  __all__: list[str] = [
14
14
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,8 +9,8 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
11
  from pkgs.serialization import serial_class
12
- from ... import base as base_t
13
- from ... import recipe_output_metadata as recipe_output_metadata_t
12
+ from ... import base_t
13
+ from ... import recipe_output_metadata_t
14
14
 
15
15
  __all__: list[str] = [
16
16
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,13 +9,13 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
11
  from pkgs.serialization import serial_class
12
- from ... import base as base_t
13
- from ... import experiment_groups as experiment_groups_t
14
- from ... import inputs as inputs_t
15
- from ... import outputs as outputs_t
16
- from ... import recipe_metadata as recipe_metadata_t
17
- from ... import recipe_tags as recipe_tags_t
18
- from ... import workflows as workflows_t
12
+ from ... import base_t
13
+ from ... import experiment_groups_t
14
+ from ... import inputs_t
15
+ from ... import outputs_t
16
+ from ... import recipe_metadata_t
17
+ from ... import recipe_tags_t
18
+ from ... import workflows_t
19
19
 
20
20
  __all__: list[str] = [
21
21
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,7 +9,7 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from pkgs.strenum_compat import StrEnum
11
11
  from dataclasses import dataclass
12
- from ... import identifier as identifier_t
12
+ from ... import identifier_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,7 +8,7 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import identifier as identifier_t
11
+ from ... import identifier_t
12
12
 
13
13
  __all__: list[str] = [
14
14
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,7 +9,7 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
11
  from pkgs.serialization import serial_class
12
- from ... import base as base_t
12
+ from ... import base_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import identifier as identifier_t
12
- from ... import recipe_metadata as recipe_metadata_t
11
+ from ... import identifier_t
12
+ from ... import recipe_metadata_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -11,8 +11,8 @@ from pkgs.strenum_compat import StrEnum
11
11
  from dataclasses import dataclass
12
12
  from pkgs.serialization import serial_class
13
13
  from pkgs.serialization import serial_union_annotation
14
- from ... import base as base_t
15
- from ... import identifier as identifier_t
14
+ from ... import base_t
15
+ from ... import identifier_t
16
16
 
17
17
  __all__: list[str] = [
18
18
  "AnnotationEdit",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,9 +9,9 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
11
  from pkgs.serialization import serial_class
12
- from ... import base as base_t
13
- from ... import recipes as recipes_t
14
- from ... import response as response_t
12
+ from ... import base_t
13
+ from ... import recipes_t
14
+ from ... import response_t
15
15
 
16
16
  __all__: list[str] = [
17
17
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -10,8 +10,8 @@ from decimal import Decimal # noqa: F401
10
10
  from pkgs.strenum_compat import StrEnum
11
11
  from dataclasses import dataclass
12
12
  from pkgs.serialization import serial_class
13
- from ... import base as base_t
14
- from ... import identifier as identifier_t
13
+ from ... import base_t
14
+ from ... import identifier_t
15
15
 
16
16
  __all__: list[str] = [
17
17
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,7 +8,7 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import identifier as identifier_t
11
+ from ... import identifier_t
12
12
 
13
13
  __all__: list[str] = [
14
14
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -9,7 +9,7 @@ import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from pkgs.strenum_compat import StrEnum
11
11
  from dataclasses import dataclass
12
- from ... import identifier as identifier_t
12
+ from ... import identifier_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  from __future__ import annotations
@@ -8,8 +8,8 @@ import typing # noqa: F401
8
8
  import datetime # noqa: F401
9
9
  from decimal import Decimal # noqa: F401
10
10
  from dataclasses import dataclass
11
- from ... import entity as entity_t
12
- from ... import response as response_t
11
+ from ... import entity_t
12
+ from ... import response_t
13
13
 
14
14
  __all__: list[str] = [
15
15
  "Arguments",
@@ -1,58 +1,11 @@
1
- # DO NOT MODIFY -- This file is generated by type_spec
2
1
  # flake8: noqa: F821
3
- # ruff: noqa: E402
2
+ # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
6
- from __future__ import annotations
7
- import typing # noqa: F401
8
- import datetime # noqa: F401
9
- from decimal import Decimal # noqa: F401
10
- from pkgs.strenum_compat import StrEnum
11
- from dataclasses import dataclass
12
- from pkgs.serialization import serial_class
13
- from . import base as base_t
14
-
15
- __all__: list[str] = [
16
- "AsyncBatchActionReturn",
17
- "AsyncBatchRequest",
18
- "AsyncBatchRequestPath",
19
- "QueuedAsyncBatchRequest",
20
- ]
21
-
22
-
23
- # DO NOT MODIFY -- This file is generated by type_spec
24
- class AsyncBatchRequestPath(StrEnum):
25
- CREATE_RECIPE = "recipes/create_recipe"
26
- SET_RECIPE_METADATA = "recipes/set_recipe_metadata"
27
- SET_RECIPE_TAGS = "recipes/set_recipe_tags"
28
- EDIT_RECIPE_INPUTS = "recipes/edit_recipe_inputs"
29
- ARCHIVE_RECIPES = "recipes/archive"
30
- LOCK_RECIPES = "recipes/lock_recipes"
31
- UNLOCK_RECIPES = "recipes/unlock_recipes"
32
-
33
-
34
- # DO NOT MODIFY -- This file is generated by type_spec
35
- @serial_class(
36
- unconverted_values={"data"},
37
- )
38
- @dataclass(kw_only=True)
39
- class AsyncBatchRequest:
40
- path: AsyncBatchRequestPath
41
- data: base_t.JsonValue
42
- batch_reference: str
43
- depends_on: typing.Optional[list[str]] = None
44
-
45
-
46
- # DO NOT MODIFY -- This file is generated by type_spec
47
- @dataclass(kw_only=True)
48
- class AsyncBatchActionReturn:
49
- modification_made: bool
50
- result_id: typing.Optional[base_t.ObjectId] = None
51
-
52
-
53
5
  # DO NOT MODIFY -- This file is generated by type_spec
54
- @dataclass(kw_only=True, frozen=True, eq=True)
55
- class QueuedAsyncBatchRequest:
56
- path: AsyncBatchRequestPath
57
- batch_reference: str
6
+ # Kept only for SDK backwards compatibility
7
+ from .async_batch_t import AsyncBatchRequestPath as AsyncBatchRequestPath
8
+ from .async_batch_t import AsyncBatchRequest as AsyncBatchRequest
9
+ from .async_batch_t import AsyncBatchActionReturn as AsyncBatchActionReturn
10
+ from .async_batch_t import QueuedAsyncBatchRequest as QueuedAsyncBatchRequest
58
11
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,6 +1,6 @@
1
1
  # DO NOT MODIFY -- This file is generated by type_spec
2
2
  # flake8: noqa: F821
3
- # ruff: noqa: E402
3
+ # ruff: noqa: E402 Q003
4
4
  # fmt: off
5
5
  # isort: skip_file
6
6
  # ruff: noqa: PLR0904
@@ -8,14 +8,15 @@ from __future__ import annotations
8
8
  import typing # noqa: F401
9
9
  import datetime # noqa: F401
10
10
  from decimal import Decimal # noqa: F401
11
- from uncountable.types import async_batch as async_batch_t
12
- from uncountable.types import base as base_t
11
+ import uncountable.types.api.equipment.associate_equipment_input as associate_equipment_input_t
12
+ from uncountable.types import async_batch_t
13
+ from uncountable.types import base_t
13
14
  import uncountable.types.api.recipes.create_recipe as create_recipe_t
14
15
  import uncountable.types.api.recipes.edit_recipe_inputs as edit_recipe_inputs_t
15
- from uncountable.types import identifier as identifier_t
16
- from uncountable.types import recipe_identifiers as recipe_identifiers_t
17
- from uncountable.types import recipe_metadata as recipe_metadata_t
18
- from uncountable.types import recipe_workflow_steps as recipe_workflow_steps_t
16
+ from uncountable.types import identifier_t
17
+ from uncountable.types import recipe_identifiers_t
18
+ from uncountable.types import recipe_metadata_t
19
+ from uncountable.types import recipe_workflow_steps_t
19
20
  import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
20
21
  import uuid
21
22
  from abc import ABC, abstractmethod
@@ -31,6 +32,41 @@ class AsyncBatchProcessorBase(ABC):
31
32
  def send(self) -> base_t.ObjectId:
32
33
  ...
33
34
 
35
+ def associate_equipment_input(
36
+ self,
37
+ *,
38
+ equipment_key: identifier_t.IdentifierKey,
39
+ material_family_ids: list[base_t.ObjectId],
40
+ depends_on: typing.Optional[list[str]] = None,
41
+ ) -> async_batch_t.QueuedAsyncBatchRequest:
42
+ """Create or return the input association for equipment
43
+
44
+ :param equipment_key: Identifier of the equipment to associate
45
+ :param material_family_ids: The list of material families to add the input to. This must be non-empty
46
+ :param depends_on: A list of batch reference keys to process before processing this request
47
+ """
48
+ args = associate_equipment_input_t.Arguments(
49
+ equipment_key=equipment_key,
50
+ material_family_ids=material_family_ids,
51
+ )
52
+ json_data = serialize_for_api(args)
53
+
54
+ batch_reference = str(uuid.uuid4())
55
+
56
+ req = async_batch_t.AsyncBatchRequest(
57
+ path=async_batch_t.AsyncBatchRequestPath.ASSOCIATE_EQUIPMENT_INPUT,
58
+ data=json_data,
59
+ depends_on=depends_on,
60
+ batch_reference=batch_reference,
61
+ )
62
+
63
+ self._enqueue(req)
64
+
65
+ return async_batch_t.QueuedAsyncBatchRequest(
66
+ path=req.path,
67
+ batch_reference=req.batch_reference,
68
+ )
69
+
34
70
  def create_recipe(
35
71
  self,
36
72
  *,
@@ -0,0 +1,59 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402 Q003
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ from dataclasses import dataclass
12
+ from pkgs.serialization import serial_class
13
+ from . import base_t
14
+
15
+ __all__: list[str] = [
16
+ "AsyncBatchActionReturn",
17
+ "AsyncBatchRequest",
18
+ "AsyncBatchRequestPath",
19
+ "QueuedAsyncBatchRequest",
20
+ ]
21
+
22
+
23
+ # DO NOT MODIFY -- This file is generated by type_spec
24
+ class AsyncBatchRequestPath(StrEnum):
25
+ CREATE_RECIPE = "recipes/create_recipe"
26
+ SET_RECIPE_METADATA = "recipes/set_recipe_metadata"
27
+ SET_RECIPE_TAGS = "recipes/set_recipe_tags"
28
+ EDIT_RECIPE_INPUTS = "recipes/edit_recipe_inputs"
29
+ ARCHIVE_RECIPES = "recipes/archive"
30
+ LOCK_RECIPES = "recipes/lock_recipes"
31
+ UNLOCK_RECIPES = "recipes/unlock_recipes"
32
+ ASSOCIATE_EQUIPMENT_INPUT = "equipment/associate_equipment_input"
33
+
34
+
35
+ # DO NOT MODIFY -- This file is generated by type_spec
36
+ @serial_class(
37
+ unconverted_values={"data"},
38
+ )
39
+ @dataclass(kw_only=True)
40
+ class AsyncBatchRequest:
41
+ path: AsyncBatchRequestPath
42
+ data: base_t.JsonValue
43
+ batch_reference: str
44
+ depends_on: typing.Optional[list[str]] = None
45
+
46
+
47
+ # DO NOT MODIFY -- This file is generated by type_spec
48
+ @dataclass(kw_only=True)
49
+ class AsyncBatchActionReturn:
50
+ modification_made: bool
51
+ result_id: typing.Optional[base_t.ObjectId] = None
52
+
53
+
54
+ # DO NOT MODIFY -- This file is generated by type_spec
55
+ @dataclass(kw_only=True, frozen=True, eq=True)
56
+ class QueuedAsyncBatchRequest:
57
+ path: AsyncBatchRequestPath
58
+ batch_reference: str
59
+ # DO NOT MODIFY -- This file is generated by type_spec
uncountable/types/base.py CHANGED
@@ -1,85 +1,11 @@
1
- # DO NOT MODIFY -- This file is generated by type_spec
2
1
  # flake8: noqa: F821
3
- # ruff: noqa: E402
2
+ # ruff: noqa: E402 Q003
4
3
  # fmt: off
5
4
  # isort: skip_file
6
- from __future__ import annotations
7
- import typing # noqa: F401
8
- import datetime # noqa: F401
9
- from decimal import Decimal # noqa: F401
10
-
11
- __all__: list[str] = [
12
- "JsonScalar",
13
- "JsonValue",
14
- "ObjectId",
15
- ]
16
5
  # DO NOT MODIFY -- This file is generated by type_spec
17
- # === START section from base.prepart.py ===
18
- """
19
- Types that type_spec will use in the emitted files.
20
- """
21
- from typing import Union, Any, TYPE_CHECKING
22
- from collections.abc import Mapping, Sequence
23
-
24
- # These two are part of the core output, thus don't duplicate here
25
- # from decimal import Decimal
26
- # import datetime
27
-
28
- # Decimal/datetime are included as this list includes JSON serializable objects
29
- # It is preferred to use ExtJsonScalar and leave JsonScalar as deprecated, as
30
- # a type that we intend on migrating.
31
- JsonScalar = Union[str, float, bool, Decimal, None, datetime.datetime, datetime.date]
32
- ExtJsonScalar = JsonScalar
33
-
34
- # PureJsonScalar/PureJsonValue should be used in places where the type
35
- # is expected to already serialized and not expecting any high-order types.
36
- # this type is fully representable in the JSON format, and in JavaScript
37
- PureJsonScalar = Union[str, float, bool, None]
38
-
39
- # Regular expressions for identifying ref names and IDs. Ref names should be
40
- # using this regular expression as a constriant in the database.
41
- REF_NAME_REGEX = r"^[a-zA-Z0-9_/-]+$"
42
- # Does not support nonpositive integers at the moment.
43
- ID_REGEX = r"[1-9][0-9]{0,20}"
44
-
45
-
46
- if TYPE_CHECKING:
47
- JsonValue = Union[JsonScalar, Mapping[str, "JsonValue"], Sequence["JsonValue"]]
48
- ExtJsonValue = JsonValue
49
- PureJsonValue = Union[
50
- PureJsonScalar,
51
- Mapping[str, "PureJsonValue"],
52
- Sequence["PureJsonValue"]
53
- ]
54
- else:
55
- JsonValue = Union[JsonScalar, dict[str, Any], list[Any]]
56
- ExtJsonValue = JsonValue
57
- PureJsonValue = Union[PureJsonScalar, dict[str, Any], list[Any]]
58
-
59
- ObjectId = int
60
-
61
-
62
- def is_pure_json_value(value: ExtJsonValue) -> bool:
63
- """
64
- Checks if the runtime type of value is a PureJsonValue.
65
- """
66
- if value is None:
67
- return True
68
- if isinstance(value, (int, float, bool, str)):
69
- return True
70
-
71
- if isinstance(value, list):
72
- for item in value:
73
- if not is_pure_json_value(item):
74
- return False
75
- return True
76
-
77
- if isinstance(value, dict):
78
- for key, item in value.items():
79
- if not is_pure_json_value(key) or not is_pure_json_value(item):
80
- return False
81
- return True
6
+ # Kept only for SDK backwards compatibility
82
7
 
83
- return False
84
- # === END section from base.prepart.py ===
8
+ from .base_t import JsonScalar as JsonScalar
9
+ from .base_t import JsonValue as JsonValue
10
+ from .base_t import ObjectId as ObjectId
85
11
  # DO NOT MODIFY -- This file is generated by type_spec