UncountablePythonSDK 0.0.34__py3-none-any.whl → 0.0.36__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: UncountablePythonSDK
3
- Version: 0.0.34
3
+ Version: 0.0.36
4
4
  Summary: Uncountable SDK
5
5
  Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
6
6
  Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
@@ -16,6 +16,7 @@ docs/static/favicons/mstile-150x150.png,sha256=eAK4QdEofhdLtfmjuPTpnX3MJqYnvGXsH
16
16
  docs/static/favicons/safari-pinned-tab.svg,sha256=S84fRnz0ZxLnQrKtmmFZytiRyu1xLtMR_RVy5jmwU7k,1926
17
17
  examples/async_batch.py,sha256=CffQ8O9drJ-Mdd6S5DnMIOBsHv5aVkTZrD3l3xBnB4s,1094
18
18
  examples/create_entity.py,sha256=noZdtJ5f9Wfiob3zUH-8bDVbrCPJnFtXFk_W9pSjvUA,664
19
+ examples/edit_recipe_inputs.py,sha256=f1zpK2T00JNQdbh7R01Sns1D_3TTgj-u8-YInoczRX8,1541
19
20
  examples/upload_files.py,sha256=tUfKFqiqwnw08OL5Y8_e4j5pSRhp94cFex8XTuVa_ig,487
20
21
  pkgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
22
  pkgs/argument_parser/__init__.py,sha256=CsQ6QoPKSLLRVl-z6URAmPkiUL9ZPZoV4rJHgy_-RjA,385
@@ -31,19 +32,19 @@ pkgs/serialization/serial_union.py,sha256=z8Ptj4bVHyb1ROfg0UPTwZ6Ef6iXLr0YJfAH5o
31
32
  pkgs/serialization_util/__init__.py,sha256=MVKqHTUl2YnWZAFG9xCxu1SgmkQ5xPofrAGlYg6h7rI,330
32
33
  pkgs/serialization_util/_get_type_for_serialization.py,sha256=dW5_W9MFd6wgWfW5qlWork-GBb-QFLtiOZkjk2Zqn2M,1177
33
34
  pkgs/serialization_util/convert_to_snakecase.py,sha256=H2BAo5ZdcCDN77RpLb-uP0s7-FQ5Ukwnsd3VYc1vD0M,583
34
- pkgs/serialization_util/serialization_helpers.py,sha256=DpDrPMc0XS_dAvkLpiON0fVQHeU6t24jfRIeYUe3FJA,6916
35
+ pkgs/serialization_util/serialization_helpers.py,sha256=B8W82-KT10nQYmDk5uhAqB5QNS-dsxzXMFhtTmooMqw,6365
35
36
  pkgs/strenum_compat/__init__.py,sha256=wXRFeNvBm8RU6dy1PFJ5sRLgUIEeH_DVR95Sv5qpGbk,59
36
37
  pkgs/strenum_compat/strenum_compat.py,sha256=uOUAgpYTjHs1MX8dG81jRlyTkt3KNbkV_25zp7xTX2s,36
37
38
  pkgs/type_spec/__init__.py,sha256=h5DmJTca4QVV10sZR1x0-MlkZfuGYDfapR3zHvXfzto,19
38
39
  pkgs/type_spec/__main__.py,sha256=5bJaX9Y_-FavP0qwzhk-z-V97UY7uaezJTa1zhO_HHQ,1048
39
- pkgs/type_spec/builder.py,sha256=un86i9LqTmCMVj-g6lrZ8lU4JZEElzCfUlsn--GkTvA,46049
40
+ pkgs/type_spec/builder.py,sha256=xQcY2HcQTI2FSOMycgx3yD23_Oz3_LfWdyW65pDaHoc,46667
40
41
  pkgs/type_spec/config.py,sha256=INfEiDcUsZFUKasHprsE6i33siPB0RnfmTKOsWcGnQ8,5043
41
42
  pkgs/type_spec/emit_io_ts.py,sha256=Ghd8XYqyNYldHQDepwa9GLfHXcoi48ztBw84K28ETic,5707
42
- pkgs/type_spec/emit_open_api.py,sha256=Aw7Ct1itmAqhb_nsM9yDz87EoF0XWHM56MhKqtOLOio,24005
43
- pkgs/type_spec/emit_open_api_util.py,sha256=XAA6zH59aZWLVl0BvKAICXXl4sdBqx01QAtv5oB0bMI,2266
43
+ pkgs/type_spec/emit_open_api.py,sha256=NVVXAvjPHC_MPqch_SMY6klj3kPnckOa7fJsb-ZsFTs,24371
44
+ pkgs/type_spec/emit_open_api_util.py,sha256=9tWLMT6NTeCa2caO8DdWo6aYoi0b4AEFiAXNaaQKJIs,2373
44
45
  pkgs/type_spec/emit_python.py,sha256=zP3AWJ5u0vzDcnvzSehCUgvXM0J9ZUtfLBVHerW6_wI,45164
45
46
  pkgs/type_spec/emit_typescript.py,sha256=cdr5h8N70PuwORcvhURUujzwH9r1LVwJB8V2EoipGkw,17917
46
- pkgs/type_spec/emit_typescript_util.py,sha256=93FzJnpYse4PKFzgdw4DGV4zFTi5tF4WR-CIi7cW498,873
47
+ pkgs/type_spec/emit_typescript_util.py,sha256=sR7ys3Ilnh6SQiXJbfYk4pxfOu0bDjbUFTEYEW-ud6c,863
47
48
  pkgs/type_spec/load_types.py,sha256=xEHwdB_miR3vNs161Oy1luafE0VC-yk9-utAyCJmbEo,3629
48
49
  pkgs/type_spec/open_api_util.py,sha256=IGh-_snGPST_P_8FdYtO8MTEa9PUxRW6Rzg9X9EgQik,7114
49
50
  pkgs/type_spec/test.py,sha256=4ueujBq-pEgnX3Z69HyPmD-bullFXmpixcpVzfOkhP4,489
@@ -78,13 +79,13 @@ uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
78
79
  uncountable/integration/db/connect.py,sha256=YtQHJ1DBGPhxKFRCfiXqohOYUceKSxMVOJ88aPI48Ug,181
79
80
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
81
  uncountable/integration/executors/script_executor.py,sha256=hM8E-aU8zyM6ZcBtqAqInKZ_BF93RLqEA0dU7y5FhWQ,841
