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
@@ -0,0 +1,85 @@
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
+
11
+ __all__: list[str] = [
12
+ "JsonScalar",
13
+ "JsonValue",
14
+ "ObjectId",
15
+ ]
16
+ # 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
82
+
83
+ return False
84
+ # === END section from base.prepart.py ===
85
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,23 +1,8 @@
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 dataclasses import dataclass
11
- from . import base as base_t
12
-
13
- __all__: list[str] = [
14
- "Calculation",
15
- ]
16
-
17
-
18
5
  # DO NOT MODIFY -- This file is generated by type_spec
19
- @dataclass(kw_only=True)
20
- class Calculation:
21
- id: base_t.ObjectId
22
- name: str
6
+ # Kept only for SDK backwards compatibility
7
+ from .calculations_t import Calculation as Calculation
23
8
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,23 @@
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 dataclasses import dataclass
11
+ from . import base_t
12
+
13
+ __all__: list[str] = [
14
+ "Calculation",
15
+ ]
16
+
17
+
18
+ # DO NOT MODIFY -- This file is generated by type_spec
19
+ @dataclass(kw_only=True)
20
+ class Calculation:
21
+ id: base_t.ObjectId
22
+ name: str
23
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,27 +1,8 @@
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 dataclasses import dataclass
11
- from pkgs.serialization import serial_class
12
-
13
- __all__: list[str] = [
14
- "ChemicalStructure",
15
- ]
16
-
17
-
18
5
  # DO NOT MODIFY -- This file is generated by type_spec
19
- @serial_class(
20
- to_string_values={"molecular_weight"},
21
- )
22
- @dataclass(kw_only=True)
23
- class ChemicalStructure:
24
- ketcher_file: typing.Optional[str] = None
25
- gross_formula: typing.Optional[str] = None
26
- molecular_weight: typing.Optional[Decimal] = None
6
+ # Kept only for SDK backwards compatibility
7
+ from .chemical_structure_t import ChemicalStructure as ChemicalStructure
27
8
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,27 @@
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 dataclasses import dataclass
11
+ from pkgs.serialization import serial_class
12
+
13
+ __all__: list[str] = [
14
+ "ChemicalStructure",
15
+ ]
16
+
17
+
18
+ # DO NOT MODIFY -- This file is generated by type_spec
19
+ @serial_class(
20
+ to_string_values={"molecular_weight"},
21
+ )
22
+ @dataclass(kw_only=True)
23
+ class ChemicalStructure:
24
+ ketcher_file: typing.Optional[str] = None
25
+ gross_formula: typing.Optional[str] = None
26
+ molecular_weight: typing.Optional[Decimal] = None
27
+ # 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
@@ -11,10 +11,11 @@ from decimal import Decimal # noqa: F401
11
11
  from pkgs.serialization import OpaqueKey
12
12
  import uncountable.types.api.recipes.add_recipe_to_project as add_recipe_to_project_t
13
13
  import uncountable.types.api.recipes.archive_recipes as archive_recipes_t
14
+ import uncountable.types.api.equipment.associate_equipment_input as associate_equipment_input_t
14
15
  import uncountable.types.api.recipes.associate_recipe_as_input as associate_recipe_as_input_t
15
16
  import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe_as_lot_t
16
- from uncountable.types import async_batch as async_batch_t
17
- from uncountable.types import base as base_t
17
+ from uncountable.types import async_batch_t
18
+ from uncountable.types import base_t
18
19
  import uncountable.types.api.chemical.convert_chemical_formats as convert_chemical_formats_t
19
20
  import uncountable.types.api.entity.create_entities as create_entities_t
20
21
  import uncountable.types.api.entity.create_entity as create_entity_t
@@ -24,10 +25,10 @@ import uncountable.types.api.recipe_links.create_recipe_link as create_recipe_li
24
25
  import uncountable.types.api.recipes.create_recipes as create_recipes_t
25
26
  import uncountable.types.api.recipes.disassociate_recipe_as_input as disassociate_recipe_as_input_t
26
27
  import uncountable.types.api.recipes.edit_recipe_inputs as edit_recipe_inputs_t
