UncountablePythonSDK 0.0.23__py3-none-any.whl → 0.0.24__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.23
3
+ Version: 0.0.24
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
@@ -44,7 +44,7 @@ pkgs/type_spec/emit_python.py,sha256=aGPnp86DZN0N7c5eiBHVAT_smDf1uCLmRldDhxmWx9g
44
44
  pkgs/type_spec/emit_typescript.py,sha256=4hpCJwiDf-v8LJaNFVfFtf8zvtG73YNPFwwa_5NuffI,17729
45
45
  pkgs/type_spec/emit_typescript_util.py,sha256=93FzJnpYse4PKFzgdw4DGV4zFTi5tF4WR-CIi7cW498,873
46
46
  pkgs/type_spec/load_types.py,sha256=xEHwdB_miR3vNs161Oy1luafE0VC-yk9-utAyCJmbEo,3629
47
- pkgs/type_spec/open_api_util.py,sha256=TFbK2bkYT6S4qPQGO3_G2mfVgtNB26d31kwaHQ9y99E,6730
47
+ pkgs/type_spec/open_api_util.py,sha256=IGh-_snGPST_P_8FdYtO8MTEa9PUxRW6Rzg9X9EgQik,7114
48
48
  pkgs/type_spec/test.py,sha256=4ueujBq-pEgnX3Z69HyPmD-bullFXmpixcpVzfOkhP4,489
49
49
  pkgs/type_spec/util.py,sha256=6m6MPfY-SwjyZf2FWQKclswWB5o7gcdd-3tdpViPYOQ,4844
50
50
  pkgs/type_spec/actions_registry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -85,6 +85,7 @@ type_spec/external/api/project/get_projects.yaml,sha256=pQXGGPHenmFWYUuzEmZ-ORf0
85
85
  type_spec/external/api/project/get_projects_data.yaml,sha256=8xQoyL8HlAropfZPYYcQ-W4fO4yuqueAWTKxRzTXAa0,1981
86
86
  type_spec/external/api/recipe_links/create_recipe_link.yaml,sha256=7b2p7Ei4LnQXqccHsOVAfYyNK4WXm0n1IqxPG-qQDh0,941
87
87
  type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml,sha256=mJs82Ci8XSp2ng0W9MKqoeYwIjjgaVYmC5MWFmWFkR8,1759
88
+ type_spec/external/api/recipes/archive_recipes.yaml,sha256=Oe-NIFwERiG1DwgzsWj3ouKVdnRDTelrgqE5b9Bt_vQ,515
88
89
  type_spec/external/api/recipes/associate_recipe_as_input.yaml,sha256=7t0jto37RyLjl63-GK3mLC2uFiX1gd8vPwTwnobxkeI,654
89
90
  type_spec/external/api/recipes/associate_recipe_as_lot.yaml,sha256=8wzeJg5njt4qG2kavA6Jpo9PkWE6rIbuA4IPNdhcwEg,605
90
91
  type_spec/external/api/recipes/create_recipe.yaml,sha256=mGLyKJI3pN_7nU4rcSqCO3WjuKhO_odZ2pewVgYcMUU,1322
@@ -120,13 +121,13 @@ uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
120
121
  uncountable/integration/db/connect.py,sha256=iI9e8a2hfbFP-dvH0MGLsrG-RpM0dHKCL-oCLkah9hs,181
121
122
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
123
  uncountable/integration/executors/script_executor.py,sha256=6oMPAFe0PUdqt76e8jMi4vXszGVsVHLULob7Qbl3o38,816
123
- uncountable/types/__init__.py,sha256=fTNNsvFFkjp4acdBA8eS00OZVnDo_Zn7aRwPs8SFnrs,6024
124
- uncountable/types/async_batch.py,sha256=FtIoDCeyt9rF5hknQs6Sw-vjiYBMJbe1re0-4bk_6VY,1578
124
+ uncountable/types/__init__.py,sha256=6XYh9ACSJRnbbTGfpQ69bLFfwyBiCG1ZlHqSAOugTG8,6111
125
+ uncountable/types/async_batch.py,sha256=aWiul1fK3-cXaCESUUJ_92FF-NuuwxSjn9n3jC9vY5o,1618
125
126
  uncountable/types/async_batch_processor.py,sha256=YksvTyJaZ3rqpZx4UXofUf7XU1Br4aNBNPZXB3LLtkA,5940
126
127
  uncountable/types/base.py,sha256=w3BRf8SAvYPlKrcJtJcQ_WhCU3A9zy0VuRTRWRFKVUA,2709
127
128
  uncountable/types/calculations.py,sha256=16J-KKMp-I8ZQUkYNmKCHfAn6DGb99cFinALcDIdGHY,562
128
129
  uncountable/types/chemical_structure.py,sha256=zQKl53DGtQQONIUHFXuwjWLQaG7FPZY7x6SBSOzkGV0,758