81
- uncountable/types/__init__.py,sha256=0UllKeQhqDy1AD5UH6tMPx0QqIuW7KFlVe1SnJkD3ro,7197
82
- uncountable/types/async_batch.py,sha256=aWiul1fK3-cXaCESUUJ_92FF-NuuwxSjn9n3jC9vY5o,1618
82
+ uncountable/types/__init__.py,sha256=VxmpZ6Kv9NrKSATBx1GZ2eAleAY8MzAh0GFMk7ERmxg,7488
83
+ uncountable/types/async_batch.py,sha256=tD_ncDOEGwoxIQwgqqm2cHFA71chc8sPGwnJA9feNC8,1706
83
84
  uncountable/types/async_batch_processor.py,sha256=eNXKPOh-sCiarPvreLDEu4XbieWLe_5KXmiY984eZ5I,6083
84
85
  uncountable/types/base.py,sha256=w3BRf8SAvYPlKrcJtJcQ_WhCU3A9zy0VuRTRWRFKVUA,2709
85
86
  uncountable/types/calculations.py,sha256=16J-KKMp-I8ZQUkYNmKCHfAn6DGb99cFinALcDIdGHY,562
86
87
  uncountable/types/chemical_structure.py,sha256=zQKl53DGtQQONIUHFXuwjWLQaG7FPZY7x6SBSOzkGV0,758
87
- uncountable/types/client_base.py,sha256=UpIXr8JvrOuA9TNHeU1paqTNiE4KHsSpzA6RCAS7bO8,58694
88
+ uncountable/types/client_base.py,sha256=RZ9JvURVzfkjJIalMjC2JzQPHjcEHmOSuHOrQPDgabk,62287
88
89
  uncountable/types/curves.py,sha256=qYyRntMmFNonEwTrGhquMLbgMqjyP1moQflNTP0FMec,1308
89
90
  uncountable/types/entity.py,sha256=NjMZrqBwQ7sZe_oUuJqy9IEG7dWZmFMkQQXJ0_odcnA,11637
90
91
  uncountable/types/experiment_groups.py,sha256=ZBEk06F4n98Jz3oEA09WaDmw5rqPs7iVAm_Ysr4gc_o,599
@@ -120,7 +121,7 @@ uncountable/types/api/entity/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8A
120
121
  uncountable/types/api/entity/create_entities.py,sha256=vzo5hS1qcmjQdfyCMarSu8MRcRGSiholOVSCfjXlA1k,1703
121
122
  uncountable/types/api/entity/create_entity.py,sha256=ausozCQ3qPM9YUQ87bOTCKOm-zkhn4CSLJr9jLc9n2U,1873
122
123
  uncountable/types/api/entity/get_entities_data.py,sha256=XjrJGZucIn1TYUlDLRnRA0JTQw-vXHIAT-m0H9hk37A,1170
123
- uncountable/types/api/entity/list_entities.py,sha256=Bd_Ppy2bzWve8RbplyMkEHkg07CxEIskeiTdb9Ntlfo,1673
124
+ uncountable/types/api/entity/list_entities.py,sha256=nsOs5qsHNJFBDH1UK1Vk2IJGPY5rx764Xnn-FFLUg_A,1697
124
125
  uncountable/types/api/entity/lock_entity.py,sha256=SbRaKDbJfoPD9uVYiGlnrsPF_HZ_6m0hPAlalZwGyag,1029
125
126
  uncountable/types/api/entity/resolve_entity_ids.py,sha256=AidGpPmI9ATDv0E7vd9LDOl3n3beGxUlRojh5uZrkl4,1086
126
127
  uncountable/types/api/entity/set_values.py,sha256=LcYrKQm5ItYLK1Vx7rRq5i6jkMLDhfEBhF0FD1GowQs,958
@@ -165,22 +166,25 @@ uncountable/types/api/recipes/associate_recipe_as_lot.py,sha256=bTYjbnY3B7GKz4MV
165
166
  uncountable/types/api/recipes/create_recipe.py,sha256=jizKdsc761zrJXOi0xlmge7-Z9QlzRQdbLNtUoVLQCI,1420
166
167
  uncountable/types/api/recipes/create_recipes.py,sha256=qwIYa8hfcjY7_VOFt9lxmVtJ-HOJqQN3GDNSbZsRCZU,1544
167
168
  uncountable/types/api/recipes/disassociate_recipe_as_input.py,sha256=L25fpiK1Y5PByPVVgsZy9t4podz3xSSLIwKHj8CUrSg,913
168
- uncountable/types/api/recipes/edit_recipe_inputs.py,sha256=_dLulVZLqi-CrFIVMRts8h0OHx-nUG3vFOSKS1juGUc,4568
169
+ uncountable/types/api/recipes/edit_recipe_inputs.py,sha256=iUbbMASOVN2m7ywEeaLoEaJOkceoyjLzaRuMeoEFS_0,5513
169
170
  uncountable/types/api/recipes/get_curve.py,sha256=UIWfpqtU5sQokaxwYfQFNFl6HMyzWEF_Sjd8UMz0U88,939
170
171
  uncountable/types/api/recipes/get_recipe_calculations.py,sha256=eQmkdZzCEuq8S2f_kf_7GPvDLX1pTnY1CRmkK0SkMCI,1472
171
172
  uncountable/types/api/recipes/get_recipe_links.py,sha256=hk5dfQjv7yU2r-S9b8vwWEJLPHqU0-M6SFiTLMR3fVk,985
172
173
  uncountable/types/api/recipes/get_recipe_names.py,sha256=uCpXZq5oWjr9a_Vf-yYPaVS72XOlLHgAlju6KHeQ3UA,986
173
174
  uncountable/types/api/recipes/get_recipe_output_metadata.py,sha256=L9s2ykPP4pd02Pc98LDisY8bgV8CToS6t6fXKTWqGRw,1464
174
175
  uncountable/types/api/recipes/get_recipes_data.py,sha256=nX4sCRY_RxztVqV-DGVpAvpayy6pn6cumS2pD1xmC5k,5429