27
- from uncountable.types import entity as entity_t
28
+ from uncountable.types import entity_t
28
29
  import uncountable.types.api.batch.execute_batch as execute_batch_t
29
30
  import uncountable.types.api.batch.execute_batch_load_async as execute_batch_load_async_t
30
- from uncountable.types import field_values as field_values_t
31
+ from uncountable.types import field_values_t
31
32
  import uncountable.types.api.recipes.get_curve as get_curve_t
32
33
  import uncountable.types.api.entity.get_entities_data as get_entities_data_t
33
34
  import uncountable.types.api.inputs.get_input_data as get_input_data_t
@@ -44,19 +45,19 @@ import uncountable.types.api.recipe_metadata.get_recipe_metadata_data as get_rec
44
45
  import uncountable.types.api.recipes.get_recipe_names as get_recipe_names_t
45
46
  import uncountable.types.api.recipes.get_recipe_output_metadata as get_recipe_output_metadata_t
46
47
  import uncountable.types.api.recipes.get_recipes_data as get_recipes_data_t
47
- from uncountable.types import id_source as id_source_t
48
- from uncountable.types import identifier as identifier_t
48
+ from uncountable.types import id_source_t
49
+ from uncountable.types import identifier_t
49
50
  import uncountable.types.api.entity.list_entities as list_entities_t
50
51
  import uncountable.types.api.id_source.list_id_source as list_id_source_t
51
52
  import uncountable.types.api.entity.lock_entity as lock_entity_t
52
53
  import uncountable.types.api.recipes.lock_recipes as lock_recipes_t
53
54
  import uncountable.types.api.id_source.match_id_source as match_id_source_t
54
- from uncountable.types import permissions as permissions_t
55
- from uncountable.types import post_base as post_base_t
56
- from uncountable.types import recipe_identifiers as recipe_identifiers_t
57
- from uncountable.types import recipe_links as recipe_links_t
58
- from uncountable.types import recipe_metadata as recipe_metadata_t
59
- from uncountable.types import recipe_workflow_steps as recipe_workflow_steps_t
55
+ from uncountable.types import permissions_t
56
+ from uncountable.types import post_base_t
57
+ from uncountable.types import recipe_identifiers_t
58
+ from uncountable.types import recipe_links_t
59
+ from uncountable.types import recipe_metadata_t
60
+ from uncountable.types import recipe_workflow_steps_t
60
61
  import uncountable.types.api.recipes.remove_recipe_from_project as remove_recipe_from_project_t
61
62
  import uncountable.types.api.recipe_links.remove_recipe_link as remove_recipe_link_t
62
63
  import uncountable.types.api.entity.resolve_entity_ids as resolve_entity_ids_t
@@ -142,6 +143,28 @@ class ClientMethods(ABC):
142
143
  )
143
144
  return self.do_request(api_request=api_request, return_type=archive_recipes_t.Data)
144
145
 
146
+ def associate_equipment_input(
147
+ self,
148
+ *,
149
+ equipment_key: identifier_t.IdentifierKey,
150
+ material_family_ids: list[base_t.ObjectId],
151
+ ) -> associate_equipment_input_t.Data:
152
+ """Create or return the input association for equipment
153
+
154
+ :param equipment_key: Identifier of the equipment to associate
155
+ :param material_family_ids: The list of material families to add the input to. This must be non-empty
156
+ """
157
+ args = associate_equipment_input_t.Arguments(
158
+ equipment_key=equipment_key,
159
+ material_family_ids=material_family_ids,
160
+ )
161
+ api_request = APIRequest(
162
+ method=associate_equipment_input_t.ENDPOINT_METHOD,
163
+ endpoint=associate_equipment_input_t.ENDPOINT_PATH,
164
+ args=args,
165
+ )
166
+ return self.do_request(api_request=api_request, return_type=associate_equipment_input_t.Data)
167
+
145
168
  def associate_recipe_as_input(
146
169
  self,
147
170
  *,
@@ -1,47 +1,10 @@
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
- "Curve",
17
- "CurveAxisType",
18
- "CurveValue",
19
- ]
20
-
21
-
22
- # DO NOT MODIFY -- This file is generated by type_spec
23
- class CurveAxisType(StrEnum):
24
- NUMERIC = "numeric"
25
- TIMESTAMP = "timestamp"
26
-
27
-
28
- # DO NOT MODIFY -- This file is generated by type_spec
29
- @dataclass(kw_only=True)
30
- class Curve:
31
- id: base_t.ObjectId
32
- x_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC], typing.Literal[CurveAxisType.TIMESTAMP]]
33
- x_values: list[CurveValue]
34
- y_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC]]
35
- y_values: list[CurveValue]
36
-
37
-
38
5
  # DO NOT MODIFY -- This file is generated by type_spec
