nominal 1.104.0__py3-none-any.whl → 1.104.1__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.
CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.104.1](https://github.com/nominal-io/nominal-client/compare/v1.104.0...v1.104.1) (2026-01-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add asset_rid to data_review request ([#508](https://github.com/nominal-io/nominal-client/issues/508)) ([b1baf4f](https://github.com/nominal-io/nominal-client/commit/b1baf4f3745ee8a485ff0407a53ad9ee1ee9b0fc))
9
+
3
10
  ## [1.104.0](https://github.com/nominal-io/nominal-client/compare/v1.103.0...v1.104.0) (2026-01-08)
4
11
 
5
12
 
@@ -20,8 +20,10 @@ from typing_extensions import Self, deprecated
20
20
 
21
21
  from nominal.core import checklist, event
22
22
  from nominal.core._clientsbunch import HasScoutParams
23
- from nominal.core._utils.api_tools import HasRid
23
+ from nominal.core._utils.api_tools import HasRid, rid_from_instance_or_string
24
+ from nominal.core.asset import Asset
24
25
  from nominal.core.exceptions import NominalMethodRemovedError
26
+ from nominal.core.run import Run
25
27
  from nominal.ts import IntegralNanosecondsUTC, _SecondsNanos
26
28
 
27
29
 
@@ -162,8 +164,81 @@ class DataReviewBuilder:
162
164
  self._integration_rids.append(integration_rid)
163
165
  return self
164
166
 
165
- def add_request(self, run_rid: str, checklist_rid: str, commit: str) -> DataReviewBuilder:
166
- self._requests.append(scout_datareview_api.CreateDataReviewRequest(checklist_rid, run_rid, commit))
167
+ @deprecated(
168
+ "`DataReviewBuilder.add_request` is deprecated and will be removed in a future release of the Nominal SDK. "
169
+ "Please use `DataReviewBuilder.execute_checklist` instead."
170
+ )
171
+ def add_request(
172
+ self,
173
+ run_rid: str,
174
+ checklist_rid: str,
175
+ commit: str | None = None,
176
+ *,
177
+ asset_rid: str | None = None,
178
+ ) -> DataReviewBuilder:
179
+ """Add a request to create a data review for the given checklist and run.
180
+
181
+ Args:
182
+ run_rid: RID of the Run to run the Checklist on
183
+ checklist_rid: RID of the checklist to execute on the Run
184
+ commit: Commit hash of the version of the checklist to run, or the latest version if None is provided
185
+ asset_rid: RID of the asset to run the checklist on within the Run (only required for multi-asset runs)
186
+
187
+ Returns:
188
+ DataReviewBuilder instance to continue building a data review with
189
+ """
190
+ return self.execute_checklist(run_rid, checklist_rid, commit=commit, asset=asset_rid)
191
+
192
+ def execute_checklist(
193
+ self,
194
+ run: str | Run,
195
+ checklist: str | checklist.Checklist,
196
+ *,
197
+ commit: str | None = None,
198
+ asset: str | Asset | None = None,
199
+ ) -> Self:
200
+ """Add a request to create a data review for the given checklist and run.
201
+
202
+ Args:
203
+ run: Instance or rid of the Run to run the Checklist on
204
+ checklist: Instance or rid of the checklist to execute on the Run
205
+ commit: Commit hash of the version of the checklist to run, or the latest version if None is provided
206
+ asset: Instance or rid of the asset to run the checklist on within the Run
207
+ NOTE: only required for multi-asset runs
208
+
209
+ Returns:
210
+ DataReviewBuilder instance to continue building a data review with
211
+
212
+ Raises:
213
+ ValueError: If the given run has multiple associated assets and no asset was specified, or
214
+ if the run has an asset that differs from the provided asset.
215
+ """
216
+ checklist_rid = rid_from_instance_or_string(checklist)
217
+ run_rid = rid_from_instance_or_string(run)
218
+ asset_rid = None if asset is None else rid_from_instance_or_string(asset)
219
+
220
+ raw_run = self._clients.run.get_run(self._clients.auth_header, run_rid)
221
+ if len(raw_run.assets) > 1 and asset is None:
222
+ raise ValueError(
223
+ f"Cannot run data review on checklist {checklist_rid} and {run_rid} without specifying `asset_rid`: "
224
+ f"run has {len(raw_run.assets)} assets!"
225
+ )
226
+ elif len(raw_run.assets) == 1 and asset_rid is not None:
227
+ raw_asset_rid = raw_run.assets[0]
228
+ if raw_asset_rid != asset_rid:
229
+ raise ValueError(
230
+ f"Cannot run data review on checklist {checklist_rid} and {run_rid} with asset {asset_rid}: "
231
+ f"run has a different asset {raw_asset_rid}!"
232
+ )
233
+
234
+ self._requests.append(
235
+ scout_datareview_api.CreateDataReviewRequest(
236
+ checklist_rid=checklist_rid,
237
+ run_rid=run_rid,
238
+ asset_rid=asset_rid,
239
+ commit=commit,
240
+ )
241
+ )
167
242
  return self
168
243
 
169
244
  def add_tags(self, tags: list[str]) -> DataReviewBuilder:
@@ -174,8 +249,7 @@ class DataReviewBuilder:
174
249
  """Initiates a batch data review process.
175
250
 
176
251
  Args:
177
- wait_for_completion (bool): If True, waits for the data review process to complete before returning.
178
- Default is True.
252
+ wait_for_completion: If True, waits for the data review process to complete before returning.
179
253
  """
180
254
  request = scout_datareview_api.BatchInitiateDataReviewRequest(
181
255
  notification_configurations=[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal
3
- Version: 1.104.0
3
+ Version: 1.104.1
4
4
  Summary: Automate Nominal workflows in Python
5
5
  Project-URL: Homepage, https://nominal.io
6
6
  Project-URL: Documentation, https://docs.nominal.io
@@ -1,4 +1,4 @@
1
- CHANGELOG.md,sha256=SNK-cRIerr4jSucyICY6m4WdOg1StL3J6qeqFd0TvIQ,86878
1
+ CHANGELOG.md,sha256=NlPcTaaXpq78bnNrncsHImQ2b6R6guUk3eRPS5RDOa4,87207
2
2
  LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
3
3
  README.md,sha256=KKe0dxh_pHXCtB7I9G4qWGQYvot_BZU8yW6MJyuyUHM,311
4
4
  nominal/__init__.py,sha256=rbraORnXUrNn1hywLXM0XwSQCd9UmQt20PDYlsBalfE,2167
@@ -40,7 +40,7 @@ nominal/core/checklist.py,sha256=rO1RPDYV3o2miPKF7DcCiYpj6bUN-sdtZNhJkXzkfYE,711
40
40
  nominal/core/client.py,sha256=Awt9WPkE-YXBfOwJMTL7Su8AZFJY3UMH7IKp5hI26YQ,68328
41
41
  nominal/core/connection.py,sha256=LYllr3a1H2xp8-i4MaX1M7yK8X-HnwuIkciyK9XgLtQ,5175
42
42
  nominal/core/containerized_extractors.py,sha256=fUz3-NHoNWYKqOCD15gLwGXDKVfdsW-x_kpXnkOI3BE,10224
43
- nominal/core/data_review.py,sha256=bEnRsd8LI4x9YOBPcF2H3h5-e12A7Gh8gQfsNUAZmPQ,7922
43
+ nominal/core/data_review.py,sha256=Z_W1Okp_FSQDiVCk6aKb9gV0EXbE2jtiQaPqc6TaL0g,11038
44
44
  nominal/core/dataset.py,sha256=iOR-jiTrnUxTnsF_eteQCHQmbe8IZovdSzhAgq40bB8,46648
45
45
  nominal/core/dataset_file.py,sha256=8rCW6MO89MFbQ2NH0WtFWmJfRWeTxhmyuoGojuQQ4Qg,16545
46
46
  nominal/core/datasource.py,sha256=V5UahbqsCNIdml978kOHiY6boIxKxbp76KscNBpN5xc,16934
@@ -106,8 +106,8 @@ nominal/thirdparty/polars/polars_export_handler.py,sha256=hGCSwXX9dC4MG01CmmjlTb
106
106
  nominal/thirdparty/tdms/__init__.py,sha256=6n2ImFr2Wiil6JM1P5Q7Mpr0VzLcnDkmup_ftNpPq-s,142
107
107
  nominal/thirdparty/tdms/_tdms.py,sha256=m4gxbpxB9MTLi2FuYvGlbUGSyDAZKFxbM3ia2x1wIz0,8746
108
108
  nominal/ts/__init__.py,sha256=hmd0ENvDhxRnzDKGLxIub6QG8LpcxCgcyAct029CaEs,21442
109
- nominal-1.104.0.dist-info/METADATA,sha256=xfxtanw2lJqoSn3Nc68VIvpwdD6rkArysEa5_xP0JwE,2277
110
- nominal-1.104.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
111
- nominal-1.104.0.dist-info/entry_points.txt,sha256=-mCLhxgg9R_lm5efT7vW9wuBH12izvY322R0a3TYxbE,66
112
- nominal-1.104.0.dist-info/licenses/LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
113
- nominal-1.104.0.dist-info/RECORD,,
109
+ nominal-1.104.1.dist-info/METADATA,sha256=pSumzRRZWU7UoEqsEQKfpc-kmXVxuB1iLChuhBhHhNA,2277
110
+ nominal-1.104.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
111
+ nominal-1.104.1.dist-info/entry_points.txt,sha256=-mCLhxgg9R_lm5efT7vW9wuBH12izvY322R0a3TYxbE,66
112
+ nominal-1.104.1.dist-info/licenses/LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
113
+ nominal-1.104.1.dist-info/RECORD,,