176
+ uncountable/types/api/recipes/lock_recipes.py,sha256=9s6ISt0EIA7bx3QBSm53gNxRlfmK1iwBaqRTJl2u_d8,1344
175
177
  uncountable/types/api/recipes/remove_recipe_from_project.py,sha256=cr-VnqgBNek_WInmJln0UBn1GHMNQtRw3gsFTY_G91M,872
176
178
  uncountable/types/api/recipes/set_recipe_inputs.py,sha256=lFVfv-o_O5wHuMZdH63qlG4exFTlJM078oSAtb3XNxA,1426
177
179
  uncountable/types/api/recipes/set_recipe_metadata.py,sha256=Ba6ttd1JuS_Ypt-KpckSviWtOcQ-OTdTEJiaSYyoQL8,933
180
+ uncountable/types/api/recipes/set_recipe_output_annotations.py,sha256=8JSWlHcPOJfqjjmIxNbJYlJipXaLNsmYqUXi6JM6uEo,2890
178
181
  uncountable/types/api/recipes/set_recipe_outputs.py,sha256=VfUL59O21qPrgD7qQ9t5OVSGcGZ2r17lW_yEzuUkrtw,1722
179
182
  uncountable/types/api/recipes/set_recipe_tags.py,sha256=U710hgq9-t6QZGRB-ZGHskpt4iXwYEjIRb67eh3P518,2453
180
183
  uncountable/types/api/recipes/unarchive_recipes.py,sha256=WcwFYbBsX2SKXnoBQ8locnRn7Bj1rHdtrURQVOfqgfU,814
184
+ uncountable/types/api/recipes/unlock_recipes.py,sha256=m_CC9LZW7GRVrAu9uwDTTgEZr63-dOSduBAI5Ciud2I,1103
181
185
  uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
182
186
  uncountable/types/api/triggers/run_trigger.py,sha256=9m9M8-nlGB_sAU2Qm2lWugp4h4Osqj6QpjNfU8osd1U,901
183
- UncountablePythonSDK-0.0.34.dist-info/METADATA,sha256=ECBUfqxWJ1erx7_ZX0HEmWccgQVW7HD7U1MZigiJkLU,1577
184
- UncountablePythonSDK-0.0.34.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
185
- UncountablePythonSDK-0.0.34.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
186
- UncountablePythonSDK-0.0.34.dist-info/RECORD,,
187
+ UncountablePythonSDK-0.0.36.dist-info/METADATA,sha256=xTZM6AuOH9cjIcUPHzCBM8L0PcHmYXBuRXxfuY9V3Bc,1577
188
+ UncountablePythonSDK-0.0.36.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
189
+ UncountablePythonSDK-0.0.36.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
190
+ UncountablePythonSDK-0.0.36.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,45 @@
1
+ import os
2
+ from decimal import Decimal
3
+
4
+ from uncountable.core import AsyncBatchProcessor, AuthDetailsApiKey, Client
5
+ from uncountable.types import (
6
+ edit_recipe_inputs_t,
7
+ recipe_workflow_steps_t,
8
+ )
9
+ from uncountable.types.identifier import IdentifierKeyBatchReference, IdentifierKeyId
10
+ from uncountable.types.recipe_identifiers import (
11
+ RecipeIdentifiers,
12
+ )
13
+ from uncountable.types.recipe_inputs import QuantityBasis
14
+
15
+ client = Client(
16
+ base_url=os.environ["UNC_BASE_URL"],
17
+ auth_details=AuthDetailsApiKey(
18
+ api_id=os.environ["UNC_API_ID"], api_secret_key=os.environ["UNC_API_SECRET_KEY"]
19
+ ),
20
+ )
21
+ batch_loader = AsyncBatchProcessor(client=client)
22
+ recipe_identifiers: RecipeIdentifiers = []
23
+ req = batch_loader.create_recipe(
24
+ material_family_id=1, workflow_id=1, identifiers=recipe_identifiers
25
+ )
26
+ created_recipe_reference = req.batch_reference
27
+ edits: list[edit_recipe_inputs_t.RecipeInputEdit] = []
28
+ edits.append(
29
+ edit_recipe_inputs_t.RecipeInputEditAddInput(
30
+ quantity_basis=QuantityBasis.MASS,
31
+ ingredient_key=IdentifierKeyId(id=1),
32
+ value_numeric=Decimal(56.7),
33
+ )
34
+ )
35
+ edits.append(
36
+ edit_recipe_inputs_t.RecipeInputEditChangeBasisViewed(
37
+ quantity_basis=QuantityBasis.VOLUME, ingredient_key=IdentifierKeyId(id=1)
38
+ )
39
+ )
40
+ batch_loader.edit_recipe_inputs(
41
+ recipe_key=IdentifierKeyBatchReference(reference=created_recipe_reference),
42
+ edits=edits,
43
+ recipe_workflow_step_identifier=recipe_workflow_steps_t.RecipeWorkflowStepIdentifierDefault(),
44
+ )
45
+ job_id = batch_loader.send()
@@ -1,3 +1,6 @@
1
+ # warnings -- types here assume that keys to dictionaries are strings
2
+ # this is true most of the time, but there are cases where we have integer indexes
3
+
1
4
  import dataclasses
2
5
  import datetime
3
6
  import enum
@@ -14,11 +17,6 @@ from typing import (
14
17
  overload,
15
18
  )
16
19
 
17
- try:
18
- import flask
19
- except Exception:
20
- pass
21
-
22
20
  from pkgs.argument_parser import snake_to_camel_case