39
- @serial_class(
40
- to_string_values={"quantity"},
41
- )
42
- @dataclass(kw_only=True)
43
- class CurveValue:
44
- index: int
45
- quantity: typing.Optional[Decimal] = None
46
- quantity_timestamp: typing.Optional[datetime.datetime] = None
6
+ # Kept only for SDK backwards compatibility
7
+ from .curves_t import CurveAxisType as CurveAxisType
8
+ from .curves_t import Curve as Curve
9
+ from .curves_t import CurveValue as CurveValue
47
10
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,47 @@
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
+ "Curve",
17
+ "CurveAxisType",
18
+ "CurveValue",
19
+ ]
20
+
21
+
22
+ # DO NOT MODIFY -- This file is generated by type_spec
23
+ class CurveAxisType(StrEnum):
24
+ NUMERIC = "numeric"
25
+ TIMESTAMP = "timestamp"
26
+
27
+
28
+ # DO NOT MODIFY -- This file is generated by type_spec
29
+ @dataclass(kw_only=True)
30
+ class Curve:
31
+ id: base_t.ObjectId
32
+ x_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC], typing.Literal[CurveAxisType.TIMESTAMP]]
33
+ x_values: list[CurveValue]
34
+ y_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC]]
35
+ y_values: list[CurveValue]
36
+
37
+
38
+ # DO NOT MODIFY -- This file is generated by type_spec
39
+ @serial_class(
40
+ to_string_values={"quantity"},
41
+ )
42
+ @dataclass(kw_only=True)
43
+ class CurveValue:
44
+ index: int
45
+ quantity: typing.Optional[Decimal] = None
46
+ quantity_timestamp: typing.Optional[datetime.datetime] = None
47
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -1,274 +1,9 @@
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_string_enum
13
- from . import base as base_t
14
-
15
- __all__: list[str] = [
16
- "Entity",
17
- "EntityType",
18
- ]
19
-
20
-
21
- # DO NOT MODIFY -- This file is generated by type_spec
22
- @serial_string_enum(
23
- labels={
24
- "analytical_method": "Analytical Method",
25
- "analytical_method_category": "Analytical Method Category",
26
- "annotation_type": "Annotation Type",
27
- "approval": "Approval",
28
- "calculation": "Calculation",
29
- "calendar": "Calendar",
30
- "calendar_event": "Calendar Event",
31
- "certification": "Certification",
32
- "comment": "Comment",
33
- "comment_thread": "Comment Thread",
34
- "condition_parameter": "Condition Parameter",
35
- "condition_parameter_mat_family": "Condition Parameter Material Family",
36
- "constraint": "Constraint",
37
- "constraint_set": "Constraint Set",
38
- "curve_settings": "Curve Settings",
39
- "custom_entity": "Custom Entity",
40
- "doe_run": "Suggest Experiments",
41
- "entities_viewed": "Entities Viewed",
42
- "entity_field": "Field",
43
- "entity_field_audit_log": "Entity Field Audit Log",
44
- "entity_phase_event": "Entity Phase Event",
45
- "entity_tag": "Entity Tag",
46
- "equipment": "Equipment",
47
- "equipment_type": "Equipment Type",
48
- "experiment_group": "Experiment Group",
49
- "experiment_group_type": "Experiment Group Type",
50
- "favorite_link": "Favorite Link",
51
- "field_option_set": "Field Option Set",
52
- "file_folder": "File Folder",
53
- "file_folder_membership": "File Folder Membership",
54
- "goal": "Goal",
55
- "ingredient": "Ingredient",
56
- "ingredient_attribute": "Ingredient Attribute",
57
- "ingredient_attribute_category": "Ingredient Attribute Category",
58
- "ingredient_category": "Ingredient Category",
59
- "ingredient_category_all": "Ingredient Category",
60
- "ingredient_lot": "Ingredient Lot",
61
- "ingredient_role": "Ingredient Role",
62
- "ingredient_tag": "Ingredient Subcategory",
63
- "input_group": "Input Group",
64
- "inv_local_locations": "Inventory Location",
65
- "inventory_amount": "Inventory Amount",
66
- "lab_location": "Lab Location",
67
- "lab_request": "Lab Request",
68
- "license": "License",
69
- "maintenance_schedule": "Maintenance Schedule",
70
- "material_family": "Material Family",
71
- "ml_job": "Batch Processing Job",
72
- "naming_scheme": "Naming Scheme",
73
- "naming_counter": "Naming Counter",
74
- "notebook": "Notebook",
75
- "notebook_cell": "Notebook Cell",
76
- "output": "Output",
77
- "output_calculation_entity_mapping": "Output Calculation Entity Mapping",
78
- "output_category_all": "Output Category",
79
- "output_condition": "Output Condition",
80
- "output_default_condition": "Output Default Condition",
81
- "output_condition_parameter": "Output Condition Parameter",
82
- "output_condition_parameter_analytical_method_category": "Output Condition Parameter Analytical Method Category",
83
- "output_condition_parameter_analytical_method": "Output Condition Parameter Analytical Method",
84
- "output_group": "Output Group",
85
- "recipe_output_metadata": "Recipe Output Metadata",
86
- "permission": "Permission",
87
- "phase_workflow": "Phase Workflow",
88
- "predictive_model": "Predictive Model",
89
- "product": "Product",
90
- "project": "Project",
91
- "recipe": "Experiment",
92
- "recipe_calculation": "Recipe Calculation",
93
- "recipe_permission_view": "Recipe Permission View",
94
- "recipe_project": "Recipe Project",
95
- "recipe_check": "Experiment Check",
96
- "recipe_export": "Recipe Export",
97
- "recipe_ingredients_compounded": "Recipe Ingredients Compounded",
98
- "recipe_ingredients_compounded_calculation": "Recipe Ingredients Compounded Caclulation",
99
- "recipe_step": "Recipe Step",
100
- "recipe_tag": "Recipe Tag",
101
- "recipe_metadata": "Experiment Metadata",
102
- "review": "Review",
103
- "review_entity_user_status": "Review Entity User Status",
104
- "review_user": "Review User",
105
- "rlw_phase": "Phase",
106
- "rlw_trigger_set": "Trigger Set",
107
- "safety_data_sheet": "Safety Data Sheet",
108
- "scheduled_notification": "Scheduled Notification",
109
- "specs": "Spec",
110
- "split_template": "Split Template",
111
- "structured_loading_user_config": "List Config",
112
- "task": "Task",
113
- "task_board": "Task Board",
114
- "template": "Template",
115
- "timesheet_entry": "Timesheet Entry",
116
- "training_run": "Analyze Experiment",
117
- "training_set": "Training Set",
118
- "time_series": "Time Series",
119
- "units": "Units",
120
- "user_favorite": "User Favorite",
121
- "user": "User",
122
- "user_certification": "User Certification",
123
- "user_group": "User Group",
124
- "user_list_set": "User List Set",
125
- "webhook": "Webhook",
126
- "webhook_event": "Webhook Event",
127
- "workflow": "Workflow",
128
- "workflow_step": "Workflow Step",
129
- "workflow_variant": "Workflow Variant",
130
- "platform_notification": "Platform Notification",
131
- "inventory_location_type": "Inventory Location Type",
132
- "entity_definition": "Entity Definition",
133
- "phase_transition": "Phase Transition",
134
- "public_data_entity_link": "Public Data Entity Link",
135
- "public_data_sourced_output": "ChemQuery Property",
136
- "public_data_sourced_project": "ChemQuery Category",
137
- "public_data_sourced_recipe": "ChemQuery Product",
138
- "public_data_sourced_recipe_project": "ChemQuery Product Category",
139
- "public_data_sourced_recipe_metadata": "ChemQuery Product Information",
140
- "public_data_sourced_units": "ChemQuery Units",
141
- "public_data_sourced_condition_parameter": "ChemQuery Condition Parameter",
142
- "public_data_sourced_company": "ChemQuery Company",
143
- "uploader": "Uploader",
144
- },
145
- )
146
- class EntityType(StrEnum):
147
- ANALYTICAL_METHOD = "analytical_method"
148
- ANALYTICAL_METHOD_CATEGORY = "analytical_method_category"
149
- ANNOTATION_TYPE = "annotation_type"
150
- APPROVAL = "approval"
151
- CALCULATION = "calculation"
152
- CALENDAR = "calendar"
153
- CALENDAR_EVENT = "calendar_event"
154
- CERTIFICATION = "certification"
155
- COMMENT = "comment"
156
- COMMENT_THREAD = "comment_thread"
157
- CONDITION_PARAMETER = "condition_parameter"
158
- CONDITION_PARAMETER_MAT_FAMILY = "condition_parameter_mat_family"
159
- CONSTRAINT = "constraint"
160
- CONSTRAINT_SET = "constraint_set"
161
- CURVE_SETTINGS = "curve_settings"
162
- CUSTOM_ENTITY = "custom_entity"
163
- DOE_RUN = "doe_run"
164
- ENTITIES_VIEWED = "entities_viewed"
165
- ENTITY_FIELD = "entity_field"
166
- ENTITY_FIELD_AUDIT_LOG = "entity_field_audit_log"
167
- ENTITY_PHASE_EVENT = "entity_phase_event"
168
- ENTITY_TAG = "entity_tag"
169
- EQUIPMENT = "equipment"
170
- EQUIPMENT_TYPE = "equipment_type"
171
- EXPERIMENT_GROUP = "experiment_group"
172
- EXPERIMENT_GROUP_TYPE = "experiment_group_type"
173
- FAVORITE_LINK = "favorite_link"
174
- FIELD_OPTION_SET = "field_option_set"
175
- FILE_FOLDER = "file_folder"
176
- FILE_FOLDER_MEMBERSHIP = "file_folder_membership"
177
- GOAL = "goal"
178
- INGREDIENT = "ingredient"
179
- INGREDIENT_ATTRIBUTE = "ingredient_attribute"
180
- INGREDIENT_ATTRIBUTE_CATEGORY = "ingredient_attribute_category"
181
- INGREDIENT_CATEGORY = "ingredient_category"
182
- INGREDIENT_CATEGORY_ALL = "ingredient_category_all"
183
- INGREDIENT_LOT = "ingredient_lot"
184
- INGREDIENT_ROLE = "ingredient_role"
185
- INGREDIENT_TAG = "ingredient_tag"
186
- INPUT_GROUP = "input_group"
187
- INV_LOCAL_LOCATIONS = "inv_local_locations"
188
- INVENTORY_AMOUNT = "inventory_amount"
189
- LAB_LOCATION = "lab_location"
190
- LAB_REQUEST = "lab_request"
191
- LICENSE = "license"
192
- MAINTENANCE_SCHEDULE = "maintenance_schedule"
193
- MATERIAL_FAMILY = "material_family"
194
- ML_JOB = "ml_job"
195
- NAMING_SCHEME = "naming_scheme"
196
- NAMING_COUNTER = "naming_counter"
197
- NOTEBOOK = "notebook"
198
- NOTEBOOK_CELL = "notebook_cell"
199
- OUTPUT = "output"
200
- OUTPUT_CALCULATION_ENTITY_MAPPING = "output_calculation_entity_mapping"
201
- OUTPUT_CATEGORY_ALL = "output_category_all"
202
- OUTPUT_CONDITION = "output_condition"
203
- OUTPUT_DEFAULT_CONDITION = "output_default_condition"
204
- OUTPUT_CONDITION_PARAMETER = "output_condition_parameter"
205
- OUTPUT_CONDITION_PARAMETER_ANALYTICAL_METHOD_CATEGORY = "output_condition_parameter_analytical_method_category"
206
- OUTPUT_CONDITION_PARAMETER_ANALYTICAL_METHOD = "output_condition_parameter_analytical_method"
207
- OUTPUT_GROUP = "output_group"
208
- RECIPE_OUTPUT_METADATA = "recipe_output_metadata"
209
- PERMISSION = "permission"
210
- PHASE_WORKFLOW = "phase_workflow"
211
- PREDICTIVE_MODEL = "predictive_model"
212
- PRODUCT = "product"
213
- PROJECT = "project"
214
- RECIPE = "recipe"
215
- RECIPE_CALCULATION = "recipe_calculation"
216
- RECIPE_PERMISSION_VIEW = "recipe_permission_view"
217
- RECIPE_PROJECT = "recipe_project"
218
- RECIPE_CHECK = "recipe_check"
219
- RECIPE_EXPORT = "recipe_export"
220
- RECIPE_INGREDIENTS_COMPOUNDED = "recipe_ingredients_compounded"
221
- RECIPE_INGREDIENTS_COMPOUNDED_CALCULATION = "recipe_ingredients_compounded_calculation"
222
- RECIPE_STEP = "recipe_step"
223
- RECIPE_TAG = "recipe_tag"
224
- RECIPE_METADATA = "recipe_metadata"
225
- REVIEW = "review"
226
- REVIEW_ENTITY_USER_STATUS = "review_entity_user_status"
227
- REVIEW_USER = "review_user"
228
- RLW_PHASE = "rlw_phase"
229
- RLW_TRIGGER_SET = "rlw_trigger_set"
230
- SAFETY_DATA_SHEET = "safety_data_sheet"
231
- SCHEDULED_NOTIFICATION = "scheduled_notification"
232
- SPECS = "specs"
233
- SPLIT_TEMPLATE = "split_template"
234
- STRUCTURED_LOADING_USER_CONFIG = "structured_loading_user_config"
235
- TASK = "task"
236
- TASK_BOARD = "task_board"
237
- TEMPLATE = "template"
238
- TIMESHEET_ENTRY = "timesheet_entry"
239
- TRAINING_RUN = "training_run"
240
- TRAINING_SET = "training_set"
241
- TIME_SERIES = "time_series"
242
- UNITS = "units"
243
- USER_FAVORITE = "user_favorite"
244
- USER = "user"
245
- USER_CERTIFICATION = "user_certification"
246
- USER_GROUP = "user_group"
247
- USER_LIST_SET = "user_list_set"
248
- WEBHOOK = "webhook"
249
- WEBHOOK_EVENT = "webhook_event"
250
- WORKFLOW = "workflow"
251
- WORKFLOW_STEP = "workflow_step"
252
- WORKFLOW_VARIANT = "workflow_variant"
253
- PLATFORM_NOTIFICATION = "platform_notification"
254
- INVENTORY_LOCATION_TYPE = "inventory_location_type"
255
- ENTITY_DEFINITION = "entity_definition"
256
- PHASE_TRANSITION = "phase_transition"
257
- PUBLIC_DATA_ENTITY_LINK = "public_data_entity_link"
258
- PUBLIC_DATA_SOURCED_OUTPUT = "public_data_sourced_output"
259
- PUBLIC_DATA_SOURCED_PROJECT = "public_data_sourced_project"
260
- PUBLIC_DATA_SOURCED_RECIPE = "public_data_sourced_recipe"
261
- PUBLIC_DATA_SOURCED_RECIPE_PROJECT = "public_data_sourced_recipe_project"
262
- PUBLIC_DATA_SOURCED_RECIPE_METADATA = "public_data_sourced_recipe_metadata"
263
- PUBLIC_DATA_SOURCED_UNITS = "public_data_sourced_units"
264
- PUBLIC_DATA_SOURCED_CONDITION_PARAMETER = "public_data_sourced_condition_parameter"
265
- PUBLIC_DATA_SOURCED_COMPANY = "public_data_sourced_company"
266
- UPLOADER = "uploader"
267
-
268
-
269
5
  # DO NOT MODIFY -- This file is generated by type_spec
270
- @dataclass(kw_only=True)
271
- class Entity:
272
- id: base_t.ObjectId
273
- type: EntityType
6
+ # Kept only for SDK backwards compatibility
7
+ from .entity_t import EntityType as EntityType
8
+ from .entity_t import Entity as Entity
274
9
  # DO NOT MODIFY -- This file is generated by type_spec