UncountablePythonSDK 0.0.111__py3-none-any.whl → 0.0.113__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.
- docs/conf.py +2 -2
- docs/justfile +1 -1
- examples/integration-server/jobs/materials_auto/example_runsheet_wh.py +35 -0
- examples/integration-server/jobs/materials_auto/profile.yaml +9 -0
- examples/integration-server/pyproject.toml +2 -2
- pkgs/argument_parser/argument_parser.py +6 -3
- pkgs/filesystem_utils/_blob_session.py +8 -1
- pkgs/type_spec/emit_python.py +9 -3
- pkgs/type_spec/emit_typescript_util.py +16 -1
- pkgs/type_spec/parts/base.py.prepart +4 -0
- pkgs/type_spec/ui_entry_actions/__init__.py +4 -0
- pkgs/type_spec/ui_entry_actions/generate_ui_entry_actions.py +294 -0
- pkgs/type_spec/value_spec/convert_type.py +13 -0
- uncountable/core/client.py +7 -4
- uncountable/integration/executors/generic_upload_executor.py +3 -2
- uncountable/integration/job.py +24 -1
- uncountable/integration/queue_runner/datastore/datastore_sqlite.py +3 -2
- uncountable/integration/scan_profiles.py +1 -1
- uncountable/integration/scheduler.py +4 -3
- uncountable/integration/secret_retrieval/retrieve_secret.py +1 -1
- uncountable/types/__init__.py +2 -0
- uncountable/types/api/batch/execute_batch.py +4 -4
- uncountable/types/api/batch/execute_batch_load_async.py +2 -2
- uncountable/types/api/chemical/convert_chemical_formats.py +3 -3
- uncountable/types/api/condition_parameters/upsert_condition_match.py +4 -3
- uncountable/types/api/entity/create_entities.py +3 -3
- uncountable/types/api/entity/create_entity.py +3 -3
- uncountable/types/api/entity/create_or_update_entity.py +3 -2
- uncountable/types/api/entity/get_entities_data.py +3 -3
- uncountable/types/api/entity/grant_entity_permissions.py +3 -2
- uncountable/types/api/entity/list_entities.py +4 -4
- uncountable/types/api/entity/lock_entity.py +3 -2
- uncountable/types/api/entity/lookup_entity.py +5 -5
- uncountable/types/api/entity/resolve_entity_ids.py +3 -3
- uncountable/types/api/entity/set_entity_field_values.py +3 -2
- uncountable/types/api/entity/set_values.py +3 -2
- uncountable/types/api/entity/transition_entity_phase.py +5 -4
- uncountable/types/api/entity/unlock_entity.py +3 -2
- uncountable/types/api/equipment/associate_equipment_input.py +2 -2
- uncountable/types/api/field_options/upsert_field_options.py +4 -3
- uncountable/types/api/files/download_file.py +4 -3
- uncountable/types/api/id_source/list_id_source.py +3 -3
- uncountable/types/api/id_source/match_id_source.py +3 -3
- uncountable/types/api/input_groups/get_input_group_names.py +3 -3
- uncountable/types/api/inputs/create_inputs.py +4 -4
- uncountable/types/api/inputs/get_input_data.py +6 -6
- uncountable/types/api/inputs/get_input_names.py +3 -3
- uncountable/types/api/inputs/get_inputs_data.py +6 -6
- uncountable/types/api/inputs/set_input_attribute_values.py +3 -3
- uncountable/types/api/inputs/set_input_category.py +3 -2
- uncountable/types/api/inputs/set_input_subcategories.py +3 -2
- uncountable/types/api/inputs/set_intermediate_type.py +3 -2
- uncountable/types/api/material_families/update_entity_material_families.py +2 -2
- uncountable/types/api/outputs/get_output_data.py +6 -6
- uncountable/types/api/outputs/get_output_names.py +3 -3
- uncountable/types/api/outputs/resolve_output_conditions.py +5 -5
- uncountable/types/api/permissions/set_core_permissions.py +7 -6
- uncountable/types/api/project/get_projects.py +3 -3
- uncountable/types/api/project/get_projects_data.py +3 -3
- uncountable/types/api/recipe_links/create_recipe_link.py +3 -2
- uncountable/types/api/recipe_links/remove_recipe_link.py +3 -2
- uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +3 -3
- uncountable/types/api/recipes/add_recipe_to_project.py +3 -2
- uncountable/types/api/recipes/add_time_series_data.py +4 -3
- uncountable/types/api/recipes/archive_recipes.py +3 -2
- uncountable/types/api/recipes/associate_recipe_as_input.py +3 -2
- uncountable/types/api/recipes/associate_recipe_as_lot.py +3 -2
- uncountable/types/api/recipes/clear_recipe_outputs.py +3 -2
- uncountable/types/api/recipes/create_recipe.py +2 -2
- uncountable/types/api/recipes/create_recipes.py +4 -4
- uncountable/types/api/recipes/disassociate_recipe_as_input.py +3 -2
- uncountable/types/api/recipes/edit_recipe_inputs.py +17 -16
- uncountable/types/api/recipes/get_column_calculation_values.py +3 -3
- uncountable/types/api/recipes/get_curve.py +2 -2
- uncountable/types/api/recipes/get_recipe_calculations.py +3 -3
- uncountable/types/api/recipes/get_recipe_links.py +2 -2
- uncountable/types/api/recipes/get_recipe_names.py +3 -3
- uncountable/types/api/recipes/get_recipe_output_metadata.py +3 -3
- uncountable/types/api/recipes/get_recipes_data.py +11 -11
- uncountable/types/api/recipes/lock_recipes.py +4 -3
- uncountable/types/api/recipes/remove_recipe_from_project.py +3 -2
- uncountable/types/api/recipes/set_recipe_inputs.py +3 -3
- uncountable/types/api/recipes/set_recipe_metadata.py +3 -2
- uncountable/types/api/recipes/set_recipe_output_annotations.py +6 -6
- uncountable/types/api/recipes/set_recipe_output_file.py +3 -3
- uncountable/types/api/recipes/set_recipe_outputs.py +5 -5
- uncountable/types/api/recipes/set_recipe_tags.py +6 -6
- uncountable/types/api/recipes/unarchive_recipes.py +3 -2
- uncountable/types/api/recipes/unlock_recipes.py +3 -2
- uncountable/types/api/runsheet/__init__.py +1 -0
- uncountable/types/api/runsheet/complete_async_upload.py +41 -0
- uncountable/types/api/triggers/run_trigger.py +3 -2
- uncountable/types/api/uploader/invoke_uploader.py +2 -2
- uncountable/types/async_batch_processor.py +34 -0
- uncountable/types/async_batch_t.py +6 -5
- uncountable/types/auth_retrieval_t.py +4 -3
- uncountable/types/base_t.py +4 -0
- uncountable/types/calculations_t.py +1 -1
- uncountable/types/chemical_structure_t.py +2 -1
- uncountable/types/client_base.py +21 -0
- uncountable/types/client_config_t.py +2 -1
- uncountable/types/curves_t.py +2 -2
- uncountable/types/data.py +2 -2
- uncountable/types/data_t.py +42 -32
- uncountable/types/entity_t.py +3 -3
- uncountable/types/experiment_groups_t.py +1 -1
- uncountable/types/field_values_t.py +20 -20
- uncountable/types/fields_t.py +1 -1
- uncountable/types/generic_upload_t.py +7 -6
- uncountable/types/id_source_t.py +5 -4
- uncountable/types/identifier_t.py +3 -3
- uncountable/types/input_attributes_t.py +1 -1
- uncountable/types/inputs_t.py +1 -1
- uncountable/types/integration_server_t.py +2 -1
- uncountable/types/job_definition_t.py +14 -13
- uncountable/types/outputs_t.py +1 -1
- uncountable/types/overrides_t.py +3 -2
- uncountable/types/phases_t.py +1 -1
- uncountable/types/queued_job_t.py +7 -7
- uncountable/types/recipe_identifiers_t.py +3 -3
- uncountable/types/recipe_links_t.py +1 -1
- uncountable/types/recipe_metadata_t.py +3 -3
- uncountable/types/recipe_output_metadata_t.py +1 -1
- uncountable/types/recipe_tags_t.py +1 -1
- uncountable/types/recipe_workflow_steps_t.py +5 -4
- uncountable/types/recipes_t.py +2 -1
- uncountable/types/response_t.py +2 -1
- uncountable/types/secret_retrieval_t.py +4 -3
- uncountable/types/units_t.py +1 -1
- uncountable/types/users_t.py +1 -1
- uncountable/types/webhook_job_t.py +4 -3
- uncountable/types/workflows_t.py +2 -2
- {uncountablepythonsdk-0.0.111.dist-info → uncountablepythonsdk-0.0.113.dist-info}/METADATA +2 -1
- {uncountablepythonsdk-0.0.111.dist-info → uncountablepythonsdk-0.0.113.dist-info}/RECORD +136 -131
- {uncountablepythonsdk-0.0.111.dist-info → uncountablepythonsdk-0.0.113.dist-info}/WHEEL +1 -1
- {uncountablepythonsdk-0.0.111.dist-info → uncountablepythonsdk-0.0.113.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ from decimal import Decimal # noqa: F401
|
|
|
9
9
|
from enum import StrEnum
|
|
10
10
|
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
|
+
from ... import base_t
|
|
12
13
|
from ... import identifier_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
@@ -34,7 +35,7 @@ class RecipeLockType(StrEnum):
|
|
|
34
35
|
@serial_class(
|
|
35
36
|
named_type_path="sdk.api.recipes.lock_recipes.RecipeLockBase",
|
|
36
37
|
)
|
|
37
|
-
@dataclasses.dataclass(kw_only=True)
|
|
38
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
38
39
|
class RecipeLockBase:
|
|
39
40
|
recipe: identifier_t.IdentifierKey
|
|
40
41
|
|
|
@@ -43,7 +44,7 @@ class RecipeLockBase:
|
|
|
43
44
|
@serial_class(
|
|
44
45
|
named_type_path="sdk.api.recipes.lock_recipes.Arguments",
|
|
45
46
|
)
|
|
46
|
-
@dataclasses.dataclass(kw_only=True)
|
|
47
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
47
48
|
class Arguments:
|
|
48
49
|
type: RecipeLockType = RecipeLockType.ALL
|
|
49
50
|
recipes: list[identifier_t.IdentifierKey]
|
|
@@ -56,7 +57,7 @@ class Arguments:
|
|
|
56
57
|
@serial_class(
|
|
57
58
|
named_type_path="sdk.api.recipes.lock_recipes.Data",
|
|
58
59
|
)
|
|
59
|
-
@dataclasses.dataclass(kw_only=True)
|
|
60
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
60
61
|
class Data:
|
|
61
62
|
pass
|
|
62
63
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from ... import base_t
|
|
11
12
|
from ... import identifier_t
|
|
12
13
|
|
|
13
14
|
__all__: list[str] = [
|
|
@@ -25,7 +26,7 @@ ENDPOINT_PATH = "api/external/recipes/remove_recipe_from_project"
|
|
|
25
26
|
@serial_class(
|
|
26
27
|
named_type_path="sdk.api.recipes.remove_recipe_from_project.Arguments",
|
|
27
28
|
)
|
|
28
|
-
@dataclasses.dataclass(kw_only=True)
|
|
29
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
29
30
|
class Arguments:
|
|
30
31
|
recipe_key: identifier_t.IdentifierKey
|
|
31
32
|
project_key: identifier_t.IdentifierKey
|
|
@@ -35,7 +36,7 @@ class Arguments:
|
|
|
35
36
|
@serial_class(
|
|
36
37
|
named_type_path="sdk.api.recipes.remove_recipe_from_project.Data",
|
|
37
38
|
)
|
|
38
|
-
@dataclasses.dataclass(kw_only=True)
|
|
39
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
39
40
|
class Data:
|
|
40
41
|
pass
|
|
41
42
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -27,7 +27,7 @@ ENDPOINT_PATH = "api/external/recipes/external_set_recipe_inputs"
|
|
|
27
27
|
named_type_path="sdk.api.recipes.set_recipe_inputs.RecipeInputValue",
|
|
28
28
|
to_string_values={"value_numeric"},
|
|
29
29
|
)
|
|
30
|
-
@dataclasses.dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
31
31
|
class RecipeInputValue:
|
|
32
32
|
recipe_id: base_t.ObjectId
|
|
33
33
|
input_id: base_t.ObjectId
|
|
@@ -43,7 +43,7 @@ class RecipeInputValue:
|
|
|
43
43
|
@serial_class(
|
|
44
44
|
named_type_path="sdk.api.recipes.set_recipe_inputs.Arguments",
|
|
45
45
|
)
|
|
46
|
-
@dataclasses.dataclass(kw_only=True)
|
|
46
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
47
47
|
class Arguments:
|
|
48
48
|
input_data: list[RecipeInputValue]
|
|
49
49
|
|
|
@@ -52,7 +52,7 @@ class Arguments:
|
|
|
52
52
|
@serial_class(
|
|
53
53
|
named_type_path="sdk.api.recipes.set_recipe_inputs.Data",
|
|
54
54
|
)
|
|
55
|
-
@dataclasses.dataclass(kw_only=True)
|
|
55
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
56
56
|
class Data:
|
|
57
57
|
pass
|
|
58
58
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from ... import base_t
|
|
11
12
|
from ... import identifier_t
|
|
12
13
|
from ... import recipe_metadata_t
|
|
13
14
|
|
|
@@ -26,7 +27,7 @@ ENDPOINT_PATH = "api/external/recipes/set_recipe_metadata"
|
|
|
26
27
|
@serial_class(
|
|
27
28
|
named_type_path="sdk.api.recipes.set_recipe_metadata.Arguments",
|
|
28
29
|
)
|
|
29
|
-
@dataclasses.dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
30
31
|
class Arguments:
|
|
31
32
|
recipe_key: identifier_t.IdentifierKey
|
|
32
33
|
recipe_metadata: list[recipe_metadata_t.MetadataValue]
|
|
@@ -36,7 +37,7 @@ class Arguments:
|
|
|
36
37
|
@serial_class(
|
|
37
38
|
named_type_path="sdk.api.recipes.set_recipe_metadata.Data",
|
|
38
39
|
)
|
|
39
|
-
@dataclasses.dataclass(kw_only=True)
|
|
40
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
40
41
|
class Data:
|
|
41
42
|
pass
|
|
42
43
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -35,7 +35,7 @@ ENDPOINT_PATH = "api/external/recipes/set_recipe_output_annotations"
|
|
|
35
35
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.AnnotationEdit",
|
|
36
36
|
to_string_values={"lower_value", "upper_value"},
|
|
37
37
|
)
|
|
38
|
-
@dataclasses.dataclass(kw_only=True)
|
|
38
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
39
39
|
class AnnotationEdit:
|
|
40
40
|
annotation_type_key: identifier_t.IdentifierKey
|
|
41
41
|
lower_value: Decimal | None = None
|
|
@@ -52,7 +52,7 @@ class AnnotationUpdateType(StrEnum):
|
|
|
52
52
|
@serial_class(
|
|
53
53
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.RecipeOutputEditBase",
|
|
54
54
|
)
|
|
55
|
-
@dataclasses.dataclass(kw_only=True)
|
|
55
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
56
56
|
class RecipeOutputEditBase:
|
|
57
57
|
recipe_id: base_t.ObjectId
|
|
58
58
|
output_id: base_t.ObjectId
|
|
@@ -66,7 +66,7 @@ class RecipeOutputEditBase:
|
|
|
66
66
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.RecipeOutputMergeAnnotations",
|
|
67
67
|
parse_require={"type"},
|
|
68
68
|
)
|
|
69
|
-
@dataclasses.dataclass(kw_only=True)
|
|
69
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
70
70
|
class RecipeOutputMergeAnnotations(RecipeOutputEditBase):
|
|
71
71
|
type: typing.Literal[AnnotationUpdateType.MERGE] = AnnotationUpdateType.MERGE
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ class RecipeOutputMergeAnnotations(RecipeOutputEditBase):
|
|
|
76
76
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.RecipeOutputReplaceAnnotations",
|
|
77
77
|
parse_require={"type"},
|
|
78
78
|
)
|
|
79
|
-
@dataclasses.dataclass(kw_only=True)
|
|
79
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
80
80
|
class RecipeOutputReplaceAnnotations(RecipeOutputEditBase):
|
|
81
81
|
type: typing.Literal[AnnotationUpdateType.REPLACE] = AnnotationUpdateType.REPLACE
|
|
82
82
|
|
|
@@ -99,7 +99,7 @@ RecipeOutputUpdateAnnotations = typing.Annotated[
|
|
|
99
99
|
@serial_class(
|
|
100
100
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.Arguments",
|
|
101
101
|
)
|
|
102
|
-
@dataclasses.dataclass(kw_only=True)
|
|
102
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
103
103
|
class Arguments:
|
|
104
104
|
updates: list[RecipeOutputUpdateAnnotations]
|
|
105
105
|
|
|
@@ -108,7 +108,7 @@ class Arguments:
|
|
|
108
108
|
@serial_class(
|
|
109
109
|
named_type_path="sdk.api.recipes.set_recipe_output_annotations.Data",
|
|
110
110
|
)
|
|
111
|
-
@dataclasses.dataclass(kw_only=True)
|
|
111
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
112
112
|
class Data:
|
|
113
113
|
pass
|
|
114
114
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -27,7 +27,7 @@ ENDPOINT_PATH = "api/external/recipes/external_set_recipe_output_file"
|
|
|
27
27
|
@serial_class(
|
|
28
28
|
named_type_path="sdk.api.recipes.set_recipe_output_file.RecipeOutputFileValue",
|
|
29
29
|
)
|
|
30
|
-
@dataclasses.dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
31
31
|
class RecipeOutputFileValue:
|
|
32
32
|
recipe_id: base_t.ObjectId
|
|
33
33
|
output_id: base_t.ObjectId
|
|
@@ -40,7 +40,7 @@ class RecipeOutputFileValue:
|
|
|
40
40
|
@serial_class(
|
|
41
41
|
named_type_path="sdk.api.recipes.set_recipe_output_file.Arguments",
|
|
42
42
|
)
|
|
43
|
-
@dataclasses.dataclass(kw_only=True)
|
|
43
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
44
44
|
class Arguments:
|
|
45
45
|
output_file_data: RecipeOutputFileValue
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ class Arguments:
|
|
|
49
49
|
@serial_class(
|
|
50
50
|
named_type_path="sdk.api.recipes.set_recipe_output_file.Data",
|
|
51
51
|
)
|
|
52
|
-
@dataclasses.dataclass(kw_only=True)
|
|
52
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
53
53
|
class Data(response_t.Response):
|
|
54
54
|
pass
|
|
55
55
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -33,7 +33,7 @@ ENDPOINT_PATH = "api/external/recipes/external_set_recipe_outputs"
|
|
|
33
33
|
@serial_class(
|
|
34
34
|
named_type_path="sdk.api.recipes.set_recipe_outputs.CurveValues",
|
|
35
35
|
)
|
|
36
|
-
@dataclasses.dataclass(kw_only=True)
|
|
36
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
37
37
|
class CurveValues:
|
|
38
38
|
x_values: list[Decimal | None]
|
|
39
39
|
y_values: list[Decimal | None]
|
|
@@ -50,7 +50,7 @@ class NullBehavior(StrEnum):
|
|
|
50
50
|
named_type_path="sdk.api.recipes.set_recipe_outputs.RecipeOutputValue",
|
|
51
51
|
to_string_values={"value_numeric"},
|
|
52
52
|
)
|
|
53
|
-
@dataclasses.dataclass(kw_only=True)
|
|
53
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
54
54
|
class RecipeOutputValue:
|
|
55
55
|
recipe_id: base_t.ObjectId
|
|
56
56
|
output_id: base_t.ObjectId
|
|
@@ -60,7 +60,7 @@ class RecipeOutputValue:
|
|
|
60
60
|
value_numeric: Decimal | None = None
|
|
61
61
|
value_str: str | None = None
|
|
62
62
|
value_curve: CurveValues | None = None
|
|
63
|
-
value_color: data_t.
|
|
63
|
+
value_color: data_t.SupportedColorFormatColor | None = None
|
|
64
64
|
formatting: recipes_t.RecipeAttributeFormatting | None = None
|
|
65
65
|
field_values: list[field_values_t.ArgumentValueRefName | field_values_t.ArgumentValueId] | None = None
|
|
66
66
|
|
|
@@ -69,7 +69,7 @@ class RecipeOutputValue:
|
|
|
69
69
|
@serial_class(
|
|
70
70
|
named_type_path="sdk.api.recipes.set_recipe_outputs.Arguments",
|
|
71
71
|
)
|
|
72
|
-
@dataclasses.dataclass(kw_only=True)
|
|
72
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
73
73
|
class Arguments:
|
|
74
74
|
output_data: list[RecipeOutputValue]
|
|
75
75
|
|
|
@@ -78,7 +78,7 @@ class Arguments:
|
|
|
78
78
|
@serial_class(
|
|
79
79
|
named_type_path="sdk.api.recipes.set_recipe_outputs.Data",
|
|
80
80
|
)
|
|
81
|
-
@dataclasses.dataclass(kw_only=True)
|
|
81
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
82
82
|
class Data(response_t.Response):
|
|
83
83
|
pass
|
|
84
84
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -41,7 +41,7 @@ class RecipeTagUpdateType(StrEnum):
|
|
|
41
41
|
@serial_class(
|
|
42
42
|
named_type_path="sdk.api.recipes.set_recipe_tags.RecipeTagUpdateBase",
|
|
43
43
|
)
|
|
44
|
-
@dataclasses.dataclass(kw_only=True)
|
|
44
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
45
45
|
class RecipeTagUpdateBase:
|
|
46
46
|
type: RecipeTagUpdateType
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ class RecipeTagUpdateBase:
|
|
|
51
51
|
named_type_path="sdk.api.recipes.set_recipe_tags.RecipeTagAppend",
|
|
52
52
|
parse_require={"type"},
|
|
53
53
|
)
|
|
54
|
-
@dataclasses.dataclass(kw_only=True)
|
|
54
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
55
55
|
class RecipeTagAppend(RecipeTagUpdateBase):
|
|
56
56
|
type: typing.Literal[RecipeTagUpdateType.APPEND] = RecipeTagUpdateType.APPEND
|
|
57
57
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -62,7 +62,7 @@ class RecipeTagAppend(RecipeTagUpdateBase):
|
|
|
62
62
|
named_type_path="sdk.api.recipes.set_recipe_tags.RecipeTagRemove",
|
|
63
63
|
parse_require={"type"},
|
|
64
64
|
)
|
|
65
|
-
@dataclasses.dataclass(kw_only=True)
|
|
65
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
66
66
|
class RecipeTagRemove(RecipeTagUpdateBase):
|
|
67
67
|
type: typing.Literal[RecipeTagUpdateType.REMOVE] = RecipeTagUpdateType.REMOVE
|
|
68
68
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -73,7 +73,7 @@ class RecipeTagRemove(RecipeTagUpdateBase):
|
|
|
73
73
|
named_type_path="sdk.api.recipes.set_recipe_tags.RecipeTagOverride",
|
|
74
74
|
parse_require={"type"},
|
|
75
75
|
)
|
|
76
|
-
@dataclasses.dataclass(kw_only=True)
|
|
76
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
77
77
|
class RecipeTagOverride(RecipeTagUpdateBase):
|
|
78
78
|
type: typing.Literal[RecipeTagUpdateType.OVERRIDE] = RecipeTagUpdateType.OVERRIDE
|
|
79
79
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -92,7 +92,7 @@ RecipeTagUpdate = typing.Annotated[
|
|
|
92
92
|
@serial_class(
|
|
93
93
|
named_type_path="sdk.api.recipes.set_recipe_tags.Arguments",
|
|
94
94
|
)
|
|
95
|
-
@dataclasses.dataclass(kw_only=True)
|
|
95
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
96
96
|
class Arguments:
|
|
97
97
|
recipe_key: identifier_t.IdentifierKey
|
|
98
98
|
recipe_tag_update: RecipeTagUpdate
|
|
@@ -102,7 +102,7 @@ class Arguments:
|
|
|
102
102
|
@serial_class(
|
|
103
103
|
named_type_path="sdk.api.recipes.set_recipe_tags.Data",
|
|
104
104
|
)
|
|
105
|
-
@dataclasses.dataclass(kw_only=True)
|
|
105
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
106
106
|
class Data:
|
|
107
107
|
pass
|
|
108
108
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from ... import base_t
|
|
11
12
|
from ... import identifier_t
|
|
12
13
|
|
|
13
14
|
__all__: list[str] = [
|
|
@@ -25,7 +26,7 @@ ENDPOINT_PATH = "api/external/recipes/unarchive"
|
|
|
25
26
|
@serial_class(
|
|
26
27
|
named_type_path="sdk.api.recipes.unarchive_recipes.Arguments",
|
|
27
28
|
)
|
|
28
|
-
@dataclasses.dataclass(kw_only=True)
|
|
29
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
29
30
|
class Arguments:
|
|
30
31
|
recipes: list[identifier_t.IdentifierKey]
|
|
31
32
|
|
|
@@ -34,7 +35,7 @@ class Arguments:
|
|
|
34
35
|
@serial_class(
|
|
35
36
|
named_type_path="sdk.api.recipes.unarchive_recipes.Data",
|
|
36
37
|
)
|
|
37
|
-
@dataclasses.dataclass(kw_only=True)
|
|
38
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
38
39
|
class Data:
|
|
39
40
|
pass
|
|
40
41
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -9,6 +9,7 @@ from decimal import Decimal # noqa: F401
|
|
|
9
9
|
from enum import StrEnum
|
|
10
10
|
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
|
+
from ... import base_t
|
|
12
13
|
from ... import identifier_t
|
|
13
14
|
|
|
14
15
|
__all__: list[str] = [
|
|
@@ -32,7 +33,7 @@ class RecipeUnlockType(StrEnum):
|
|
|
32
33
|
@serial_class(
|
|
33
34
|
named_type_path="sdk.api.recipes.unlock_recipes.Arguments",
|
|
34
35
|
)
|
|
35
|
-
@dataclasses.dataclass(kw_only=True)
|
|
36
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
36
37
|
class Arguments:
|
|
37
38
|
type: RecipeUnlockType = RecipeUnlockType.STANDARD
|
|
38
39
|
recipes: list[identifier_t.IdentifierKey]
|
|
@@ -43,7 +44,7 @@ class Arguments:
|
|
|
43
44
|
@serial_class(
|
|
44
45
|
named_type_path="sdk.api.recipes.unlock_recipes.Data",
|
|
45
46
|
)
|
|
46
|
-
@dataclasses.dataclass(kw_only=True)
|
|
47
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
47
48
|
class Data:
|
|
48
49
|
pass
|
|
49
50
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
2
|
+
# ruff: noqa: E402 Q003
|
|
3
|
+
# fmt: off
|
|
4
|
+
# isort: skip_file
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
import typing # noqa: F401
|
|
7
|
+
import datetime # noqa: F401
|
|
8
|
+
from decimal import Decimal # noqa: F401
|
|
9
|
+
import dataclasses
|
|
10
|
+
from pkgs.serialization import serial_class
|
|
11
|
+
from ... import base_t
|
|
12
|
+
|
|
13
|
+
__all__: list[str] = [
|
|
14
|
+
"Arguments",
|
|
15
|
+
"Data",
|
|
16
|
+
"ENDPOINT_METHOD",
|
|
17
|
+
"ENDPOINT_PATH",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
ENDPOINT_METHOD = "POST"
|
|
21
|
+
ENDPOINT_PATH = "api/external/runsheet/complete_async_upload"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
|
+
@serial_class(
|
|
26
|
+
named_type_path="sdk.api.runsheet.complete_async_upload.Arguments",
|
|
27
|
+
)
|
|
28
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
29
|
+
class Arguments:
|
|
30
|
+
async_job_id: base_t.ObjectId
|
|
31
|
+
file_id: base_t.ObjectId
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
35
|
+
@serial_class(
|
|
36
|
+
named_type_path="sdk.api.runsheet.complete_async_upload.Data",
|
|
37
|
+
)
|
|
38
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
39
|
+
class Data:
|
|
40
|
+
pass
|
|
41
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from ... import base_t
|
|
11
12
|
from ... import entity_t
|
|
12
13
|
from ... import response_t
|
|
13
14
|
|
|
@@ -26,7 +27,7 @@ ENDPOINT_PATH = "api/external/triggers/run_trigger"
|
|
|
26
27
|
@serial_class(
|
|
27
28
|
named_type_path="sdk.api.triggers.run_trigger.Arguments",
|
|
28
29
|
)
|
|
29
|
-
@dataclasses.dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
30
31
|
class Arguments:
|
|
31
32
|
trigger_ref_name: str
|
|
32
33
|
entity: entity_t.Entity | None = None
|
|
@@ -36,7 +37,7 @@ class Arguments:
|
|
|
36
37
|
@serial_class(
|
|
37
38
|
named_type_path="sdk.api.triggers.run_trigger.Data",
|
|
38
39
|
)
|
|
39
|
-
@dataclasses.dataclass(kw_only=True)
|
|
40
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
40
41
|
class Data(response_t.Response):
|
|
41
42
|
pass
|
|
42
43
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -28,7 +28,7 @@ ENDPOINT_PATH = "api/external/uploader/invoke_uploader"
|
|
|
28
28
|
@serial_class(
|
|
29
29
|
named_type_path="sdk.api.uploader.invoke_uploader.Arguments",
|
|
30
30
|
)
|
|
31
|
-
@dataclasses.dataclass(kw_only=True)
|
|
31
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
32
32
|
class Arguments:
|
|
33
33
|
uploader_key: identifier_t.IdentifierKey
|
|
34
34
|
destination: generic_upload_t.UploadDestination
|
|
@@ -40,7 +40,7 @@ class Arguments:
|
|
|
40
40
|
@serial_class(
|
|
41
41
|
named_type_path="sdk.api.uploader.invoke_uploader.Data",
|
|
42
42
|
)
|
|
43
|
-
@dataclasses.dataclass(kw_only=True)
|
|
43
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
44
44
|
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
45
45
|
pass
|
|
46
46
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -13,6 +13,7 @@ import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe
|
|
|
13
13
|
from uncountable.types import async_batch_t
|
|
14
14
|
from uncountable.types import base_t
|
|
15
15
|
import uncountable.types.api.recipes.clear_recipe_outputs as clear_recipe_outputs_t
|
|
16
|
+
import uncountable.types.api.runsheet.complete_async_upload as complete_async_upload_t
|
|
16
17
|
import uncountable.types.api.entity.create_or_update_entity as create_or_update_entity_t
|
|
17
18
|
import uncountable.types.api.recipes.create_recipe as create_recipe_t
|
|
18
19
|
import uncountable.types.api.recipes.edit_recipe_inputs as edit_recipe_inputs_t
|
|
@@ -183,6 +184,39 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
183
184
|
batch_reference=req.batch_reference,
|
|
184
185
|
)
|
|
185
186
|
|
|
187
|
+
def complete_async_upload(
|
|
188
|
+
self,
|
|
189
|
+
*,
|
|
190
|
+
async_job_id: base_t.ObjectId,
|
|
191
|
+
file_id: base_t.ObjectId,
|
|
192
|
+
depends_on: list[str] | None = None,
|
|
193
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
194
|
+
"""Processes an file id with a given async job id to be uploaded asynchronously
|
|
195
|
+
|
|
196
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
197
|
+
"""
|
|
198
|
+
args = complete_async_upload_t.Arguments(
|
|
199
|
+
async_job_id=async_job_id,
|
|
200
|
+
file_id=file_id,
|
|
201
|
+
)
|
|
202
|
+
json_data = serialize_for_api(args)
|
|
203
|
+
|
|
204
|
+
batch_reference = str(uuid.uuid4())
|
|
205
|
+
|
|
206
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
207
|
+
path=async_batch_t.AsyncBatchRequestPath.COMPLETE_ASYNC_UPLOAD,
|
|
208
|
+
data=json_data,
|
|
209
|
+
depends_on=depends_on,
|
|
210
|
+
batch_reference=batch_reference,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
self._enqueue(req)
|
|
214
|
+
|
|
215
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
216
|
+
path=req.path,
|
|
217
|
+
batch_reference=req.batch_reference,
|
|
218
|
+
)
|
|
219
|
+
|
|
186
220
|
def create_or_update_entity(
|
|
187
221
|
self,
|
|
188
222
|
*,
|
|
@@ -43,6 +43,7 @@ class AsyncBatchRequestPath(StrEnum):
|
|
|
43
43
|
LOOKUP_ENTITY = "entity/lookup_entity"
|
|
44
44
|
CREATE_RECIPE_LINK = "recipe_links/create_recipe_link"
|
|
45
45
|
UPSERT_CONDITION_MATCH = "condition_parameters/upsert_condition_match"
|
|
46
|
+
COMPLETE_ASYNC_UPLOAD = "runsheet/complete_async_upload"
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -50,7 +51,7 @@ class AsyncBatchRequestPath(StrEnum):
|
|
|
50
51
|
named_type_path="sdk.async_batch.AsyncBatchRequest",
|
|
51
52
|
unconverted_values={"data"},
|
|
52
53
|
)
|
|
53
|
-
@dataclasses.dataclass(kw_only=True)
|
|
54
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
54
55
|
class AsyncBatchRequest:
|
|
55
56
|
path: AsyncBatchRequestPath
|
|
56
57
|
data: base_t.JsonValue
|
|
@@ -63,7 +64,7 @@ class AsyncBatchRequest:
|
|
|
63
64
|
named_type_path="sdk.async_batch.AsyncBatchResultValue",
|
|
64
65
|
unconverted_values={"value"},
|
|
65
66
|
)
|
|
66
|
-
@dataclasses.dataclass(kw_only=True)
|
|
67
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
67
68
|
class AsyncBatchResultValue:
|
|
68
69
|
data_key: str
|
|
69
70
|
value: base_t.JsonValue
|
|
@@ -73,7 +74,7 @@ class AsyncBatchResultValue:
|
|
|
73
74
|
@serial_class(
|
|
74
75
|
named_type_path="sdk.async_batch.AsyncBatchActionReturn",
|
|
75
76
|
)
|
|
76
|
-
@dataclasses.dataclass(kw_only=True)
|
|
77
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
77
78
|
class AsyncBatchActionReturn:
|
|
78
79
|
modification_made: bool
|
|
79
80
|
result_id: base_t.ObjectId | None = None
|
|
@@ -85,7 +86,7 @@ class AsyncBatchActionReturn:
|
|
|
85
86
|
@serial_class(
|
|
86
87
|
named_type_path="sdk.async_batch.SavedAsyncBatchActionReturn",
|
|
87
88
|
)
|
|
88
|
-
@dataclasses.dataclass(kw_only=True)
|
|
89
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
89
90
|
class SavedAsyncBatchActionReturn:
|
|
90
91
|
identifier: str
|
|
91
92
|
result_data: AsyncBatchActionReturn
|
|
@@ -95,7 +96,7 @@ class SavedAsyncBatchActionReturn:
|
|
|
95
96
|
@serial_class(
|
|
96
97
|
named_type_path="sdk.async_batch.QueuedAsyncBatchRequest",
|
|
97
98
|
)
|
|
98
|
-
@dataclasses.dataclass(kw_only=True, frozen=True, eq=True)
|
|
99
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True, frozen=True, eq=True) # type: ignore[literal-required]
|
|
99
100
|
class QueuedAsyncBatchRequest:
|
|
100
101
|
path: AsyncBatchRequestPath
|
|
101
102
|
batch_reference: str
|
|
@@ -10,6 +10,7 @@ from enum import StrEnum
|
|
|
10
10
|
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
from pkgs.serialization import serial_union_annotation
|
|
13
|
+
from . import base_t
|
|
13
14
|
from . import secret_retrieval_t
|
|
14
15
|
|
|
15
16
|
__all__: list[str] = [
|
|
@@ -31,7 +32,7 @@ class AuthRetrievalType(StrEnum):
|
|
|
31
32
|
@serial_class(
|
|
32
33
|
named_type_path="sdk.auth_retrieval.AuthRetrievalBase",
|
|
33
34
|
)
|
|
34
|
-
@dataclasses.dataclass(kw_only=True)
|
|
35
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
35
36
|
class AuthRetrievalBase:
|
|
36
37
|
type: AuthRetrievalType
|
|
37
38
|
|
|
@@ -41,7 +42,7 @@ class AuthRetrievalBase:
|
|
|
41
42
|
named_type_path="sdk.auth_retrieval.AuthRetrievalOAuth",
|
|
42
43
|
parse_require={"type"},
|
|
43
44
|
)
|
|
44
|
-
@dataclasses.dataclass(kw_only=True)
|
|
45
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
45
46
|
class AuthRetrievalOAuth(AuthRetrievalBase):
|
|
46
47
|
type: typing.Literal[AuthRetrievalType.OAUTH] = AuthRetrievalType.OAUTH
|
|
47
48
|
refresh_token_secret: secret_retrieval_t.SecretRetrieval
|
|
@@ -52,7 +53,7 @@ class AuthRetrievalOAuth(AuthRetrievalBase):
|
|
|
52
53
|
named_type_path="sdk.auth_retrieval.AuthRetrievalBasic",
|
|
53
54
|
parse_require={"type"},
|
|
54
55
|
)
|
|
55
|
-
@dataclasses.dataclass(kw_only=True)
|
|
56
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
56
57
|
class AuthRetrievalBasic(AuthRetrievalBase):
|
|
57
58
|
type: typing.Literal[AuthRetrievalType.BASIC] = AuthRetrievalType.BASIC
|
|
58
59
|
api_id_secret: secret_retrieval_t.SecretRetrieval
|
uncountable/types/base_t.py
CHANGED
|
@@ -44,6 +44,10 @@ REF_NAME_STRICT_REGEX = rf"{REF_NAME_STRICT_REGEX_STRING}"
|
|
|
44
44
|
ID_REGEX = r"-?[1-9][0-9]{0,20}"
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
# ENABLE_SLOTS should be removed after slots have been tested locally
|
|
48
|
+
import os
|
|
49
|
+
ENABLE_SLOTS = os.environ.get("UNC_ENABLE_DATACLASS_SLOTS") == "true"
|
|
50
|
+
|
|
47
51
|
if TYPE_CHECKING:
|
|
48
52
|
JsonValue = Union[JsonScalar, Mapping[str, "JsonValue"], Sequence["JsonValue"]]
|
|
49
53
|
ExtJsonValue = JsonValue
|
|
@@ -19,7 +19,7 @@ __all__: list[str] = [
|
|
|
19
19
|
@serial_class(
|
|
20
20
|
named_type_path="sdk.calculations.Calculation",
|
|
21
21
|
)
|
|
22
|
-
@dataclasses.dataclass(kw_only=True)
|
|
22
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
23
23
|
class Calculation:
|
|
24
24
|
id: base_t.ObjectId
|
|
25
25
|
name: str
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from . import base_t
|
|
11
12
|
|
|
12
13
|
__all__: list[str] = [
|
|
13
14
|
"ChemicalStructure",
|
|
@@ -19,7 +20,7 @@ __all__: list[str] = [
|
|
|
19
20
|
named_type_path="sdk.chemical_structure.ChemicalStructure",
|
|
20
21
|
to_string_values={"molecular_weight"},
|
|
21
22
|
)
|
|
22
|
-
@dataclasses.dataclass(kw_only=True)
|
|
23
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
23
24
|
class ChemicalStructure:
|
|
24
25
|
ketcher_file: str | None = None
|
|
25
26
|
gross_formula: str | None = None
|
uncountable/types/client_base.py
CHANGED
|
@@ -17,6 +17,7 @@ import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe
|
|
|
17
17
|
from uncountable.types import async_batch_t
|
|
18
18
|
from uncountable.types import base_t
|
|
19
19
|
import uncountable.types.api.recipes.clear_recipe_outputs as clear_recipe_outputs_t
|
|
20
|
+
import uncountable.types.api.runsheet.complete_async_upload as complete_async_upload_t
|
|
20
21
|
import uncountable.types.api.chemical.convert_chemical_formats as convert_chemical_formats_t
|
|
21
22
|
import uncountable.types.api.entity.create_entities as create_entities_t
|
|
22
23
|
import uncountable.types.api.entity.create_entity as create_entity_t
|
|
@@ -266,6 +267,26 @@ class ClientMethods(ABC):
|
|
|
266
267
|
)
|
|
267
268
|
return self.do_request(api_request=api_request, return_type=clear_recipe_outputs_t.Data)
|
|
268
269
|
|
|
270
|
+
def complete_async_upload(
|
|
271
|
+
self,
|
|
272
|
+
*,
|
|
273
|
+
async_job_id: base_t.ObjectId,
|
|
274
|
+
file_id: base_t.ObjectId,
|
|
275
|
+
) -> complete_async_upload_t.Data:
|
|
276
|
+
"""Processes an file id with a given async job id to be uploaded asynchronously
|
|
277
|
+
|
|
278
|
+
"""
|
|
279
|
+
args = complete_async_upload_t.Arguments(
|
|
280
|
+
async_job_id=async_job_id,
|
|
281
|
+
file_id=file_id,
|
|
282
|
+
)
|
|
283
|
+
api_request = APIRequest(
|
|
284
|
+
method=complete_async_upload_t.ENDPOINT_METHOD,
|
|
285
|
+
endpoint=complete_async_upload_t.ENDPOINT_PATH,
|
|
286
|
+
args=args,
|
|
287
|
+
)
|
|
288
|
+
return self.do_request(api_request=api_request, return_type=complete_async_upload_t.Data)
|
|
289
|
+
|
|
269
290
|
def convert_chemical_formats(
|
|
270
291
|
self,
|
|
271
292
|
*,
|
|
@@ -8,6 +8,7 @@ import datetime # noqa: F401
|
|
|
8
8
|
from decimal import Decimal # noqa: F401
|
|
9
9
|
import dataclasses
|
|
10
10
|
from pkgs.serialization import serial_class
|
|
11
|
+
from . import base_t
|
|
11
12
|
|
|
12
13
|
__all__: list[str] = [
|
|
13
14
|
"ClientConfigOptions",
|
|
@@ -18,7 +19,7 @@ __all__: list[str] = [
|
|
|
18
19
|
@serial_class(
|
|
19
20
|
named_type_path="sdk.client_config.ClientConfigOptions",
|
|
20
21
|
)
|
|
21
|
-
@dataclasses.dataclass(kw_only=True)
|
|
22
|
+
@dataclasses.dataclass(slots=base_t.ENABLE_SLOTS, kw_only=True) # type: ignore[literal-required]
|
|
22
23
|
class ClientConfigOptions:
|
|
23
24
|
allow_insecure_tls: bool = False
|
|
24
25
|
extra_headers: dict[str, str] | None = None
|