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