nominal 1.104.2__py3-none-any.whl → 1.105.0__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 +14 -0
- nominal/_utils/deprecation_tools.py +0 -6
- nominal/experimental/migration/migration_resources.py +18 -0
- nominal/experimental/migration/migration_utils.py +23 -27
- {nominal-1.104.2.dist-info → nominal-1.105.0.dist-info}/METADATA +1 -1
- {nominal-1.104.2.dist-info → nominal-1.105.0.dist-info}/RECORD +9 -8
- {nominal-1.104.2.dist-info → nominal-1.105.0.dist-info}/WHEEL +0 -0
- {nominal-1.104.2.dist-info → nominal-1.105.0.dist-info}/entry_points.txt +0 -0
- {nominal-1.104.2.dist-info → nominal-1.105.0.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.105.0](https://github.com/nominal-io/nominal-client/compare/v1.104.3...v1.105.0) (2026-01-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* refactor top-level migration config to allow for mapping of templates to assets ([#577](https://github.com/nominal-io/nominal-client/issues/577)) ([9f1f39d](https://github.com/nominal-io/nominal-client/commit/9f1f39d721ea54135441e00b0a31c8fdd78b381c))
|
|
9
|
+
|
|
10
|
+
## [1.104.3](https://github.com/nominal-io/nominal-client/compare/v1.104.2...v1.104.3) (2026-01-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* stop removing deprecated kwargs from method calls ([#574](https://github.com/nominal-io/nominal-client/issues/574)) ([c06fb08](https://github.com/nominal-io/nominal-client/commit/c06fb080475e53b0c86613745ea6e094d4035d65))
|
|
16
|
+
|
|
3
17
|
## [1.104.2](https://github.com/nominal-io/nominal-client/compare/v1.104.1...v1.104.2) (2026-01-08)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -33,14 +33,8 @@ def warn_on_deprecated_argument(
|
|
|
33
33
|
def wrapper(*args: Param.args, **kwargs: Param.kwargs) -> T:
|
|
34
34
|
if argument_name in kwargs:
|
|
35
35
|
warnings.warn(warning_message, UserWarning, stacklevel=2)
|
|
36
|
-
filtered_kwargs = kwargs.copy()
|
|
37
|
-
filtered_kwargs.pop(argument_name)
|
|
38
|
-
return func(*args, **filtered_kwargs) # type: ignore[arg-type]
|
|
39
|
-
|
|
40
36
|
elif len(args) > len(param_names) - 1:
|
|
41
37
|
warnings.warn(warning_message, UserWarning, stacklevel=2)
|
|
42
|
-
filtered_args = args[: len(param_names) - 1]
|
|
43
|
-
return func(*filtered_args, **kwargs) # type: ignore[arg-type]
|
|
44
38
|
|
|
45
39
|
return func(*args, **kwargs)
|
|
46
40
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Sequence
|
|
5
|
+
|
|
6
|
+
from nominal.core.asset import Asset
|
|
7
|
+
from nominal.core.workbook_template import WorkbookTemplate
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class AssetResources:
|
|
12
|
+
asset: Asset
|
|
13
|
+
source_workbook_templates: Sequence[WorkbookTemplate]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class MigrationResources:
|
|
18
|
+
source_assets: Sequence[AssetResources]
|
|
@@ -26,6 +26,7 @@ from nominal.core._event_types import EventType, SearchEventOriginType
|
|
|
26
26
|
from nominal.core._utils.api_tools import Link, LinkDict
|
|
27
27
|
from nominal.core.attachment import Attachment
|
|
28
28
|
from nominal.core.run import Run
|
|
29
|
+
from nominal.experimental.migration.migration_resources import MigrationResources
|
|
29
30
|
from nominal.ts import (
|
|
30
31
|
IntegralNanosecondsDuration,
|
|
31
32
|
IntegralNanosecondsUTC,
|
|
@@ -681,17 +682,14 @@ def copy_asset_from(
|
|
|
681
682
|
|
|
682
683
|
def copy_resources_to_destination_client(
|
|
683
684
|
destination_client: NominalClient,
|
|
684
|
-
|
|
685
|
-
source_workbook_templates: Sequence[WorkbookTemplate],
|
|
685
|
+
migration_resources: MigrationResources,
|
|
686
686
|
) -> tuple[Sequence[tuple[str, Dataset]], Sequence[Asset], Sequence[WorkbookTemplate], Sequence[Workbook]]:
|
|
687
687
|
"""Based on a list of assets and workbook templates, copy resources to destination client, creating
|
|
688
688
|
new datasets, datafiles, and workbooks along the way.
|
|
689
689
|
|
|
690
690
|
Args:
|
|
691
691
|
destination_client (NominalClient): client of the tenant/workspace to copy resources to.
|
|
692
|
-
|
|
693
|
-
source_workbook_templates (Sequence[WorkbookTemplate]): a list of workbook templates to clone
|
|
694
|
-
and create workbooks from.
|
|
692
|
+
migration_resources (MigrationResources): resources to copy.
|
|
695
693
|
|
|
696
694
|
Returns:
|
|
697
695
|
All of the created resources.
|
|
@@ -700,32 +698,30 @@ def copy_resources_to_destination_client(
|
|
|
700
698
|
"destination_client_workspace": destination_client.get_workspace(destination_client._clients.workspace_rid).rid,
|
|
701
699
|
}
|
|
702
700
|
|
|
703
|
-
if len(source_assets) != 1:
|
|
704
|
-
raise ValueError("Currently, only single asset can be used to create workbook from template")
|
|
705
|
-
|
|
706
701
|
new_assets = []
|
|
702
|
+
new_templates = []
|
|
703
|
+
new_workbooks = []
|
|
704
|
+
|
|
707
705
|
new_data_scopes_and_datasets: list[tuple[str, Dataset]] = []
|
|
708
|
-
for source_asset in source_assets:
|
|
709
|
-
new_asset = clone_asset(source_asset, destination_client)
|
|
706
|
+
for source_asset in migration_resources.source_assets:
|
|
707
|
+
new_asset = clone_asset(source_asset.asset, destination_client)
|
|
710
708
|
new_assets.append(new_asset)
|
|
711
709
|
new_data_scopes_and_datasets.extend(new_asset.list_datasets())
|
|
712
|
-
new_templates = []
|
|
713
|
-
new_workbooks = []
|
|
714
710
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
711
|
+
for source_workbook_template in source_asset.source_workbook_templates:
|
|
712
|
+
new_template = clone_workbook_template(source_workbook_template, destination_client)
|
|
713
|
+
new_templates.append(new_template)
|
|
714
|
+
new_workbook = new_template.create_workbook(
|
|
715
|
+
title=new_template.title, description=new_template.description, asset=new_assets[0]
|
|
716
|
+
)
|
|
717
|
+
logger.debug(
|
|
718
|
+
"Created new workbook %s (rid: %s) from template %s (rid: %s)",
|
|
719
|
+
new_workbook.title,
|
|
720
|
+
new_workbook.rid,
|
|
721
|
+
new_template.title,
|
|
722
|
+
new_template.rid,
|
|
723
|
+
extra=log_extras,
|
|
724
|
+
)
|
|
725
|
+
new_workbooks.append(new_workbook)
|
|
730
726
|
|
|
731
727
|
return (new_data_scopes_and_datasets, new_assets, new_templates, new_workbooks)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
CHANGELOG.md,sha256=
|
|
1
|
+
CHANGELOG.md,sha256=RvN85qhQ4iyE4X8kwMTM03KSIBZeXEGRxxUOCEx_TmQ,88256
|
|
2
2
|
LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
|
|
3
3
|
README.md,sha256=KKe0dxh_pHXCtB7I9G4qWGQYvot_BZU8yW6MJyuyUHM,311
|
|
4
4
|
nominal/__init__.py,sha256=rbraORnXUrNn1hywLXM0XwSQCd9UmQt20PDYlsBalfE,2167
|
|
@@ -8,7 +8,7 @@ nominal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
8
8
|
nominal/_utils/README.md,sha256=1qJE6MSjrHb-JF4L7TJC2r8_OXwnb3gaLvuevXMOOK0,364
|
|
9
9
|
nominal/_utils/__init__.py,sha256=v4WWEY4uC37KX_3xfHEJoF-qfIZ3dftMcuIdGnvtX_8,465
|
|
10
10
|
nominal/_utils/dataclass_tools.py,sha256=5lzl9KcX5c6PAdd1B-Fd5lxXazB4fQfWp55qBL_3LVg,387
|
|
11
|
-
nominal/_utils/deprecation_tools.py,sha256=
|
|
11
|
+
nominal/_utils/deprecation_tools.py,sha256=847a9wX2RbHF52rF9YmpsfuIlmIr7ABX8LKAr9BMI_c,3698
|
|
12
12
|
nominal/_utils/iterator_tools.py,sha256=1r3N2kp2Yf_ihrVnKP83ySVFI5h6zIlLUSgSQuWR-C0,958
|
|
13
13
|
nominal/_utils/streaming_tools.py,sha256=QkHK-YeQ23taGp4677O2Uatkeo6B_z4E-aDqvcaywfc,399
|
|
14
14
|
nominal/_utils/timing_tools.py,sha256=XHO1JhLxsaQPDUqPTuj3lX7SlNQ78H2wa0OHArxiNWA,1886
|
|
@@ -87,7 +87,8 @@ nominal/experimental/logging/click_log_handler.py,sha256=ANLf4IGgmh95V0kJlr756wQ
|
|
|
87
87
|
nominal/experimental/logging/nominal_log_handler.py,sha256=hyTxyjsvFnE7vtyrDJpunAqADHmXekNWALwxXPIJGCk,5120
|
|
88
88
|
nominal/experimental/logging/rich_log_handler.py,sha256=8yz_VtxNgJg2oiesnXz2iXoBvQrUP5pAsYkxknOXgXA,1231
|
|
89
89
|
nominal/experimental/migration/__init__.py,sha256=E2IgWJLwJ5bN6jbl8k5nHECKFx5aT11jKAzVYcyXn3o,460
|
|
90
|
-
nominal/experimental/migration/
|
|
90
|
+
nominal/experimental/migration/migration_resources.py,sha256=Tf_7kNBeSaY8z2fTF7DAxk-9q3a7F8xXFVvxI8tTc9c,415
|
|
91
|
+
nominal/experimental/migration/migration_utils.py,sha256=ZHH_-pMFHHA-eIcCeoINaxueNrLe7fapVgdcVc4bQCI,30074
|
|
91
92
|
nominal/experimental/rust_streaming/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
93
|
nominal/experimental/rust_streaming/rust_write_stream.py,sha256=oQ6ixwm8ct8ZDc_qNB7AucDt8o5-_aBVlW2fFCQ_nmA,1541
|
|
93
94
|
nominal/experimental/stream_v2/__init__.py,sha256=W39vK46pssx5sXvmsImMuJiEPs7iGtwrbYBI0bWnXCY,2313
|
|
@@ -106,8 +107,8 @@ nominal/thirdparty/polars/polars_export_handler.py,sha256=hGCSwXX9dC4MG01CmmjlTb
|
|
|
106
107
|
nominal/thirdparty/tdms/__init__.py,sha256=6n2ImFr2Wiil6JM1P5Q7Mpr0VzLcnDkmup_ftNpPq-s,142
|
|
107
108
|
nominal/thirdparty/tdms/_tdms.py,sha256=m4gxbpxB9MTLi2FuYvGlbUGSyDAZKFxbM3ia2x1wIz0,8746
|
|
108
109
|
nominal/ts/__init__.py,sha256=hmd0ENvDhxRnzDKGLxIub6QG8LpcxCgcyAct029CaEs,21442
|
|
109
|
-
nominal-1.
|
|
110
|
-
nominal-1.
|
|
111
|
-
nominal-1.
|
|
112
|
-
nominal-1.
|
|
113
|
-
nominal-1.
|
|
110
|
+
nominal-1.105.0.dist-info/METADATA,sha256=sr6qiNjoqRlvLRiWc-2KeA6a-B8qx2jlR4rV-rvQ03E,2307
|
|
111
|
+
nominal-1.105.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
112
|
+
nominal-1.105.0.dist-info/entry_points.txt,sha256=-mCLhxgg9R_lm5efT7vW9wuBH12izvY322R0a3TYxbE,66
|
|
113
|
+
nominal-1.105.0.dist-info/licenses/LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
|
|
114
|
+
nominal-1.105.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|