129
- uncountable/types/client_base.py,sha256=nsV7NWN5UoqjCfFSw9XLXT_rbpfZeWRrOLxqeZ20Sjw,47114
130
+ uncountable/types/client_base.py,sha256=EIsd-OoOglTX2tVgbWDosPlq7hAkB_Nlacr_e8epjb4,47949
130
131
  uncountable/types/curves.py,sha256=qYyRntMmFNonEwTrGhquMLbgMqjyP1moQflNTP0FMec,1308
131
132
  uncountable/types/entity.py,sha256=NjMZrqBwQ7sZe_oUuJqy9IEG7dWZmFMkQQXJ0_odcnA,11637
132
133
  uncountable/types/experiment_groups.py,sha256=ZBEk06F4n98Jz3oEA09WaDmw5rqPs7iVAm_Ysr4gc_o,599
@@ -190,6 +191,7 @@ uncountable/types/api/recipe_links/create_recipe_link.py,sha256=1Ok6XMGFKBIPV-uR
190
191
  uncountable/types/api/recipe_metadata/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
191
192
  uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py,sha256=el6Pn5XqExX66ZEEHM8CHPxnyXSMZPdfdvLBz86sAVY,1267
192
193
  uncountable/types/api/recipes/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
194
+ uncountable/types/api/recipes/archive_recipes.py,sha256=XFCqBa90bG4Tpxu6fhUqzl7PWlY35bbzOmJf5EOviRM,852
193
195
  uncountable/types/api/recipes/associate_recipe_as_input.py,sha256=88a2lirEgrodyyE6og0oYtkGAWih2uJCZRmy45kTBow,976
194
196
  uncountable/types/api/recipes/associate_recipe_as_lot.py,sha256=bTYjbnY3B7GKz4MV4UGn7vPjaqMkAfUTio8872d4iws,955
195
197
  uncountable/types/api/recipes/create_recipe.py,sha256=Ni00efkcPkQ3WTIgDHzkfu1qoc52ReV9VT0wwwPOT4g,1364
@@ -208,7 +210,7 @@ uncountable/types/api/recipes/set_recipe_outputs.py,sha256=QYq39TNchQ80ET1C77OE9
208
210
  uncountable/types/api/recipes/set_recipe_tags.py,sha256=U710hgq9-t6QZGRB-ZGHskpt4iXwYEjIRb67eh3P518,2453
209
211
  uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
210
212
  uncountable/types/api/triggers/run_trigger.py,sha256=9m9M8-nlGB_sAU2Qm2lWugp4h4Osqj6QpjNfU8osd1U,901
211
- UncountablePythonSDK-0.0.23.dist-info/METADATA,sha256=W6CHPkwSSSiPK9zlnXFS8WjX7sCL8o2-76dd4m2CJkY,1613
212
- UncountablePythonSDK-0.0.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
213
- UncountablePythonSDK-0.0.23.dist-info/top_level.txt,sha256=HaMiBnH1wA7SG9-RVHIJPBH3l8X5gee2jUf-77Nz-Dk,41
214
- UncountablePythonSDK-0.0.23.dist-info/RECORD,,
213
+ UncountablePythonSDK-0.0.24.dist-info/METADATA,sha256=3xzubcqtwZH0Z5jnBD1q_8eU5UyYnNiXiS_RnBAm4Xo,1613
214
+ UncountablePythonSDK-0.0.24.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
215
+ UncountablePythonSDK-0.0.24.dist-info/top_level.txt,sha256=HaMiBnH1wA7SG9-RVHIJPBH3l8X5gee2jUf-77Nz-Dk,41
216
+ UncountablePythonSDK-0.0.24.dist-info/RECORD,,
@@ -174,6 +174,18 @@ class OpenAPIObjectType(OpenAPIType):
174
174
 
175
175
  return {"description": desc}
176
176
 
177
+ def _emit_property(
178
+ self, property_name: str, property_type: OpenAPIType
179
+ ) -> dict[str, object]:
180
+ property_info = {
181
+ **property_type.asdict(),
182
+ }
183
+ property_description = self._emit_property_desc(property_name)
184
+ if "$ref" in property_info and "description" in property_description:
185
+ return {"allOf": [property_info, property_description]}
186
+
187
+ return property_info | property_description
188
+
177
189
  def asdict(self) -> dict[str, object]:
178
190
  return self.add_addl_info({
179
191
  "type": "object",
@@ -183,10 +195,7 @@ class OpenAPIObjectType(OpenAPIType):
183
195
  if not property_type.nullable
184
196
  ],
185
197
  "properties": {
186
- property_name: {
187
- **property_type.asdict(),
188
- }
189
- | self._emit_property_desc(property_name)
198
+ property_name: self._emit_property(property_name, property_type)
190
199
  for property_name, property_type in self.properties.items()
191
200
  },
192
201
  })
