UncountablePythonSDK 0.0.40__py3-none-any.whl → 0.0.42__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.
- {UncountablePythonSDK-0.0.40.dist-info → UncountablePythonSDK-0.0.42.dist-info}/METADATA +5 -1
- {UncountablePythonSDK-0.0.40.dist-info → UncountablePythonSDK-0.0.42.dist-info}/RECORD +126 -107
- docs/requirements.txt +3 -3
- examples/invoke_uploader.py +23 -0
- pkgs/argument_parser/argument_parser.py +2 -2
- pkgs/filesystem_utils/__init__.py +17 -0
- pkgs/filesystem_utils/_gdrive_session.py +306 -0
- pkgs/filesystem_utils/_local_session.py +69 -0
- pkgs/filesystem_utils/_sftp_session.py +147 -0
- pkgs/filesystem_utils/file_type_utils.py +61 -0
- pkgs/filesystem_utils/filesystem_session.py +39 -0
- pkgs/serialization/yaml.py +54 -0
- pkgs/type_spec/config.py +1 -13
- pkgs/type_spec/emit_open_api.py +7 -5
- pkgs/type_spec/emit_open_api_util.py +4 -2
- pkgs/type_spec/emit_python.py +13 -14
- pkgs/type_spec/load_types.py +2 -1
- pkgs/type_spec/value_spec/__main__.py +1 -1
- uncountable/core/file_upload.py +13 -3
- uncountable/integration/construct_client.py +1 -1
- uncountable/integration/cron.py +11 -6
- uncountable/integration/entrypoint.py +6 -7
- uncountable/integration/executors/executors.py +24 -0
- uncountable/integration/executors/generic_upload_executor.py +245 -0
- uncountable/integration/executors/script_executor.py +1 -1
- uncountable/integration/job.py +19 -2
- uncountable/integration/secret_retrieval/__init__.py +3 -0
- uncountable/integration/secret_retrieval/retrieve_secret.py +40 -0
- uncountable/integration/server.py +1 -1
- uncountable/types/__init__.py +8 -0
- uncountable/types/api/batch/execute_batch.py +5 -5
- uncountable/types/api/batch/execute_batch_load_async.py +3 -3
- uncountable/types/api/chemical/convert_chemical_formats.py +4 -4
- uncountable/types/api/entity/create_entities.py +4 -4
- uncountable/types/api/entity/create_entity.py +4 -4
- uncountable/types/api/entity/get_entities_data.py +4 -4
- uncountable/types/api/entity/list_entities.py +5 -5
- uncountable/types/api/entity/lock_entity.py +3 -3
- uncountable/types/api/entity/resolve_entity_ids.py +4 -4
- uncountable/types/api/entity/set_values.py +3 -3
- uncountable/types/api/entity/transition_entity_phase.py +5 -5
- uncountable/types/api/entity/unlock_entity.py +3 -3
- uncountable/types/api/equipment/associate_equipment_input.py +3 -3
- uncountable/types/api/field_options/upsert_field_options.py +4 -4
- uncountable/types/api/id_source/list_id_source.py +4 -4
- uncountable/types/api/id_source/match_id_source.py +4 -4
- uncountable/types/api/input_groups/get_input_group_names.py +4 -4
- uncountable/types/api/inputs/create_inputs.py +5 -5
- uncountable/types/api/inputs/get_input_data.py +7 -7
- uncountable/types/api/inputs/get_input_names.py +4 -4
- uncountable/types/api/inputs/get_inputs_data.py +7 -7
- uncountable/types/api/inputs/set_input_attribute_values.py +4 -4
- uncountable/types/api/inputs/set_input_category.py +3 -3
- uncountable/types/api/inputs/set_input_subcategories.py +3 -3
- uncountable/types/api/inputs/set_intermediate_type.py +3 -3
- uncountable/types/api/material_families/update_entity_material_families.py +3 -3
- uncountable/types/api/outputs/get_output_data.py +7 -7
- uncountable/types/api/outputs/get_output_names.py +4 -4
- uncountable/types/api/outputs/resolve_output_conditions.py +6 -6
- uncountable/types/api/permissions/set_core_permissions.py +7 -7
- uncountable/types/api/project/get_projects.py +4 -4
- uncountable/types/api/project/get_projects_data.py +4 -4
- uncountable/types/api/recipe_links/create_recipe_link.py +3 -3
- uncountable/types/api/recipe_links/remove_recipe_link.py +3 -3
- uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +4 -4
- uncountable/types/api/recipes/add_recipe_to_project.py +3 -3
- uncountable/types/api/recipes/archive_recipes.py +3 -3
- uncountable/types/api/recipes/associate_recipe_as_input.py +3 -3
- uncountable/types/api/recipes/associate_recipe_as_lot.py +3 -3
- uncountable/types/api/recipes/create_recipe.py +3 -3
- uncountable/types/api/recipes/create_recipes.py +5 -5
- uncountable/types/api/recipes/disassociate_recipe_as_input.py +3 -3
- uncountable/types/api/recipes/edit_recipe_inputs.py +12 -12
- uncountable/types/api/recipes/get_curve.py +3 -3
- uncountable/types/api/recipes/get_recipe_calculations.py +4 -4
- uncountable/types/api/recipes/get_recipe_links.py +3 -3
- uncountable/types/api/recipes/get_recipe_names.py +4 -4
- uncountable/types/api/recipes/get_recipe_output_metadata.py +4 -4
- uncountable/types/api/recipes/get_recipes_data.py +12 -12
- uncountable/types/api/recipes/lock_recipes.py +4 -4
- uncountable/types/api/recipes/remove_recipe_from_project.py +3 -3
- uncountable/types/api/recipes/set_recipe_inputs.py +4 -4
- uncountable/types/api/recipes/set_recipe_metadata.py +3 -3
- uncountable/types/api/recipes/set_recipe_output_annotations.py +7 -7
- uncountable/types/api/recipes/set_recipe_outputs.py +5 -5
- uncountable/types/api/recipes/set_recipe_tags.py +7 -7
- uncountable/types/api/recipes/unarchive_recipes.py +3 -3
- uncountable/types/api/recipes/unlock_recipes.py +3 -3
- uncountable/types/api/triggers/run_trigger.py +3 -3
- uncountable/types/api/uploader/__init__.py +1 -0
- uncountable/types/api/uploader/invoke_uploader.py +38 -0
- uncountable/types/async_batch_processor.py +36 -0
- uncountable/types/async_batch_t.py +6 -4
- uncountable/types/calculations_t.py +2 -2
- uncountable/types/chemical_structure_t.py +2 -2
- uncountable/types/client_base.py +25 -2
- uncountable/types/curves_t.py +3 -3
- uncountable/types/entity_t.py +2 -2
- uncountable/types/experiment_groups_t.py +2 -2
- uncountable/types/field_values_t.py +5 -5
- uncountable/types/fields_t.py +2 -2
- uncountable/types/generic_upload.py +9 -0
- uncountable/types/generic_upload_t.py +41 -0
- uncountable/types/id_source_t.py +5 -5
- uncountable/types/identifier_t.py +4 -4
- uncountable/types/input_attributes_t.py +2 -2
- uncountable/types/inputs_t.py +2 -2
- uncountable/types/job_definition.py +26 -0
- uncountable/types/job_definition_t.py +203 -0
- uncountable/types/outputs_t.py +2 -2
- uncountable/types/phases_t.py +2 -2
- uncountable/types/recipe_identifiers_t.py +4 -4
- uncountable/types/recipe_links_t.py +2 -2
- uncountable/types/recipe_metadata_t.py +4 -4
- uncountable/types/recipe_output_metadata_t.py +2 -2
- uncountable/types/recipe_tags_t.py +2 -2
- uncountable/types/recipe_workflow_steps_t.py +5 -5
- uncountable/types/recipes_t.py +2 -2
- uncountable/types/response_t.py +2 -2
- uncountable/types/secret_retrieval.py +12 -0
- uncountable/types/secret_retrieval_t.py +69 -0
- uncountable/types/units_t.py +2 -2
- uncountable/types/users_t.py +2 -2
- uncountable/types/workflows_t.py +3 -3
- uncountable/integration/types.py +0 -89
- {UncountablePythonSDK-0.0.40.dist-info → UncountablePythonSDK-0.0.42.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.40.dist-info → UncountablePythonSDK-0.0.42.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
from ... import base_t
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ ENDPOINT_PATH = "api/external/recipes/external_set_recipe_inputs"
|
|
|
27
27
|
@serial_class(
|
|
28
28
|
to_string_values={"value_numeric"},
|
|
29
29
|
)
|
|
30
|
-
@dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(kw_only=True)
|
|
31
31
|
class RecipeInputValue:
|
|
32
32
|
recipe_id: base_t.ObjectId
|
|
33
33
|
input_id: base_t.ObjectId
|
|
@@ -40,13 +40,13 @@ class RecipeInputValue:
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
43
|
-
@dataclass(kw_only=True)
|
|
43
|
+
@dataclasses.dataclass(kw_only=True)
|
|
44
44
|
class Arguments:
|
|
45
45
|
input_data: list[RecipeInputValue]
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
49
|
-
@dataclass(kw_only=True)
|
|
49
|
+
@dataclasses.dataclass(kw_only=True)
|
|
50
50
|
class Data:
|
|
51
51
|
pass
|
|
52
52
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from ... import identifier_t
|
|
12
12
|
from ... import recipe_metadata_t
|
|
13
13
|
|
|
@@ -23,14 +23,14 @@ ENDPOINT_PATH = "api/external/recipes/set_recipe_metadata"
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
26
|
-
@dataclass(kw_only=True)
|
|
26
|
+
@dataclasses.dataclass(kw_only=True)
|
|
27
27
|
class Arguments:
|
|
28
28
|
recipe_key: identifier_t.IdentifierKey
|
|
29
29
|
recipe_metadata: list[recipe_metadata_t.MetadataValue]
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
33
|
-
@dataclass(kw_only=True)
|
|
33
|
+
@dataclasses.dataclass(kw_only=True)
|
|
34
34
|
class Data:
|
|
35
35
|
pass
|
|
36
36
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from pkgs.serialization import serial_class
|
|
13
13
|
from pkgs.serialization import serial_union_annotation
|
|
14
14
|
from ... import base_t
|
|
@@ -35,7 +35,7 @@ ENDPOINT_PATH = "api/external/recipes/set_recipe_output_annotations"
|
|
|
35
35
|
@serial_class(
|
|
36
36
|
to_string_values={"lower_value", "upper_value"},
|
|
37
37
|
)
|
|
38
|
-
@dataclass(kw_only=True)
|
|
38
|
+
@dataclasses.dataclass(kw_only=True)
|
|
39
39
|
class AnnotationEdit:
|
|
40
40
|
annotation_type_key: identifier_t.IdentifierKey
|
|
41
41
|
lower_value: typing.Optional[Decimal] = None
|
|
@@ -49,7 +49,7 @@ class AnnotationUpdateType(StrEnum):
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
52
|
-
@dataclass(kw_only=True)
|
|
52
|
+
@dataclasses.dataclass(kw_only=True)
|
|
53
53
|
class RecipeOutputEditBase:
|
|
54
54
|
recipe_id: base_t.ObjectId
|
|
55
55
|
output_id: base_t.ObjectId
|
|
@@ -62,7 +62,7 @@ class RecipeOutputEditBase:
|
|
|
62
62
|
@serial_class(
|
|
63
63
|
parse_require={"type"},
|
|
64
64
|
)
|
|
65
|
-
@dataclass(kw_only=True)
|
|
65
|
+
@dataclasses.dataclass(kw_only=True)
|
|
66
66
|
class RecipeOutputMergeAnnotations(RecipeOutputEditBase):
|
|
67
67
|
type: typing.Literal[AnnotationUpdateType.MERGE] = AnnotationUpdateType.MERGE
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ class RecipeOutputMergeAnnotations(RecipeOutputEditBase):
|
|
|
71
71
|
@serial_class(
|
|
72
72
|
parse_require={"type"},
|
|
73
73
|
)
|
|
74
|
-
@dataclass(kw_only=True)
|
|
74
|
+
@dataclasses.dataclass(kw_only=True)
|
|
75
75
|
class RecipeOutputReplaceAnnotations(RecipeOutputEditBase):
|
|
76
76
|
type: typing.Literal[AnnotationUpdateType.REPLACE] = AnnotationUpdateType.REPLACE
|
|
77
77
|
|
|
@@ -90,13 +90,13 @@ RecipeOutputUpdateAnnotations = typing.Annotated[
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
93
|
-
@dataclass(kw_only=True)
|
|
93
|
+
@dataclasses.dataclass(kw_only=True)
|
|
94
94
|
class Arguments:
|
|
95
95
|
updates: list[RecipeOutputUpdateAnnotations]
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
99
|
-
@dataclass(kw_only=True)
|
|
99
|
+
@dataclasses.dataclass(kw_only=True)
|
|
100
100
|
class Data:
|
|
101
101
|
pass
|
|
102
102
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
from ... import base_t
|
|
13
13
|
from ... import recipes_t
|
|
@@ -27,7 +27,7 @@ ENDPOINT_PATH = "api/external/recipes/external_set_recipe_outputs"
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
30
|
-
@dataclass(kw_only=True)
|
|
30
|
+
@dataclasses.dataclass(kw_only=True)
|
|
31
31
|
class CurveValues:
|
|
32
32
|
x_values: list[typing.Optional[Decimal]]
|
|
33
33
|
y_values: list[typing.Optional[Decimal]]
|
|
@@ -37,7 +37,7 @@ class CurveValues:
|
|
|
37
37
|
@serial_class(
|
|
38
38
|
to_string_values={"value_numeric"},
|
|
39
39
|
)
|
|
40
|
-
@dataclass(kw_only=True)
|
|
40
|
+
@dataclasses.dataclass(kw_only=True)
|
|
41
41
|
class RecipeOutputValue:
|
|
42
42
|
recipe_id: base_t.ObjectId
|
|
43
43
|
output_id: base_t.ObjectId
|
|
@@ -50,13 +50,13 @@ class RecipeOutputValue:
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
53
|
-
@dataclass(kw_only=True)
|
|
53
|
+
@dataclasses.dataclass(kw_only=True)
|
|
54
54
|
class Arguments:
|
|
55
55
|
output_data: list[RecipeOutputValue]
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
59
|
-
@dataclass(kw_only=True)
|
|
59
|
+
@dataclasses.dataclass(kw_only=True)
|
|
60
60
|
class Data(response_t.Response):
|
|
61
61
|
pass
|
|
62
62
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from pkgs.serialization import serial_class
|
|
13
13
|
from ... import base_t
|
|
14
14
|
from ... import identifier_t
|
|
@@ -38,7 +38,7 @@ class RecipeTagUpdateType(StrEnum):
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
41
|
-
@dataclass(kw_only=True)
|
|
41
|
+
@dataclasses.dataclass(kw_only=True)
|
|
42
42
|
class RecipeTagUpdateBase:
|
|
43
43
|
type: RecipeTagUpdateType
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ class RecipeTagUpdateBase:
|
|
|
47
47
|
@serial_class(
|
|
48
48
|
parse_require={"type"},
|
|
49
49
|
)
|
|
50
|
-
@dataclass(kw_only=True)
|
|
50
|
+
@dataclasses.dataclass(kw_only=True)
|
|
51
51
|
class RecipeTagAppend(RecipeTagUpdateBase):
|
|
52
52
|
type: typing.Literal[RecipeTagUpdateType.APPEND] = RecipeTagUpdateType.APPEND
|
|
53
53
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -57,7 +57,7 @@ class RecipeTagAppend(RecipeTagUpdateBase):
|
|
|
57
57
|
@serial_class(
|
|
58
58
|
parse_require={"type"},
|
|
59
59
|
)
|
|
60
|
-
@dataclass(kw_only=True)
|
|
60
|
+
@dataclasses.dataclass(kw_only=True)
|
|
61
61
|
class RecipeTagRemove(RecipeTagUpdateBase):
|
|
62
62
|
type: typing.Literal[RecipeTagUpdateType.REMOVE] = RecipeTagUpdateType.REMOVE
|
|
63
63
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -67,7 +67,7 @@ class RecipeTagRemove(RecipeTagUpdateBase):
|
|
|
67
67
|
@serial_class(
|
|
68
68
|
parse_require={"type"},
|
|
69
69
|
)
|
|
70
|
-
@dataclass(kw_only=True)
|
|
70
|
+
@dataclasses.dataclass(kw_only=True)
|
|
71
71
|
class RecipeTagOverride(RecipeTagUpdateBase):
|
|
72
72
|
type: typing.Literal[RecipeTagUpdateType.OVERRIDE] = RecipeTagUpdateType.OVERRIDE
|
|
73
73
|
recipe_tag_ids: list[base_t.ObjectId]
|
|
@@ -78,14 +78,14 @@ RecipeTagUpdate = typing.Union[RecipeTagAppend, RecipeTagRemove, RecipeTagOverri
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
81
|
-
@dataclass(kw_only=True)
|
|
81
|
+
@dataclasses.dataclass(kw_only=True)
|
|
82
82
|
class Arguments:
|
|
83
83
|
recipe_key: identifier_t.IdentifierKey
|
|
84
84
|
recipe_tag_update: RecipeTagUpdate
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
88
|
-
@dataclass(kw_only=True)
|
|
88
|
+
@dataclasses.dataclass(kw_only=True)
|
|
89
89
|
class Data:
|
|
90
90
|
pass
|
|
91
91
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from ... import identifier_t
|
|
12
12
|
|
|
13
13
|
__all__: list[str] = [
|
|
@@ -22,13 +22,13 @@ ENDPOINT_PATH = "api/external/recipes/unarchive"
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
25
|
-
@dataclass(kw_only=True)
|
|
25
|
+
@dataclasses.dataclass(kw_only=True)
|
|
26
26
|
class Arguments:
|
|
27
27
|
recipes: list[identifier_t.IdentifierKey]
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
|
-
@dataclass(kw_only=True)
|
|
31
|
+
@dataclasses.dataclass(kw_only=True)
|
|
32
32
|
class Data:
|
|
33
33
|
pass
|
|
34
34
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from ... import identifier_t
|
|
13
13
|
|
|
14
14
|
__all__: list[str] = [
|
|
@@ -29,7 +29,7 @@ class RecipeUnlockType(StrEnum):
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
32
|
-
@dataclass(kw_only=True)
|
|
32
|
+
@dataclasses.dataclass(kw_only=True)
|
|
33
33
|
class Arguments:
|
|
34
34
|
type: RecipeUnlockType = RecipeUnlockType.STANDARD
|
|
35
35
|
recipes: list[identifier_t.IdentifierKey]
|
|
@@ -37,7 +37,7 @@ class Arguments:
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
40
|
-
@dataclass(kw_only=True)
|
|
40
|
+
@dataclasses.dataclass(kw_only=True)
|
|
41
41
|
class Data:
|
|
42
42
|
pass
|
|
43
43
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from ... import entity_t
|
|
12
12
|
from ... import response_t
|
|
13
13
|
|
|
@@ -23,14 +23,14 @@ ENDPOINT_PATH = "api/external/triggers/run_trigger"
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
26
|
-
@dataclass(kw_only=True)
|
|
26
|
+
@dataclasses.dataclass(kw_only=True)
|
|
27
27
|
class Arguments:
|
|
28
28
|
trigger_ref_name: str
|
|
29
29
|
entity: typing.Optional[entity_t.Entity] = None
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
33
|
-
@dataclass(kw_only=True)
|
|
33
|
+
@dataclasses.dataclass(kw_only=True)
|
|
34
34
|
class Data(response_t.Response):
|
|
35
35
|
pass
|
|
36
36
|
# 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,38 @@
|
|
|
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
|
+
import dataclasses
|
|
11
|
+
from ... import async_batch_t
|
|
12
|
+
from ... import base_t
|
|
13
|
+
from ... import identifier_t
|
|
14
|
+
|
|
15
|
+
__all__: list[str] = [
|
|
16
|
+
"Arguments",
|
|
17
|
+
"Data",
|
|
18
|
+
"ENDPOINT_METHOD",
|
|
19
|
+
"ENDPOINT_PATH",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
ENDPOINT_METHOD = "POST"
|
|
23
|
+
ENDPOINT_PATH = "api/external/uploader/invoke_uploader"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
27
|
+
@dataclasses.dataclass(kw_only=True)
|
|
28
|
+
class Arguments:
|
|
29
|
+
file_ids: list[base_t.ObjectId]
|
|
30
|
+
uploader_key: identifier_t.IdentifierKey
|
|
31
|
+
material_family_keys: list[identifier_t.IdentifierKey]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
35
|
+
@dataclasses.dataclass(kw_only=True)
|
|
36
|
+
class Data(async_batch_t.AsyncBatchActionReturn):
|
|
37
|
+
pass
|
|
38
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -14,6 +14,7 @@ from uncountable.types import base_t
|
|
|
14
14
|
import uncountable.types.api.recipes.create_recipe as create_recipe_t
|
|
15
15
|
import uncountable.types.api.recipes.edit_recipe_inputs as edit_recipe_inputs_t
|
|
16
16
|
from uncountable.types import identifier_t
|
|
17
|
+
import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
|
|
17
18
|
from uncountable.types import recipe_identifiers_t
|
|
18
19
|
from uncountable.types import recipe_metadata_t
|
|
19
20
|
from uncountable.types import recipe_workflow_steps_t
|
|
@@ -156,6 +157,41 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
156
157
|
batch_reference=req.batch_reference,
|
|
157
158
|
)
|
|
158
159
|
|
|
160
|
+
def invoke_uploader(
|
|
161
|
+
self,
|
|
162
|
+
*,
|
|
163
|
+
file_ids: list[base_t.ObjectId],
|
|
164
|
+
uploader_key: identifier_t.IdentifierKey,
|
|
165
|
+
material_family_keys: list[identifier_t.IdentifierKey],
|
|
166
|
+
depends_on: typing.Optional[list[str]] = None,
|
|
167
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
168
|
+
"""Runs files through an uploader.
|
|
169
|
+
|
|
170
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
171
|
+
"""
|
|
172
|
+
args = invoke_uploader_t.Arguments(
|
|
173
|
+
file_ids=file_ids,
|
|
174
|
+
uploader_key=uploader_key,
|
|
175
|
+
material_family_keys=material_family_keys,
|
|
176
|
+
)
|
|
177
|
+
json_data = serialize_for_api(args)
|
|
178
|
+
|
|
179
|
+
batch_reference = str(uuid.uuid4())
|
|
180
|
+
|
|
181
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
182
|
+
path=async_batch_t.AsyncBatchRequestPath.INVOKE_UPLOADER,
|
|
183
|
+
data=json_data,
|
|
184
|
+
depends_on=depends_on,
|
|
185
|
+
batch_reference=batch_reference,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
self._enqueue(req)
|
|
189
|
+
|
|
190
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
191
|
+
path=req.path,
|
|
192
|
+
batch_reference=req.batch_reference,
|
|
193
|
+
)
|
|
194
|
+
|
|
159
195
|
def set_recipe_metadata(
|
|
160
196
|
self,
|
|
161
197
|
*,
|
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from pkgs.serialization import serial_class
|
|
13
13
|
from . import base_t
|
|
14
14
|
|
|
@@ -30,13 +30,15 @@ class AsyncBatchRequestPath(StrEnum):
|
|
|
30
30
|
LOCK_RECIPES = "recipes/lock_recipes"
|
|
31
31
|
UNLOCK_RECIPES = "recipes/unlock_recipes"
|
|
32
32
|
ASSOCIATE_EQUIPMENT_INPUT = "equipment/associate_equipment_input"
|
|
33
|
+
INVOKE_UPLOADER = "uploader/invoke_uploader"
|
|
34
|
+
ASSOCIATE_RECIPE_AS_INPUT = "recipes/associate_recipe_as_input"
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
36
38
|
@serial_class(
|
|
37
39
|
unconverted_values={"data"},
|
|
38
40
|
)
|
|
39
|
-
@dataclass(kw_only=True)
|
|
41
|
+
@dataclasses.dataclass(kw_only=True)
|
|
40
42
|
class AsyncBatchRequest:
|
|
41
43
|
path: AsyncBatchRequestPath
|
|
42
44
|
data: base_t.JsonValue
|
|
@@ -45,14 +47,14 @@ class AsyncBatchRequest:
|
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
48
|
-
@dataclass(kw_only=True)
|
|
50
|
+
@dataclasses.dataclass(kw_only=True)
|
|
49
51
|
class AsyncBatchActionReturn:
|
|
50
52
|
modification_made: bool
|
|
51
53
|
result_id: typing.Optional[base_t.ObjectId] = None
|
|
52
54
|
|
|
53
55
|
|
|
54
56
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
55
|
-
@dataclass(kw_only=True, frozen=True, eq=True)
|
|
57
|
+
@dataclasses.dataclass(kw_only=True, frozen=True, eq=True)
|
|
56
58
|
class QueuedAsyncBatchRequest:
|
|
57
59
|
path: AsyncBatchRequestPath
|
|
58
60
|
batch_reference: str
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from . import base_t
|
|
12
12
|
|
|
13
13
|
__all__: list[str] = [
|
|
@@ -16,7 +16,7 @@ __all__: list[str] = [
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
19
|
-
@dataclass(kw_only=True)
|
|
19
|
+
@dataclasses.dataclass(kw_only=True)
|
|
20
20
|
class Calculation:
|
|
21
21
|
id: base_t.ObjectId
|
|
22
22
|
name: str
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
|
|
13
13
|
__all__: list[str] = [
|
|
@@ -19,7 +19,7 @@ __all__: list[str] = [
|
|
|
19
19
|
@serial_class(
|
|
20
20
|
to_string_values={"molecular_weight"},
|
|
21
21
|
)
|
|
22
|
-
@dataclass(kw_only=True)
|
|
22
|
+
@dataclasses.dataclass(kw_only=True)
|
|
23
23
|
class ChemicalStructure:
|
|
24
24
|
ketcher_file: typing.Optional[str] = None
|
|
25
25
|
gross_formula: typing.Optional[str] = None
|
uncountable/types/client_base.py
CHANGED
|
@@ -47,6 +47,7 @@ import uncountable.types.api.recipes.get_recipe_output_metadata as get_recipe_ou
|
|
|
47
47
|
import uncountable.types.api.recipes.get_recipes_data as get_recipes_data_t
|
|
48
48
|
from uncountable.types import id_source_t
|
|
49
49
|
from uncountable.types import identifier_t
|
|
50
|
+
import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
|
|
50
51
|
import uncountable.types.api.entity.list_entities as list_entities_t
|
|
51
52
|
import uncountable.types.api.id_source.list_id_source as list_id_source_t
|
|
52
53
|
import uncountable.types.api.entity.lock_entity as lock_entity_t
|
|
@@ -81,12 +82,12 @@ import uncountable.types.api.recipes.unlock_recipes as unlock_recipes_t
|
|
|
81
82
|
import uncountable.types.api.material_families.update_entity_material_families as update_entity_material_families_t
|
|
82
83
|
import uncountable.types.api.field_options.upsert_field_options as upsert_field_options_t
|
|
83
84
|
from abc import ABC, abstractmethod
|
|
84
|
-
|
|
85
|
+
import dataclasses
|
|
85
86
|
|
|
86
87
|
DT = typing.TypeVar("DT")
|
|
87
88
|
|
|
88
89
|
|
|
89
|
-
@dataclass(kw_only=True)
|
|
90
|
+
@dataclasses.dataclass(kw_only=True)
|
|
90
91
|
class APIRequest:
|
|
91
92
|
method: str
|
|
92
93
|
endpoint: str
|
|
@@ -850,6 +851,28 @@ class ClientMethods(ABC):
|
|
|
850
851
|
)
|
|
851
852
|
return self.do_request(api_request=api_request, return_type=get_recipes_data_t.Data)
|
|
852
853
|
|
|
854
|
+
def invoke_uploader(
|
|
855
|
+
self,
|
|
856
|
+
*,
|
|
857
|
+
file_ids: list[base_t.ObjectId],
|
|
858
|
+
uploader_key: identifier_t.IdentifierKey,
|
|
859
|
+
material_family_keys: list[identifier_t.IdentifierKey],
|
|
860
|
+
) -> invoke_uploader_t.Data:
|
|
861
|
+
"""Runs files through an uploader.
|
|
862
|
+
|
|
863
|
+
"""
|
|
864
|
+
args = invoke_uploader_t.Arguments(
|
|
865
|
+
file_ids=file_ids,
|
|
866
|
+
uploader_key=uploader_key,
|
|
867
|
+
material_family_keys=material_family_keys,
|
|
868
|
+
)
|
|
869
|
+
api_request = APIRequest(
|
|
870
|
+
method=invoke_uploader_t.ENDPOINT_METHOD,
|
|
871
|
+
endpoint=invoke_uploader_t.ENDPOINT_PATH,
|
|
872
|
+
args=args,
|
|
873
|
+
)
|
|
874
|
+
return self.do_request(api_request=api_request, return_type=invoke_uploader_t.Data)
|
|
875
|
+
|
|
853
876
|
def list_entities(
|
|
854
877
|
self,
|
|
855
878
|
*,
|
uncountable/types/curves_t.py
CHANGED
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from pkgs.serialization import serial_class
|
|
13
13
|
from . import base_t
|
|
14
14
|
|
|
@@ -26,7 +26,7 @@ class CurveAxisType(StrEnum):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
29
|
-
@dataclass(kw_only=True)
|
|
29
|
+
@dataclasses.dataclass(kw_only=True)
|
|
30
30
|
class Curve:
|
|
31
31
|
id: base_t.ObjectId
|
|
32
32
|
x_type: typing.Union[typing.Literal[CurveAxisType.NUMERIC], typing.Literal[CurveAxisType.TIMESTAMP]]
|
|
@@ -39,7 +39,7 @@ class Curve:
|
|
|
39
39
|
@serial_class(
|
|
40
40
|
to_string_values={"quantity"},
|
|
41
41
|
)
|
|
42
|
-
@dataclass(kw_only=True)
|
|
42
|
+
@dataclasses.dataclass(kw_only=True)
|
|
43
43
|
class CurveValue:
|
|
44
44
|
index: int
|
|
45
45
|
quantity: typing.Optional[Decimal] = None
|
uncountable/types/entity_t.py
CHANGED
|
@@ -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 pkgs.strenum_compat import StrEnum
|
|
11
|
-
|
|
11
|
+
import dataclasses
|
|
12
12
|
from pkgs.serialization import serial_string_enum
|
|
13
13
|
from . import base_t
|
|
14
14
|
|
|
@@ -267,7 +267,7 @@ class EntityType(StrEnum):
|
|
|
267
267
|
|
|
268
268
|
|
|
269
269
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
270
|
-
@dataclass(kw_only=True)
|
|
270
|
+
@dataclasses.dataclass(kw_only=True)
|
|
271
271
|
class Entity:
|
|
272
272
|
id: base_t.ObjectId
|
|
273
273
|
type: EntityType
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from . import base_t
|
|
12
12
|
|
|
13
13
|
__all__: list[str] = [
|
|
@@ -16,7 +16,7 @@ __all__: list[str] = [
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
19
|
-
@dataclass(kw_only=True)
|
|
19
|
+
@dataclasses.dataclass(kw_only=True)
|
|
20
20
|
class SimpleExperimentGroup:
|
|
21
21
|
experiment_group_id: base_t.ObjectId
|
|
22
22
|
name: str
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from pkgs.serialization import serial_class
|
|
12
12
|
from . import base_t
|
|
13
13
|
|
|
@@ -23,7 +23,7 @@ __all__: list[str] = [
|
|
|
23
23
|
@serial_class(
|
|
24
24
|
unconverted_values={"value"},
|
|
25
25
|
)
|
|
26
|
-
@dataclass(kw_only=True)
|
|
26
|
+
@dataclasses.dataclass(kw_only=True)
|
|
27
27
|
class FieldRefNameValue:
|
|
28
28
|
field_ref_name: str
|
|
29
29
|
value: base_t.JsonValue
|
|
@@ -34,7 +34,7 @@ class FieldRefNameValue:
|
|
|
34
34
|
@serial_class(
|
|
35
35
|
unconverted_values={"value"},
|
|
36
36
|
)
|
|
37
|
-
@dataclass(kw_only=True)
|
|
37
|
+
@dataclasses.dataclass(kw_only=True)
|
|
38
38
|
class FieldRefIdNameValue:
|
|
39
39
|
field_id: base_t.ObjectId
|
|
40
40
|
field_ref_name: str
|
|
@@ -46,7 +46,7 @@ class FieldRefIdNameValue:
|
|
|
46
46
|
@serial_class(
|
|
47
47
|
unconverted_values={"value"},
|
|
48
48
|
)
|
|
49
|
-
@dataclass(kw_only=True)
|
|
49
|
+
@dataclasses.dataclass(kw_only=True)
|
|
50
50
|
class ArgumentValueRefName:
|
|
51
51
|
field_ref_name: str
|
|
52
52
|
value: base_t.JsonValue
|
|
@@ -57,7 +57,7 @@ class ArgumentValueRefName:
|
|
|
57
57
|
@serial_class(
|
|
58
58
|
unconverted_values={"value"},
|
|
59
59
|
)
|
|
60
|
-
@dataclass(kw_only=True)
|
|
60
|
+
@dataclasses.dataclass(kw_only=True)
|
|
61
61
|
class ArgumentValueId:
|
|
62
62
|
field_id: base_t.ObjectId
|
|
63
63
|
value: base_t.JsonValue
|
uncountable/types/fields_t.py
CHANGED
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
import typing # noqa: F401
|
|
8
8
|
import datetime # noqa: F401
|
|
9
9
|
from decimal import Decimal # noqa: F401
|
|
10
|
-
|
|
10
|
+
import dataclasses
|
|
11
11
|
from . import base_t
|
|
12
12
|
|
|
13
13
|
__all__: list[str] = [
|
|
@@ -16,7 +16,7 @@ __all__: list[str] = [
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
19
|
-
@dataclass(kw_only=True)
|
|
19
|
+
@dataclasses.dataclass(kw_only=True)
|
|
20
20
|
class Field:
|
|
21
21
|
id: base_t.ObjectId
|
|
22
22
|
name: str
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# flake8: noqa: F821
|
|
2
|
+
# ruff: noqa: E402 Q003
|
|
3
|
+
# fmt: off
|
|
4
|
+
# isort: skip_file
|
|
5
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
6
|
+
# Kept only for SDK backwards compatibility
|
|
7
|
+
from .generic_upload_t import GenericRemoteDirectoryScope as GenericRemoteDirectoryScope
|
|
8
|
+
from .generic_upload_t import GenericUploadStrategy as GenericUploadStrategy
|
|
9
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|