23
21
  from pkgs.serialization import (
24
22
  MISSING_SENTRY,
@@ -46,30 +44,25 @@ def identity(x: T) -> T:
46
44
  return x
47
45
 
48
46
 
49
- def key_convert_to_camelcase(o: Any) -> str:
47
+ @overload
48
+ def key_convert_to_camelcase(o: str) -> str: ...
49
+
50
+
51
+ @overload
52
+ def key_convert_to_camelcase(o: int) -> int: ...
53
+
54
+
55
+ def key_convert_to_camelcase(o: Any) -> str | int:
50
56
  if isinstance(o, OpaqueKey):
51
57
  return o
52
58
  if isinstance(o, enum.StrEnum):
53
59
  return o.value
54
- if isinstance(o, enum.Enum):
55
- try:
56
- print(
57
- "DEPRECATED_SERIALIZATION--non-string-enum-used-as-key",
58
- flask.request.path,
59
- )
60
- except Exception:
61
- pass
62
- return o.value # type: ignore[no-any-return]
63
60
  if isinstance(o, str):
64
61
  return snake_to_camel_case(o)
65
62
  if isinstance(o, int):
66
- # temporary bypass to maintain behavior
67
- return o # type: ignore[return-value]
68
- try:
69
- print("DEPRECATED_SERIALIZATION--non-string-used-as-key", o, flask.request.path)
70
- except Exception:
71
- pass
72
- return o # type: ignore[no-any-return]
63
+ # we allow dictionaries to use integer keys
64
+ return o
65
+ raise ValueError("Unexpected key type", o)
73
66
 
74
67
 
75
68
  def _convert_dict(d: dict[str, Any]) -> dict[str, JsonValue]:
@@ -124,33 +117,13 @@ def _get_dataclass_conversion_lookups(dataclass_type: Any) -> DataclassConversio
124
117
 
125
118
  def _convert_dataclass(d: Any) -> dict[str, JsonValue]:
126
119
  conversions = _get_dataclass_conversion_lookups(type(d)) # type: ignore[arg-type]
127
- # return {
128
- # conversions.key_conversions[k]: (
129
- # conversions.value_conversion_functions[k](v) if v is not None else None
130
- # )
131
- # for k, v in d.__dict__.items()
132
- # if v != MISSING_SENTRY
133
- # }
134
-
135
- serialized_data_class: dict[str, JsonValue] = {}
136
- for k, v in d.__dict__.items():
137
- if v == MISSING_SENTRY:
138
- continue
139
- if k not in conversions.key_conversions:
140
- try:
141
- print(
142
- "DEPRECATED_SERIALIZATION--missing-dataclass-key",
143
- k,
144
- flask.request.path,
145
- )
146
- except Exception:
147
- pass
148
- continue
149
- serialized_data_class[conversions.key_conversions[k]] = (
120
+ return {
121
+ conversions.key_conversions[k]: (
150
122
  conversions.value_conversion_functions[k](v) if v is not None else None
151
123
  )
152
-
153
- return serialized_data_class
124
+ for k, v in d.__dict__.items()
125
+ if v != MISSING_SENTRY
126
+ }
154
127
 
155
128
 
156
129
  _SERIALIZATION_FUNCS_STANDARD = {
@@ -192,6 +165,10 @@ def serialize_for_api(obj: Any) -> JsonValue:
192
165
  Use the CachedParser.parse_api to parse this data.
193
166
  """
194
167
  serialization_type = get_serialization_type(type(obj)) # type: ignore
168
+ if (
169
+ serialization_type == SerializationType.UNKNOWN
170
+ ): # performance optimization to not do function lookup
171
+ return obj # type: ignore
195
172
  return _CONVERSION_SERIALIZATION_FUNCS[serialization_type](obj)
196
173
 
197
174
 
@@ -219,6 +196,10 @@ def serialize_for_storage(obj: Any) -> JsonValue:
219
196
  Use the CachedParser.parse_storage to parse this data.
220
197
  """
221
198
  serialization_type = get_serialization_type(type(obj)) # type: ignore
199
+ if (
200
+ serialization_type == SerializationType.UNKNOWN
201
+ ): # performance optimization to not do function lookup
202
+ return obj # type: ignore
222
203
  return _SERIALIZATION_FUNCS[serialization_type](obj)
223
204
 
224
205
 
pkgs/type_spec/builder.py CHANGED
@@ -18,6 +18,17 @@ from .util import parse_type_str, unused
18
18
  RawDict = dict[Any, Any]
19
19
 
20
20
 
21
+ class StabilityLevel(StrEnum):
22
+ """These are currently used for open api,
23
+ see: https://github.com/Tufin/oasdiff/blob/main/docs/STABILITY.md
24
+ """
25
+
26
+ draft = "draft"
27
+ alpha = "alpha"
28
+ beta = "beta"
29
+ stable = "stable"
30
+
31
+
21
32
  class PropertyExtant(StrEnum):
22
33
  required = "required"
23
34
  optional = "optional"
@@ -791,6 +802,7 @@ class SpecEndpoint:
791
802
  data_loader: bool
792
803
  is_sdk: bool
793
804
  is_beta: bool
805
+ stability_level: StabilityLevel | None
794
806
  # Don't emit TypeScript endpoint code
795
807
  suppress_ts: bool
796
808
  function: Optional[str]
@@ -816,6 +828,7 @@ class SpecEndpoint:
816
828
  "data_loader",
817
829
  "is_sdk",
818
830
  "is_beta",
831
+ "stability_level",
819
832
  "async_batch_path",
820
833
  "function",
821
834
  "suppress_ts",
@@ -857,6 +870,14 @@ class SpecEndpoint:
857
870
  assert isinstance(is_beta, bool)
858
871
  self.is_beta = is_beta
859
872
 
873
+ stability_level_raw = data.get("stability_level")
874
+ assert stability_level_raw is None or isinstance(stability_level_raw, str)
875
+ self.stability_level = (
876
+ StabilityLevel(stability_level_raw)
877
+ if stability_level_raw is not None
878
+ else None
879
+ )
880
+
860
881
  async_batch_path = data.get("async_batch_path")
861
882
  if async_batch_path is not None:
862
883
  assert isinstance(async_batch_path, str)
@@ -23,6 +23,7 @@ from .emit_open_api_util import (
23
23
  EmitOpenAPIGuide,
24
24
  EmitOpenAPIPath,
25
25
  EmitOpenAPIServer,
26
+ EmitOpenAPIStabilityLevel,
26
27
  EmitOpenAPITag,
27
28
  GlobalContextInfo,
28
29
  TagGroupToNamedTags,
@@ -256,6 +257,14 @@ def _emit_is_beta(is_beta: bool) -> DictApiSchema:
256
257
  return {}
257
258
 
258
259
 
260
+ def _emit_stability_level(
261
+ stability_level: EmitOpenAPIStabilityLevel | None,
262
+ ) -> DictApiSchema:
263
+ if stability_level is not None:
264
+ return {"x-stability-level": str(stability_level)}
265
+ return {}
266
+
267
+
259
268
  def _emit_endpoint_request_body(
260
269
  endpoint: EmitOpenAPIEndpoint,
261
270
  arguments_type: OpenAPIType | None,
@@ -349,6 +358,7 @@ def _emit_namespace(
349
358
  }
350
359
  | _emit_endpoint_description(endpoint.description, ctx.endpoint.guides)
351
360
  | _emit_is_beta(endpoint.is_beta)
361
+ | _emit_stability_level(endpoint.stability_level)
352
362
  | _emit_endpoint_parameters(endpoint, argument_type, ctx.endpoint.examples)
353
363
  | _emit_endpoint_request_body(endpoint, argument_type, ctx.endpoint.examples)
354
364
  | {
@@ -564,6 +574,7 @@ def _emit_endpoint(
564
574
  summary=f"{'/'.join(namespace.path[path_cutoff:])}",
565
575
  description=description,
566
576
  is_beta=namespace.endpoint.is_beta,
577
+ stability_level=namespace.endpoint.stability_level,
567
578
  examples=[
568
579
  EmitOpenAPIEndpointExample(
569
580
  ref_name=f"ex_{i}",
@@ -72,6 +72,9 @@ class EmitOpenAPIEndpointExample:
72
72
  data: dict[str, object]
73
73
 
74
74
 
75
+ EmitOpenAPIStabilityLevel = builder.StabilityLevel
76
+
77
+
75
78
  @dataclass
76
79
  class EmitOpenAPIEndpoint:
77
80
  method: str
@@ -79,6 +82,7 @@ class EmitOpenAPIEndpoint:
79
82
  summary: str
80
83
  description: str
81
84
  is_beta: bool
85
+ stability_level: EmitOpenAPIStabilityLevel | None
82
86
  examples: list[EmitOpenAPIEndpointExample]
83
87
  guides: list[EmitOpenAPIGuide]
84
88
 
@@ -18,7 +18,7 @@ class EmitTypescriptContext:
18
18
 
19
19
 
20
20
  def ts_type_name(name: str) -> str:
21
- return "".join([x.capitalize() for x in name.split("_")])
21
+ return "".join([x.title() for x in name.split("_")])
22
22
 
23
23
 
24
24
  def resolve_namespace_ref(namespace: builder.SpecNamespace) -> str:
@@ -29,4 +29,4 @@ def ts_name(name: str, name_case: builder.NameCase) -> str:
29
29
  if name_case == builder.NameCase.preserve:
30
30
  return name
31
31
  bits = util.split_any_name(name)
32
- return "".join([bits[0], *[x.capitalize() for x in bits[1:]]])
32
+ return "".join([bits[0], *[x.title() for x in bits[1:]]])
@@ -50,6 +50,7 @@ from . import inputs as inputs_t
50
50
  from .api.entity import list_entities as list_entities_t
51
51
  from .api.id_source import list_id_source as list_id_source_t
52
52
  from .api.entity import lock_entity as lock_entity_t
53
+ from .api.recipes import lock_recipes as lock_recipes_t
53
54
  from .api.id_source import match_id_source as match_id_source_t
54
55
  from . import outputs as outputs_t
55
56
  from . import permissions as permissions_t
@@ -75,6 +76,7 @@ from .api.inputs import set_input_subcategories as set_input_subcategories_t
75
76
  from .api.inputs import set_intermediate_type as set_intermediate_type_t
76
77
  from .api.recipes import set_recipe_inputs as set_recipe_inputs_t
77
78
  from .api.recipes import set_recipe_metadata as set_recipe_metadata_t
79
+ from .api.recipes import set_recipe_output_annotations as set_recipe_output_annotations_t
78
80
  from .api.recipes import set_recipe_outputs as set_recipe_outputs_t
79
81
  from .api.recipes import set_recipe_tags as set_recipe_tags_t
80
82
  from .api.entity import set_values as set_values_t
@@ -82,6 +84,7 @@ from .api.entity import transition_entity_phase as transition_entity_phase_t
82
84
  from .api.recipes import unarchive_recipes as unarchive_recipes_t
83
85
  from . import units as units_t
84
86
  from .api.entity import unlock_entity as unlock_entity_t
87
+ from .api.recipes import unlock_recipes as unlock_recipes_t
85
88
  from .api.material_families import update_entity_material_families as update_entity_material_families_t
86
89
  from .api.field_options import upsert_field_options as upsert_field_options_t
87
90
  from . import users as users_t
@@ -136,6 +139,7 @@ __all__: list[str] = [
136
139
  "list_entities_t",
137
140
  "list_id_source_t",
138
141
  "lock_entity_t",
142
+ "lock_recipes_t",
139
143
  "match_id_source_t",
140
144
  "outputs_t",
141
145
  "permissions_t",
@@ -161,6 +165,7 @@ __all__: list[str] = [
161
165
  "set_intermediate_type_t",
162
166
  "set_recipe_inputs_t",
163
167
  "set_recipe_metadata_t",
168
+ "set_recipe_output_annotations_t",
164
169
  "set_recipe_outputs_t",
165
170
  "set_recipe_tags_t",
166
171
  "set_values_t",
@@ -168,6 +173,7 @@ __all__: list[str] = [
168
173
  "unarchive_recipes_t",
169
174
  "units_t",
170
175
  "unlock_entity_t",
176
+ "unlock_recipes_t",
171
177
  "update_entity_material_families_t",
172
178
  "upsert_field_options_t",
173
179
  "users_t",
@@ -32,8 +32,8 @@ ENDPOINT_PATH = "api/external/entity/external_list_entities"
32
32
  )
33
33
  @dataclass(kw_only=True)
34
34
  class Arguments:
35
- entity_type: entity_t.EntityType
36
35
  config_reference: str
36
+ entity_type: typing.Optional[entity_t.EntityType] = None
37
37
  attributes: typing.Optional[dict[OpaqueKey, base_t.JsonValue]] = None
38
38
  offset: typing.Optional[typing.Optional[int]] = None
39
39
  limit: typing.Optional[typing.Optional[int]] = None
@@ -24,8 +24,10 @@ __all__: list[str] = [
24
24
  "RecipeInputEdit",
25
25
  "RecipeInputEditAddInput",
26
26
  "RecipeInputEditBase",
27
+ "RecipeInputEditChangeBasisViewed",
27
28
  "RecipeInputEditClearInputs",
28
29
  "RecipeInputEditInputBase",
30
+ "RecipeInputEditSetLot",
29
31
  "RecipeInputEditType",
30
32
  "RecipeInputEditUpdateAnnotations",
31
33
  "RecipeInputEditUpsertInput",
@@ -41,6 +43,8 @@ class RecipeInputEditType(StrEnum):
41
43
  UPSERT_INPUT = "upsert_input"
42
44
  ADD_INPUT = "add_input"
43
45
  UPDATE_ANNOTATIONS = "update_annotations"
46
+ SET_LOT = "set_lot"
47
+ CHANGE_BASIS = "change_basis"
44
48
 
45
49
 
46
50
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -72,6 +76,15 @@ class RecipeInputEditInputBase(RecipeInputEditBase):
72
76
  calculation_key: typing.Optional[identifier_t.IdentifierKey] = None
73
77
 
74
78
 
79
+ # DO NOT MODIFY -- This file is generated by type_spec
80
+ @serial_class(
81
+ parse_require={"type"},
82
+ )
83
+ @dataclass(kw_only=True)
84
+ class RecipeInputEditChangeBasisViewed(RecipeInputEditInputBase):
85
+ type: typing.Literal[RecipeInputEditType.CHANGE_BASIS] = RecipeInputEditType.CHANGE_BASIS
86
+
87
+
75
88
  # DO NOT MODIFY -- This file is generated by type_spec
76
89
  @serial_class(
77
90
  parse_require={"type"},
@@ -91,6 +104,17 @@ class RecipeInputEditAddInput(RecipeInputEditInputBase):
91
104
  type: typing.Literal[RecipeInputEditType.ADD_INPUT] = RecipeInputEditType.ADD_INPUT
92
105
 
93
106
 
107
+ # DO NOT MODIFY -- This file is generated by type_spec
108
+ @serial_class(
109
+ parse_require={"type"},
110
+ )
111
+ @dataclass(kw_only=True)
112
+ class RecipeInputEditSetLot(RecipeInputEditBase):
113
+ type: typing.Literal[RecipeInputEditType.SET_LOT] = RecipeInputEditType.SET_LOT
114
+ ingredient_key: identifier_t.IdentifierKey
115
+ ingredient_lot_recipe_key: identifier_t.IdentifierKey
116
+
117
+
94
118
  # DO NOT MODIFY -- This file is generated by type_spec
95
119
  @serial_class(
96
120
  to_string_values={"lower_value", "upper_value"},
@@ -116,7 +140,7 @@ class RecipeInputEditUpdateAnnotations(RecipeInputEditInputBase):
116
140
 
117
141
  # DO NOT MODIFY -- This file is generated by type_spec
118
142
  RecipeInputEdit = typing.Annotated[
119
- typing.Union[RecipeInputEditClearInputs, RecipeInputEditUpsertInput, RecipeInputEditAddInput, RecipeInputEditUpdateAnnotations],
143
+ typing.Union[RecipeInputEditClearInputs, RecipeInputEditUpsertInput, RecipeInputEditAddInput, RecipeInputEditUpdateAnnotations, RecipeInputEditSetLot, RecipeInputEditChangeBasisViewed],
120
144
  serial_union_annotation(
121
145
  discriminator="type",
122
146
  discriminator_map={
@@ -124,6 +148,8 @@ RecipeInputEdit = typing.Annotated[
124
148
  "upsert_input": RecipeInputEditUpsertInput,
125
149
  "add_input": RecipeInputEditAddInput,
126
150
  "update_annotations": RecipeInputEditUpdateAnnotations,
151
+ "set_lot": RecipeInputEditSetLot,
152
+ "change_basis": RecipeInputEditChangeBasisViewed,
127
153
  },
128
154
  ),
129
155
  ]
@@ -0,0 +1,53 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ from dataclasses import dataclass
12
+ from ... import identifier as identifier_t
13
+
14
+ __all__: list[str] = [
15
+ "Arguments",
16
+ "Data",
17
+ "ENDPOINT_METHOD",
18
+ "ENDPOINT_PATH",
19
+ "RecipeLockBase",
20
+ "RecipeLockType",
21
+ ]
22
+
23
+ ENDPOINT_METHOD = "POST"
24
+ ENDPOINT_PATH = "api/external/recipes/lock_recipes"
25
+
26
+
27
+ # DO NOT MODIFY -- This file is generated by type_spec
28
+ class RecipeLockType(StrEnum):
29
+ ALL = "all"
30
+ INPUTS_ONLY = "inputs_only"
31
+
32
+
33
+ # DO NOT MODIFY -- This file is generated by type_spec
34
+ @dataclass(kw_only=True)
35
+ class RecipeLockBase:
36
+ recipe: identifier_t.IdentifierKey
37
+
38
+
39
+ # DO NOT MODIFY -- This file is generated by type_spec
40
+ @dataclass(kw_only=True)
41
+ class Arguments:
42
+ type: RecipeLockType = RecipeLockType.ALL
43
+ recipes: list[identifier_t.IdentifierKey]
44
+ globally_removable: bool
45
+ lock_samples: typing.Optional[bool] = None
46
+ comments: typing.Optional[str] = None
47
+
48
+
49
+ # DO NOT MODIFY -- This file is generated by type_spec
50
+ @dataclass(kw_only=True)
51
+ class Data:
52
+ pass
53
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,102 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ from dataclasses import dataclass
12
+ from pkgs.serialization import serial_class
13
+ from pkgs.serialization import serial_union_annotation
14
+ from ... import base as base_t
15
+ from ... import identifier as identifier_t
16
+
17
+ __all__: list[str] = [
18
+ "AnnotationEdit",
19
+ "AnnotationUpdateType",
20
+ "Arguments",
21
+ "Data",
22
+ "ENDPOINT_METHOD",
23
+ "ENDPOINT_PATH",
24
+ "RecipeOutputEditBase",
25
+ "RecipeOutputMergeAnnotations",
26
+ "RecipeOutputReplaceAnnotations",
27
+ "RecipeOutputUpdateAnnotations",
28
+ ]
29
+
30
+ ENDPOINT_METHOD = "POST"
31
+ ENDPOINT_PATH = "api/external/recipes/set_recipe_output_annotations"
32
+
33
+
34
+ # DO NOT MODIFY -- This file is generated by type_spec
35
+ @serial_class(
36
+ to_string_values={"lower_value", "upper_value"},
37
+ )
38
+ @dataclass(kw_only=True)
39
+ class AnnotationEdit:
40
+ annotation_type_key: identifier_t.IdentifierKey
41
+ lower_value: typing.Optional[Decimal] = None
42
+ upper_value: typing.Optional[Decimal] = None
43
+
44
+
45
+ # DO NOT MODIFY -- This file is generated by type_spec
46
+ class AnnotationUpdateType(StrEnum):
47
+ MERGE = "merge"
48
+ REPLACE = "replace"
49
+
50
+
51
+ # DO NOT MODIFY -- This file is generated by type_spec
52
+ @dataclass(kw_only=True)
53
+ class RecipeOutputEditBase:
54
+ recipe_id: base_t.ObjectId
55
+ output_id: base_t.ObjectId
56
+ experiment_num: int
57
+ annotations: list[AnnotationEdit]
58
+ condition_id: typing.Optional[base_t.ObjectId] = None
59
+
60
+
61
+ # DO NOT MODIFY -- This file is generated by type_spec
62
+ @serial_class(
63
+ parse_require={"type"},
64
+ )
65
+ @dataclass(kw_only=True)
66
+ class RecipeOutputMergeAnnotations(RecipeOutputEditBase):
67
+ type: typing.Literal[AnnotationUpdateType.MERGE] = AnnotationUpdateType.MERGE
68
+
69
+
70
+ # DO NOT MODIFY -- This file is generated by type_spec
71
+ @serial_class(
72
+ parse_require={"type"},
73
+ )
74
+ @dataclass(kw_only=True)
75
+ class RecipeOutputReplaceAnnotations(RecipeOutputEditBase):
76
+ type: typing.Literal[AnnotationUpdateType.REPLACE] = AnnotationUpdateType.REPLACE
77
+
78
+
79
+ # DO NOT MODIFY -- This file is generated by type_spec
80
+ RecipeOutputUpdateAnnotations = typing.Annotated[
81
+ typing.Union[RecipeOutputMergeAnnotations, RecipeOutputReplaceAnnotations],
82
+ serial_union_annotation(
83
+ discriminator="type",
84
+ discriminator_map={
85
+ "merge": RecipeOutputMergeAnnotations,
86
+ "replace": RecipeOutputReplaceAnnotations,
87
+ },
88
+ ),
89
+ ]
90
+
91
+
92
+ # DO NOT MODIFY -- This file is generated by type_spec
93
+ @dataclass(kw_only=True)
94
+ class Arguments:
95
+ updates: list[RecipeOutputUpdateAnnotations]
96
+
97
+
98
+ # DO NOT MODIFY -- This file is generated by type_spec
99
+ @dataclass(kw_only=True)
100
+ class Data:
101
+ pass
102
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -0,0 +1,43 @@
1
+ # DO NOT MODIFY -- This file is generated by type_spec
2
+ # flake8: noqa: F821
3
+ # ruff: noqa: E402
4
+ # fmt: off
5
+ # isort: skip_file
6
+ from __future__ import annotations
7
+ import typing # noqa: F401
8
+ import datetime # noqa: F401
9
+ from decimal import Decimal # noqa: F401
10
+ from pkgs.strenum_compat import StrEnum
11
+ from dataclasses import dataclass
12
+ from ... import identifier as identifier_t
13
+
14
+ __all__: list[str] = [
15
+ "Arguments",
16
+ "Data",
17
+ "ENDPOINT_METHOD",
18
+ "ENDPOINT_PATH",
19
+ "RecipeUnlockType",
20
+ ]
21
+
22
+ ENDPOINT_METHOD = "POST"
23
+ ENDPOINT_PATH = "api/external/recipes/unlock_recipes"
24
+
25
+
26
+ # DO NOT MODIFY -- This file is generated by type_spec
27
+ class RecipeUnlockType(StrEnum):
28
+ STANDARD = "standard"
29
+
30
+
31
+ # DO NOT MODIFY -- This file is generated by type_spec
32
+ @dataclass(kw_only=True)
33
+ class Arguments:
34
+ type: RecipeUnlockType = RecipeUnlockType.STANDARD
35
+ recipes: list[identifier_t.IdentifierKey]
36
+ unlock_samples: typing.Optional[bool] = None
37
+
38
+
39
+ # DO NOT MODIFY -- This file is generated by type_spec
40
+ @dataclass(kw_only=True)
41
+ class Data:
42
+ pass
43
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -27,6 +27,8 @@ class AsyncBatchRequestPath(StrEnum):
27
27
  SET_RECIPE_TAGS = "recipes/set_recipe_tags"
28
28
  EDIT_RECIPE_INPUTS = "recipes/edit_recipe_inputs"
29
29
  ARCHIVE_RECIPES = "recipes/archive"
30
+ LOCK_RECIPES = "recipes/lock_recipes"
31
+ UNLOCK_RECIPES = "recipes/unlock_recipes"
30
32
 
31
33
 
32
34
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -49,6 +49,7 @@ from uncountable.types import identifier as identifier_t
49
49
  import uncountable.types.api.entity.list_entities as list_entities_t
50
50
  import uncountable.types.api.id_source.list_id_source as list_id_source_t
51
51
  import uncountable.types.api.entity.lock_entity as lock_entity_t
52
+ import uncountable.types.api.recipes.lock_recipes as lock_recipes_t
52
53
  import uncountable.types.api.id_source.match_id_source as match_id_source_t
53
54
  from uncountable.types import permissions as permissions_t
54
55
  from uncountable.types import post_base as post_base_t
@@ -67,12 +68,14 @@ import uncountable.types.api.inputs.set_input_subcategories as set_input_subcate
67
68
  import uncountable.types.api.inputs.set_intermediate_type as set_intermediate_type_t
68
69
  import uncountable.types.api.recipes.set_recipe_inputs as set_recipe_inputs_t
69
70
  import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
71
+ import uncountable.types.api.recipes.set_recipe_output_annotations as set_recipe_output_annotations_t
70
72
  import uncountable.types.api.recipes.set_recipe_outputs as set_recipe_outputs_t
71
73
  import uncountable.types.api.recipes.set_recipe_tags as set_recipe_tags_t
72
74
  import uncountable.types.api.entity.set_values as set_values_t
73
75
  import uncountable.types.api.entity.transition_entity_phase as transition_entity_phase_t
74
76
  import uncountable.types.api.recipes.unarchive_recipes as unarchive_recipes_t
75
77
  import uncountable.types.api.entity.unlock_entity as unlock_entity_t
78
+ import uncountable.types.api.recipes.unlock_recipes as unlock_recipes_t
76
79
  import uncountable.types.api.material_families.update_entity_material_families as update_entity_material_families_t
77
80
  import uncountable.types.api.field_options.upsert_field_options as upsert_field_options_t
78
81
  from abc import ABC, abstractmethod
@@ -826,15 +829,15 @@ class ClientMethods(ABC):
826
829
  def list_entities(
827
830
  self,
828
831
  *,
829
- entity_type: entity_t.EntityType,
830
832
  config_reference: str,
833
+ entity_type: typing.Optional[entity_t.EntityType] = None,
831
834
  attributes: typing.Optional[dict[OpaqueKey, base_t.JsonValue]] = None,
832
835
  offset: typing.Optional[typing.Optional[int]] = None,
833
836
  limit: typing.Optional[typing.Optional[int]] = None,
834
837
  ) -> list_entities_t.Data:
835
838
  """Uses a structured loading configuration to list entities in the system
836
839
 
837
- :param entity_type: The type of the entities requested, e.g. lab_request, recipe
840
+ :param entity_type: DEPRECATED: The type of the entities requested, e.g. lab_request, recipe
838
841
  :param config_reference: The configuration reference name for the listing config
839
842
  :param attributes: Attributes to pass to the configuration for parameterizing filters
840
843
  :param offset: Used for pagination. Pagination is done based on the sorting of the config. [Pagination More Info](#pagination)
@@ -906,6 +909,40 @@ class ClientMethods(ABC):
906
909
  )
907
910
  return self.do_request(api_request=api_request, return_type=lock_entity_t.Data)
908
911
 
912
+ def lock_recipes(
913
+ self,
914
+ *,
915
+ type: lock_recipes_t.RecipeLockType = lock_recipes_t.RecipeLockType.ALL,
916
+ recipes: list[identifier_t.IdentifierKey],
917
+ globally_removable: bool,
918
+ lock_samples: typing.Optional[bool] = None,
919
+ comments: typing.Optional[str] = None,
920
+ ) -> lock_recipes_t.Data:
921
+ """Lock experiments. Experiments will require unlocking to be editable. Edits to the experiments are blocked while they are locked.
922
+
923
+ :param type: The type of lock to set.
924
+ All = both inputs and measurements are locked.
925
+ Inputs Only = only inputs are locked from editing.
926
+
927
+ :param recipes: The recipes to lock, a maximum of 100 can be sent
928
+ :param globally_removable: If true any user can unlock the experiment. If false the locking user is the only user that can unlock.
929
+ :param lock_samples: Should associated experiment test samples also be locked.
930
+ :param comments: Optional comment describing the purpose of locking
931
+ """
932
+ args = lock_recipes_t.Arguments(
933
+ type=type,
934
+ recipes=recipes,
935
+ globally_removable=globally_removable,
936
+ lock_samples=lock_samples,
937
+ comments=comments,
938
+ )
939
+ api_request = APIRequest(
940
+ method=lock_recipes_t.ENDPOINT_METHOD,
941
+ endpoint=lock_recipes_t.ENDPOINT_PATH,
942
+ args=args,
943
+ )
944
+ return self.do_request(api_request=api_request, return_type=lock_recipes_t.Data)
945
+
909
946
  def match_id_source(
910
947
  self,
911
948
  *,
@@ -1172,6 +1209,25 @@ class ClientMethods(ABC):
1172
1209
  )
1173
1210
  return self.do_request(api_request=api_request, return_type=set_recipe_metadata_t.Data)
1174
1211
 
1212
+ def set_recipe_output_annotations(
1213
+ self,
1214
+ *,
1215
+ updates: list[set_recipe_output_annotations_t.RecipeOutputUpdateAnnotations],
1216
+ ) -> set_recipe_output_annotations_t.Data:
1217
+ """Update annotations for an experiments outputs
1218
+
1219
+ :param updates: The output edits to perform. Must be at most 100 entries long
1220
+ """
1221
+ args = set_recipe_output_annotations_t.Arguments(
1222
+ updates=updates,
1223
+ )
1224
+ api_request = APIRequest(
1225
+ method=set_recipe_output_annotations_t.ENDPOINT_METHOD,
1226
+ endpoint=set_recipe_output_annotations_t.ENDPOINT_PATH,
1227
+ args=args,
1228
+ )
1229
+ return self.do_request(api_request=api_request, return_type=set_recipe_output_annotations_t.Data)
1230
+
1175
1231
  def set_recipe_outputs(
1176
1232
  self,
1177
1233
  *,
@@ -1293,6 +1349,31 @@ class ClientMethods(ABC):
1293
1349
  )
1294
1350
  return self.do_request(api_request=api_request, return_type=unlock_entity_t.Data)
1295
1351
 
1352
+ def unlock_recipes(
1353
+ self,
1354
+ *,
1355
+ type: unlock_recipes_t.RecipeUnlockType = unlock_recipes_t.RecipeUnlockType.STANDARD,
1356
+ recipes: list[identifier_t.IdentifierKey],
1357
+ unlock_samples: typing.Optional[bool] = None,
1358
+ ) -> unlock_recipes_t.Data:
1359
+ """Unlock experiments. Experiments will edtiable after unlocking if they are currently locked.
1360
+
1361
+ :param type: The method to unlock recipes. Default is standard.
1362
+ :param recipes: The recipes to unlock, a maximum of 100 can be sent
1363
+ :param unlock_samples: Should associated experiment test samples also be unlocked.
1364
+ """
1365
+ args = unlock_recipes_t.Arguments(
1366
+ type=type,
1367
+ recipes=recipes,
1368
+ unlock_samples=unlock_samples,
1369
+ )
1370
+ api_request = APIRequest(
1371
+ method=unlock_recipes_t.ENDPOINT_METHOD,
1372
+ endpoint=unlock_recipes_t.ENDPOINT_PATH,
1373
+ args=args,
1374
+ )
1375
+ return self.do_request(api_request=api_request, return_type=unlock_recipes_t.Data)
1376
+
1296
1377
  def update_entity_material_families(
1297
1378
  self,
1298
1379
  *,