@@ -0,0 +1,20 @@
1
+ $endpoint:
2
+ is_sdk: true
3
+ method: post
4
+ path: ${external}/recipes/archive
5
+ function: main.site.app.external.recipes.archive_recipes.archive_recipes
6
+ desc: Archive the provided recipes and their children
7
+
8
+ Arguments:
9
+ type: Object
10
+ properties:
11
+ recipes:
12
+ type: List<identifier.IdentifierKey>
13
+ desc: Identifier for the recipe
14
+ reason?:
15
+ type: String
16
+ desc: This reason will be written to the audit log archive entry
17
+
18
+
19
+ Data:
20
+ type: Object
@@ -3,6 +3,7 @@
3
3
  # ruff: noqa: E402
4
4
  # fmt: off
5
5
  # isort: skip_file
6
+ from .api.recipes import archive_recipes as archive_recipes_t
6
7
  from .api.recipes import associate_recipe_as_input as associate_recipe_as_input_t
7
8
  from .api.recipes import associate_recipe_as_lot as associate_recipe_as_lot_t
8
9
  from . import async_batch as async_batch_t
@@ -77,6 +78,7 @@ from . import workflows as workflows_t
77
78
 
78
79
 
79
80
  __all__: list[str] = [
81
+ "archive_recipes_t",
80
82
  "associate_recipe_as_input_t",
81
83
  "associate_recipe_as_lot_t",
82
84
  "async_batch_t",
@@ -0,0 +1,35 @@
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 dataclasses import dataclass
11
+ from ... import identifier as identifier_t
12
+
13
+ __all__: list[str] = [
14
+ "Arguments",
15
+ "Data",
16
+ "ENDPOINT_METHOD",
17
+ "ENDPOINT_PATH",
18
+ ]
19
+
20
+ ENDPOINT_METHOD = "POST"
21
+ ENDPOINT_PATH = "api/external/recipes/archive"
22
+
23
+
24
+ # DO NOT MODIFY -- This file is generated by type_spec
25
+ @dataclass(kw_only=True)
26
+ class Arguments:
27
+ recipes: list[identifier_t.IdentifierKey]
28
+ reason: typing.Optional[str] = None
29
+
30
+
31
+ # DO NOT MODIFY -- This file is generated by type_spec
32
+ @dataclass(kw_only=True)
33
+ class Data:
34
+ pass
35
+ # DO NOT MODIFY -- This file is generated by type_spec
@@ -26,6 +26,7 @@ class AsyncBatchRequestPath(StrEnum):
26
26
  SET_RECIPE_METADATA = "recipes/set_recipe_metadata"
27
27
  SET_RECIPE_TAGS = "recipes/set_recipe_tags"
28
28
  EDIT_RECIPE_INPUTS = "recipes/edit_recipe_inputs"
29
+ ARCHIVE_RECIPES = "recipes/archive"
29
30
 
30
31
 
31
32
  # DO NOT MODIFY -- This file is generated by type_spec
@@ -9,6 +9,7 @@ import typing # noqa: F401
9
9
  import datetime # noqa: F401
10
10
  from decimal import Decimal # noqa: F401
11
11
  from pkgs.serialization import OpaqueKey
12
+ import uncountable.types.api.recipes.archive_recipes as archive_recipes_t
12
13
  import uncountable.types.api.recipes.associate_recipe_as_input as associate_recipe_as_input_t
13
14
  import uncountable.types.api.recipes.associate_recipe_as_lot as associate_recipe_as_lot_t
14
15
  from uncountable.types import async_batch as async_batch_t
@@ -83,6 +84,28 @@ class ClientMethods(ABC):
83
84
  def do_request(self, *, api_request: APIRequest, return_type: type[DT]) -> DT:
84
85
  ...
85
86
 
87
+ def archive_recipes(
88
+ self,
89
+ *,
90
+ recipes: list[identifier_t.IdentifierKey],
91
+ reason: typing.Optional[str] = None,
92
+ ) -> archive_recipes_t.Data:
93
+ """Archive the provided recipes and their children
94
+
95
+ :param recipes: Identifier for the recipe
96
+ :param reason: This reason will be written to the audit log archive entry
97
+ """
98
+ args = archive_recipes_t.Arguments(
99
+ recipes=recipes,
100
+ reason=reason,
101
+ )
102
+ api_request = APIRequest(
103
+ method=archive_recipes_t.ENDPOINT_METHOD,
104
+ endpoint=archive_recipes_t.ENDPOINT_PATH,
105
+ args=args,
106
+ )
107
+ return self.do_request(api_request=api_request, return_type=archive_recipes_t.Data)
108
+
86
109
  def associate_recipe_as_input(
87
110
  self,
88
111
  *,