UncountablePythonSDK 0.0.126__py3-none-any.whl → 0.0.142.dev0__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/requirements.txt +1 -1
- examples/integration-server/jobs/materials_auto/example_cron.py +1 -1
- examples/integration-server/jobs/materials_auto/example_instrument.py +68 -38
- examples/integration-server/jobs/materials_auto/example_parse.py +140 -0
- examples/integration-server/jobs/materials_auto/example_predictions.py +61 -0
- examples/integration-server/jobs/materials_auto/example_runsheet_wh.py +57 -16
- examples/integration-server/jobs/materials_auto/profile.yaml +18 -0
- examples/integration-server/pyproject.toml +4 -4
- pkgs/argument_parser/argument_parser.py +20 -1
- pkgs/serialization_util/serialization_helpers.py +3 -1
- pkgs/type_spec/builder.py +43 -13
- pkgs/type_spec/builder_types.py +9 -0
- pkgs/type_spec/cross_output_links.py +2 -10
- pkgs/type_spec/emit_open_api.py +0 -12
- pkgs/type_spec/emit_python.py +72 -11
- pkgs/type_spec/emit_typescript.py +2 -2
- pkgs/type_spec/emit_typescript_util.py +28 -6
- pkgs/type_spec/load_types.py +1 -1
- pkgs/type_spec/parts/base.ts.prepart +3 -0
- pkgs/type_spec/type_info/emit_type_info.py +27 -3
- pkgs/type_spec/value_spec/__main__.py +2 -2
- uncountable/core/client.py +10 -3
- uncountable/integration/cli.py +89 -2
- uncountable/integration/executors/executors.py +1 -2
- uncountable/integration/executors/generic_upload_executor.py +1 -1
- uncountable/integration/job.py +3 -3
- uncountable/integration/queue_runner/command_server/__init__.py +4 -0
- uncountable/integration/queue_runner/command_server/command_client.py +63 -0
- uncountable/integration/queue_runner/command_server/command_server.py +77 -5
- uncountable/integration/queue_runner/command_server/protocol/command_server.proto +33 -0
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.py +27 -13
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.pyi +53 -1
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2_grpc.py +135 -0
- uncountable/integration/queue_runner/command_server/types.py +44 -1
- uncountable/integration/queue_runner/datastore/datastore_sqlite.py +132 -8
- uncountable/integration/queue_runner/datastore/interface.py +3 -0
- uncountable/integration/queue_runner/datastore/model.py +8 -1
- uncountable/integration/queue_runner/job_scheduler.py +78 -3
- uncountable/integration/queue_runner/types.py +2 -0
- uncountable/integration/queue_runner/worker.py +28 -26
- uncountable/integration/scheduler.py +64 -13
- uncountable/integration/server.py +36 -6
- uncountable/integration/telemetry.py +120 -7
- uncountable/integration/webhook_server/entrypoint.py +2 -0
- uncountable/types/__init__.py +18 -0
- uncountable/types/api/entity/list_aggregate.py +79 -0
- uncountable/types/api/entity/list_entities.py +25 -0
- uncountable/types/api/entity/set_barcode.py +43 -0
- uncountable/types/api/entity/transition_entity_phase.py +2 -1
- uncountable/types/api/files/download_file.py +15 -1
- uncountable/types/api/integrations/push_notification.py +2 -0
- uncountable/types/api/integrations/register_sockets_token.py +41 -0
- uncountable/types/api/listing/__init__.py +1 -0
- uncountable/types/api/listing/fetch_listing.py +57 -0
- uncountable/types/api/notebooks/__init__.py +1 -0
- uncountable/types/api/notebooks/add_notebook_content.py +119 -0
- uncountable/types/api/outputs/get_output_organization.py +1 -1
- uncountable/types/api/recipes/edit_recipe_inputs.py +1 -1
- uncountable/types/api/recipes/get_recipes_data.py +29 -0
- uncountable/types/api/recipes/lock_recipes.py +2 -1
- uncountable/types/api/recipes/set_recipe_total.py +59 -0
- uncountable/types/api/recipes/unlock_recipes.py +2 -1
- uncountable/types/api/runsheet/export_default_runsheet.py +44 -0
- uncountable/types/api/uploader/complete_async_parse.py +4 -0
- uncountable/types/async_batch_processor.py +222 -0
- uncountable/types/async_batch_t.py +4 -0
- uncountable/types/client_base.py +367 -2
- uncountable/types/client_config.py +1 -0
- uncountable/types/client_config_t.py +10 -0
- uncountable/types/entity_t.py +3 -1
- uncountable/types/integration_server_t.py +2 -0
- uncountable/types/listing.py +46 -0
- uncountable/types/listing_t.py +533 -0
- uncountable/types/notices.py +8 -0
- uncountable/types/notices_t.py +37 -0
- uncountable/types/queued_job.py +1 -0
- uncountable/types/queued_job_t.py +9 -0
- uncountable/types/sockets.py +9 -0
- uncountable/types/sockets_t.py +99 -0
- uncountable/types/uploader_t.py +3 -2
- {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/METADATA +4 -2
- {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/RECORD +84 -68
- {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/WHEEL +0 -0
- {uncountablepythonsdk-0.0.126.dist-info → uncountablepythonsdk-0.0.142.dev0.dist-info}/top_level.txt +0 -0
|
@@ -13,6 +13,8 @@ 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
|
+
from uncountable.types import client_config_t
|
|
17
|
+
import uncountable.types.api.uploader.complete_async_parse as complete_async_parse_t
|
|
16
18
|
import uncountable.types.api.runsheet.complete_async_upload as complete_async_upload_t
|
|
17
19
|
import uncountable.types.api.recipes.create_mix_order as create_mix_order_t
|
|
18
20
|
import uncountable.types.api.entity.create_or_update_entity as create_or_update_entity_t
|
|
@@ -24,14 +26,20 @@ from uncountable.types import generic_upload_t
|
|
|
24
26
|
import uncountable.types.api.entity.grant_entity_permissions as grant_entity_permissions_t
|
|
25
27
|
from uncountable.types import identifier_t
|
|
26
28
|
import uncountable.types.api.uploader.invoke_uploader as invoke_uploader_t
|
|
29
|
+
import uncountable.types.api.recipes.lock_recipes as lock_recipes_t
|
|
27
30
|
import uncountable.types.api.entity.lookup_entity as lookup_entity_t
|
|
31
|
+
from uncountable.types import notices_t
|
|
28
32
|
from uncountable.types import notifications_t
|
|
29
33
|
import uncountable.types.api.integrations.push_notification as push_notification_t
|
|
30
34
|
from uncountable.types import recipe_identifiers_t
|
|
31
35
|
from uncountable.types import recipe_metadata_t
|
|
32
36
|
from uncountable.types import recipe_workflow_steps_t
|
|
37
|
+
import uncountable.types.api.entity.set_barcode as set_barcode_t
|
|
33
38
|
import uncountable.types.api.entity.set_entity_field_values as set_entity_field_values_t
|
|
34
39
|
import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
|
|
40
|
+
import uncountable.types.api.entity.transition_entity_phase as transition_entity_phase_t
|
|
41
|
+
import uncountable.types.api.recipes.unlock_recipes as unlock_recipes_t
|
|
42
|
+
from uncountable.types import uploader_t
|
|
35
43
|
import uncountable.types.api.condition_parameters.upsert_condition_match as upsert_condition_match_t
|
|
36
44
|
import uuid
|
|
37
45
|
from abc import ABC, abstractmethod
|
|
@@ -53,6 +61,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
53
61
|
equipment_key: identifier_t.IdentifierKey,
|
|
54
62
|
material_family_ids: list[base_t.ObjectId],
|
|
55
63
|
depends_on: list[str] | None = None,
|
|
64
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
56
65
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
57
66
|
"""Create or return the input association for equipment
|
|
58
67
|
|
|
@@ -89,6 +98,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
89
98
|
input_key: identifier_t.IdentifierKey | None = None,
|
|
90
99
|
show_in_listings: bool | None = None,
|
|
91
100
|
depends_on: list[str] | None = None,
|
|
101
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
92
102
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
93
103
|
"""Create or return the input association for a recipe
|
|
94
104
|
|
|
@@ -126,6 +136,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
126
136
|
recipe_key: identifier_t.IdentifierKey,
|
|
127
137
|
ingredient_key: identifier_t.IdentifierKey,
|
|
128
138
|
depends_on: list[str] | None = None,
|
|
139
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
129
140
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
130
141
|
"""Create a new lot association for the provided recipe with the provided ingredient
|
|
131
142
|
|
|
@@ -160,6 +171,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
160
171
|
*,
|
|
161
172
|
recipe_key: identifier_t.IdentifierKey,
|
|
162
173
|
depends_on: list[str] | None = None,
|
|
174
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
163
175
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
164
176
|
"""Clears all output values & output metadata for a given recipe
|
|
165
177
|
|
|
@@ -187,12 +199,49 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
187
199
|
batch_reference=req.batch_reference,
|
|
188
200
|
)
|
|
189
201
|
|
|
202
|
+
def complete_async_parse(
|
|
203
|
+
self,
|
|
204
|
+
*,
|
|
205
|
+
parsed_file_data: list[uploader_t.ParsedFileData],
|
|
206
|
+
async_job_key: identifier_t.IdentifierKey,
|
|
207
|
+
upload_destination: generic_upload_t.UploadDestinationRecipe,
|
|
208
|
+
depends_on: list[str] | None = None,
|
|
209
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
210
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
211
|
+
"""Parses uploaded files asynchronously
|
|
212
|
+
|
|
213
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
214
|
+
"""
|
|
215
|
+
args = complete_async_parse_t.Arguments(
|
|
216
|
+
parsed_file_data=parsed_file_data,
|
|
217
|
+
async_job_key=async_job_key,
|
|
218
|
+
upload_destination=upload_destination,
|
|
219
|
+
)
|
|
220
|
+
json_data = serialize_for_api(args)
|
|
221
|
+
|
|
222
|
+
batch_reference = str(uuid.uuid4())
|
|
223
|
+
|
|
224
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
225
|
+
path=async_batch_t.AsyncBatchRequestPath.COMPLETE_ASYNC_PARSE,
|
|
226
|
+
data=json_data,
|
|
227
|
+
depends_on=depends_on,
|
|
228
|
+
batch_reference=batch_reference,
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
self._enqueue(req)
|
|
232
|
+
|
|
233
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
234
|
+
path=req.path,
|
|
235
|
+
batch_reference=req.batch_reference,
|
|
236
|
+
)
|
|
237
|
+
|
|
190
238
|
def complete_async_upload(
|
|
191
239
|
self,
|
|
192
240
|
*,
|
|
193
241
|
async_job_id: base_t.ObjectId,
|
|
194
242
|
file_id: base_t.ObjectId,
|
|
195
243
|
depends_on: list[str] | None = None,
|
|
244
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
196
245
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
197
246
|
"""Processes an file id with a given async job id to be uploaded asynchronously
|
|
198
247
|
|
|
@@ -226,6 +275,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
226
275
|
recipe_key: identifier_t.IdentifierKey,
|
|
227
276
|
recipe_workflow_step_identifier: recipe_workflow_steps_t.RecipeWorkflowStepIdentifier,
|
|
228
277
|
depends_on: list[str] | None = None,
|
|
278
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
229
279
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
230
280
|
"""Creates mix order on a recipe workflow step
|
|
231
281
|
|
|
@@ -262,6 +312,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
262
312
|
entity_key: identifier_t.IdentifierKey | None = None,
|
|
263
313
|
on_create_init_field_values: list[field_values_t.FieldArgumentValue] | None = None,
|
|
264
314
|
depends_on: list[str] | None = None,
|
|
315
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
265
316
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
266
317
|
"""Creates or updates field values for an entity
|
|
267
318
|
|
|
@@ -305,6 +356,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
305
356
|
identifiers: recipe_identifiers_t.RecipeIdentifiers | None = None,
|
|
306
357
|
definition_key: identifier_t.IdentifierKey | None = None,
|
|
307
358
|
depends_on: list[str] | None = None,
|
|
359
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
308
360
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
309
361
|
"""Returns the id of the recipe being created.
|
|
310
362
|
|
|
@@ -353,6 +405,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
353
405
|
recipe_workflow_step_identifier: recipe_workflow_steps_t.RecipeWorkflowStepIdentifier,
|
|
354
406
|
edits: list[edit_recipe_inputs_t.RecipeInputEdit],
|
|
355
407
|
depends_on: list[str] | None = None,
|
|
408
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
356
409
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
357
410
|
"""Clear, update, or add inputs on a recipe
|
|
358
411
|
|
|
@@ -392,6 +445,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
392
445
|
user_group_keys: list[identifier_t.IdentifierKey] | None = None,
|
|
393
446
|
all_users: bool | None = None,
|
|
394
447
|
depends_on: list[str] | None = None,
|
|
448
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
395
449
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
396
450
|
"""Grant entity permissions to a list of users or user groups or to all users.
|
|
397
451
|
|
|
@@ -431,6 +485,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
431
485
|
file_id: base_t.ObjectId | None = None,
|
|
432
486
|
file_ids: list[base_t.ObjectId] | None = None,
|
|
433
487
|
depends_on: list[str] | None = None,
|
|
488
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
434
489
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
435
490
|
"""Runs a file through an uploader.
|
|
436
491
|
|
|
@@ -461,12 +516,61 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
461
516
|
batch_reference=req.batch_reference,
|
|
462
517
|
)
|
|
463
518
|
|
|
519
|
+
def lock_recipes(
|
|
520
|
+
self,
|
|
521
|
+
*,
|
|
522
|
+
type: lock_recipes_t.RecipeLockType = lock_recipes_t.RecipeLockType.ALL,
|
|
523
|
+
recipes: list[identifier_t.IdentifierKey],
|
|
524
|
+
globally_removable: bool,
|
|
525
|
+
lock_samples: bool | None = None,
|
|
526
|
+
comments: str | None = None,
|
|
527
|
+
depends_on: list[str] | None = None,
|
|
528
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
529
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
530
|
+
"""Lock experiments. Experiments will require unlocking to be editable. Edits to the experiments are blocked while they are locked.
|
|
531
|
+
|
|
532
|
+
:param type: The type of lock to set.
|
|
533
|
+
All = both inputs and measurements are locked.
|
|
534
|
+
Inputs Only = only inputs are locked from editing.
|
|
535
|
+
|
|
536
|
+
:param recipes: The recipes to lock, a maximum of 100 can be sent
|
|
537
|
+
:param globally_removable: If true any user can unlock the experiment. If false the locking user is the only user that can unlock.
|
|
538
|
+
:param lock_samples: Should associated experiment test samples also be locked.
|
|
539
|
+
:param comments: Optional comment describing the purpose of locking
|
|
540
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
541
|
+
"""
|
|
542
|
+
args = lock_recipes_t.Arguments(
|
|
543
|
+
type=type,
|
|
544
|
+
recipes=recipes,
|
|
545
|
+
globally_removable=globally_removable,
|
|
546
|
+
lock_samples=lock_samples,
|
|
547
|
+
comments=comments,
|
|
548
|
+
)
|
|
549
|
+
json_data = serialize_for_api(args)
|
|
550
|
+
|
|
551
|
+
batch_reference = str(uuid.uuid4())
|
|
552
|
+
|
|
553
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
554
|
+
path=async_batch_t.AsyncBatchRequestPath.LOCK_RECIPES,
|
|
555
|
+
data=json_data,
|
|
556
|
+
depends_on=depends_on,
|
|
557
|
+
batch_reference=batch_reference,
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
self._enqueue(req)
|
|
561
|
+
|
|
562
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
563
|
+
path=req.path,
|
|
564
|
+
batch_reference=req.batch_reference,
|
|
565
|
+
)
|
|
566
|
+
|
|
464
567
|
def lookup_entity(
|
|
465
568
|
self,
|
|
466
569
|
*,
|
|
467
570
|
entity_type: entity_t.EntityType,
|
|
468
571
|
query: lookup_entity_t.LookupEntityQuery,
|
|
469
572
|
depends_on: list[str] | None = None,
|
|
573
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
470
574
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
471
575
|
"""Look up an entity based on an identifier or field values
|
|
472
576
|
|
|
@@ -502,7 +606,9 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
502
606
|
message: str,
|
|
503
607
|
display_notice: bool = False,
|
|
504
608
|
entity: entity_t.EntityIdentifier | None = None,
|
|
609
|
+
notice_configuration: notices_t.NotificationNoticeConfiguration | None = None,
|
|
505
610
|
depends_on: list[str] | None = None,
|
|
611
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
506
612
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
507
613
|
"""Push a notification to a user or user group
|
|
508
614
|
|
|
@@ -514,6 +620,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
514
620
|
message=message,
|
|
515
621
|
entity=entity,
|
|
516
622
|
display_notice=display_notice,
|
|
623
|
+
notice_configuration=notice_configuration,
|
|
517
624
|
)
|
|
518
625
|
json_data = serialize_for_api(args)
|
|
519
626
|
|
|
@@ -533,12 +640,47 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
533
640
|
batch_reference=req.batch_reference,
|
|
534
641
|
)
|
|
535
642
|
|
|
643
|
+
def set_barcode(
|
|
644
|
+
self,
|
|
645
|
+
*,
|
|
646
|
+
entity_key: entity_t.EntityIdentifier,
|
|
647
|
+
barcode_value: str,
|
|
648
|
+
depends_on: list[str] | None = None,
|
|
649
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
650
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
651
|
+
"""Sets the barcode for an entity
|
|
652
|
+
|
|
653
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
654
|
+
"""
|
|
655
|
+
args = set_barcode_t.Arguments(
|
|
656
|
+
entity_key=entity_key,
|
|
657
|
+
barcode_value=barcode_value,
|
|
658
|
+
)
|
|
659
|
+
json_data = serialize_for_api(args)
|
|
660
|
+
|
|
661
|
+
batch_reference = str(uuid.uuid4())
|
|
662
|
+
|
|
663
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
664
|
+
path=async_batch_t.AsyncBatchRequestPath.SET_BARCODE,
|
|
665
|
+
data=json_data,
|
|
666
|
+
depends_on=depends_on,
|
|
667
|
+
batch_reference=batch_reference,
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
self._enqueue(req)
|
|
671
|
+
|
|
672
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
673
|
+
path=req.path,
|
|
674
|
+
batch_reference=req.batch_reference,
|
|
675
|
+
)
|
|
676
|
+
|
|
536
677
|
def set_entity_field_values(
|
|
537
678
|
self,
|
|
538
679
|
*,
|
|
539
680
|
entity_identifier: entity_t.EntityIdentifier,
|
|
540
681
|
field_values: list[field_values_t.FieldArgumentValue],
|
|
541
682
|
depends_on: list[str] | None = None,
|
|
683
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
542
684
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
543
685
|
"""Sets field values for an entity
|
|
544
686
|
|
|
@@ -574,6 +716,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
574
716
|
recipe_key: identifier_t.IdentifierKey,
|
|
575
717
|
recipe_metadata: list[recipe_metadata_t.MetadataValue],
|
|
576
718
|
depends_on: list[str] | None = None,
|
|
719
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
577
720
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
578
721
|
"""Set metadata values on a recipe
|
|
579
722
|
|
|
@@ -603,6 +746,84 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
603
746
|
batch_reference=req.batch_reference,
|
|
604
747
|
)
|
|
605
748
|
|
|
749
|
+
def transition_entity_phase(
|
|
750
|
+
self,
|
|
751
|
+
*,
|
|
752
|
+
transition: transition_entity_phase_t.TransitionIdentifier,
|
|
753
|
+
entity: entity_t.Entity | None = None,
|
|
754
|
+
entity_identifier: entity_t.EntityIdentifier | None = None,
|
|
755
|
+
depends_on: list[str] | None = None,
|
|
756
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
757
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
758
|
+
"""Transitions an entity from one phase to another
|
|
759
|
+
|
|
760
|
+
:param entity: Entity to transition. If entity_identifier is provided, this should be omitted.
|
|
761
|
+
:param entity_identifier: Identifier of the entity to transition. If entity is provided, this should be omitted.
|
|
762
|
+
:param transition: Identifier of the transition to perform
|
|
763
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
764
|
+
"""
|
|
765
|
+
args = transition_entity_phase_t.Arguments(
|
|
766
|
+
entity=entity,
|
|
767
|
+
entity_identifier=entity_identifier,
|
|
768
|
+
transition=transition,
|
|
769
|
+
)
|
|
770
|
+
json_data = serialize_for_api(args)
|
|
771
|
+
|
|
772
|
+
batch_reference = str(uuid.uuid4())
|
|
773
|
+
|
|
774
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
775
|
+
path=async_batch_t.AsyncBatchRequestPath.TRANSITION_ENTITY_PHASE,
|
|
776
|
+
data=json_data,
|
|
777
|
+
depends_on=depends_on,
|
|
778
|
+
batch_reference=batch_reference,
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
self._enqueue(req)
|
|
782
|
+
|
|
783
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
784
|
+
path=req.path,
|
|
785
|
+
batch_reference=req.batch_reference,
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
def unlock_recipes(
|
|
789
|
+
self,
|
|
790
|
+
*,
|
|
791
|
+
type: unlock_recipes_t.RecipeUnlockType = unlock_recipes_t.RecipeUnlockType.STANDARD,
|
|
792
|
+
recipes: list[identifier_t.IdentifierKey],
|
|
793
|
+
unlock_samples: bool | None = None,
|
|
794
|
+
depends_on: list[str] | None = None,
|
|
795
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
796
|
+
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
797
|
+
"""Unlock experiments. Experiments will edtiable after unlocking if they are currently locked.
|
|
798
|
+
|
|
799
|
+
:param type: The method to unlock recipes. Default is standard.
|
|
800
|
+
:param recipes: The recipes to unlock, a maximum of 100 can be sent
|
|
801
|
+
:param unlock_samples: Should associated experiment test samples also be unlocked.
|
|
802
|
+
:param depends_on: A list of batch reference keys to process before processing this request
|
|
803
|
+
"""
|
|
804
|
+
args = unlock_recipes_t.Arguments(
|
|
805
|
+
type=type,
|
|
806
|
+
recipes=recipes,
|
|
807
|
+
unlock_samples=unlock_samples,
|
|
808
|
+
)
|
|
809
|
+
json_data = serialize_for_api(args)
|
|
810
|
+
|
|
811
|
+
batch_reference = str(uuid.uuid4())
|
|
812
|
+
|
|
813
|
+
req = async_batch_t.AsyncBatchRequest(
|
|
814
|
+
path=async_batch_t.AsyncBatchRequestPath.UNLOCK_RECIPES,
|
|
815
|
+
data=json_data,
|
|
816
|
+
depends_on=depends_on,
|
|
817
|
+
batch_reference=batch_reference,
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
self._enqueue(req)
|
|
821
|
+
|
|
822
|
+
return async_batch_t.QueuedAsyncBatchRequest(
|
|
823
|
+
path=req.path,
|
|
824
|
+
batch_reference=req.batch_reference,
|
|
825
|
+
)
|
|
826
|
+
|
|
606
827
|
def upsert_condition_match(
|
|
607
828
|
self,
|
|
608
829
|
*,
|
|
@@ -612,6 +833,7 @@ class AsyncBatchProcessorBase(ABC):
|
|
|
612
833
|
output_conditions: list[identifier_t.IdentifierKey] | None = None,
|
|
613
834
|
existing_condition_match: identifier_t.IdentifierKey | None = None,
|
|
614
835
|
depends_on: list[str] | None = None,
|
|
836
|
+
_request_options: client_config_t.RequestOptions | None = None,
|
|
615
837
|
) -> async_batch_t.QueuedAsyncBatchRequest:
|
|
616
838
|
"""Creates or updates condition match
|
|
617
839
|
|
|
@@ -46,6 +46,10 @@ class AsyncBatchRequestPath(StrEnum):
|
|
|
46
46
|
COMPLETE_ASYNC_UPLOAD = "runsheet/complete_async_upload"
|
|
47
47
|
CREATE_MIX_ORDER = "recipes/create_mix_order"
|
|
48
48
|
PUSH_NOTIFICATION = "integrations/push_notification"
|
|
49
|
+
COMPLETE_ASYNC_PARSE = "uploader/complete_async_parse"
|
|
50
|
+
SET_RECIPE_TOTAL = "recipes/set_recipe_total"
|
|
51
|
+
TRANSITION_ENTITY_PHASE = "entity/transition_entity_phase"
|
|
52
|
+
SET_BARCODE = "entity/set_barcode"
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
# DO NOT MODIFY -- This file is generated by type_spec
|