cognite-toolkit 0.7.22__py3-none-any.whl → 0.7.23__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.
- cognite_toolkit/_cdf_tk/resource_classes/migration.py +8 -17
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml +1 -1
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml +1 -1
- cognite_toolkit/_resources/cdf.toml +1 -1
- cognite_toolkit/_version.py +1 -1
- {cognite_toolkit-0.7.22.dist-info → cognite_toolkit-0.7.23.dist-info}/METADATA +1 -1
- {cognite_toolkit-0.7.22.dist-info → cognite_toolkit-0.7.23.dist-info}/RECORD +10 -10
- {cognite_toolkit-0.7.22.dist-info → cognite_toolkit-0.7.23.dist-info}/WHEEL +0 -0
- {cognite_toolkit-0.7.22.dist-info → cognite_toolkit-0.7.23.dist-info}/entry_points.txt +0 -0
- {cognite_toolkit-0.7.22.dist-info → cognite_toolkit-0.7.23.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import re
|
|
2
1
|
from typing import Literal
|
|
3
2
|
|
|
4
|
-
from pydantic import Field
|
|
3
|
+
from pydantic import Field
|
|
5
4
|
|
|
6
|
-
from cognite_toolkit._cdf_tk.
|
|
5
|
+
from cognite_toolkit._cdf_tk.constants import INSTANCE_EXTERNAL_ID_PATTERN
|
|
7
6
|
|
|
8
7
|
from .base import ToolkitResource
|
|
9
8
|
from .view_field_definitions import ViewReference
|
|
10
9
|
|
|
11
|
-
JSON_PATH_PATTERN = re.compile(
|
|
12
|
-
r"^([a-zA-Z_][a-zA-Z0-9_]*|\[\d+\])(\.[a-zA-Z_][a-zA-Z0-9_]*|\[\d+\]|\[\'[^\']*\'\]|\[\"[^\"]*\"\])*$"
|
|
13
|
-
)
|
|
14
|
-
|
|
15
10
|
|
|
16
11
|
class ResourceViewMappingYAML(ToolkitResource):
|
|
12
|
+
external_id: str = Field(
|
|
13
|
+
description="External-id of the mapping.",
|
|
14
|
+
min_length=1,
|
|
15
|
+
max_length=256,
|
|
16
|
+
pattern=INSTANCE_EXTERNAL_ID_PATTERN,
|
|
17
|
+
)
|
|
17
18
|
resource_type: Literal["asset", "event", "file", "timeSeries", "sequence", "assetAnnotation", "fileAnnotation"] = (
|
|
18
19
|
Field(
|
|
19
20
|
description="The type of the resource to map to the view.",
|
|
@@ -25,13 +26,3 @@ class ResourceViewMappingYAML(ToolkitResource):
|
|
|
25
26
|
property_mapping: dict[str, str] = Field(
|
|
26
27
|
description="A dictionary mapping from resource property to view property.",
|
|
27
28
|
)
|
|
28
|
-
|
|
29
|
-
@field_validator("property_mapping")
|
|
30
|
-
@classmethod
|
|
31
|
-
def validate_json_paths(cls, value: dict[str, str]) -> dict[str, str]:
|
|
32
|
-
if not isinstance(value, dict):
|
|
33
|
-
return value
|
|
34
|
-
not_matching_keys = [k for k in value.keys() if not re.match(JSON_PATH_PATTERN, k)]
|
|
35
|
-
if not_matching_keys:
|
|
36
|
-
raise ValueError(f"Invalid JSON paths: {humanize_collection(not_matching_keys)}")
|
|
37
|
-
return value
|
cognite_toolkit/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.7.
|
|
1
|
+
__version__ = "0.7.23"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite_toolkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.23
|
|
4
4
|
Summary: Official Cognite Data Fusion tool for project templates and configuration deployment
|
|
5
5
|
Project-URL: Homepage, https://docs.cognite.com/cdf/deploy/cdf_toolkit/
|
|
6
6
|
Project-URL: Changelog, https://github.com/cognitedata/toolkit/releases
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cognite_toolkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
cognite_toolkit/_cdf.py,sha256=sefGD2JQuOTBZhEqSj_ECbNZ7nTRN4AwGwX1pSUhoow,5636
|
|
3
|
-
cognite_toolkit/_version.py,sha256=
|
|
3
|
+
cognite_toolkit/_version.py,sha256=JGnAqfJascCxCeW2HUmSEq-6cTv1v4JA85VtarqlsUk,23
|
|
4
4
|
cognite_toolkit/config.dev.yaml,sha256=M33FiIKdS3XKif-9vXniQ444GTZ-bLXV8aFH86u9iUQ,332
|
|
5
5
|
cognite_toolkit/_cdf_tk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
cognite_toolkit/_cdf_tk/cdf_toml.py,sha256=VSWV9h44HusWIaKpWgjrOMrc3hDoPTTXBXlp6-NOrIM,9079
|
|
@@ -216,7 +216,7 @@ cognite_toolkit/_cdf_tk/resource_classes/infield_v1.py,sha256=XtstgUuhYhWgsxSoQ9
|
|
|
216
216
|
cognite_toolkit/_cdf_tk/resource_classes/instance.py,sha256=FdPCDz4LlKZ2SDBGH2-z-JiPN0V53Gg3FrxxjcjrJZc,2935
|
|
217
217
|
cognite_toolkit/_cdf_tk/resource_classes/labels.py,sha256=rh4SV_MBEiS9cjpz1g4_0SAnKGwiIepThD_wR1_bMkY,649
|
|
218
218
|
cognite_toolkit/_cdf_tk/resource_classes/location.py,sha256=C4vhHs_kpLa3abfQIZiotfldnKoEq8YAbU3gvG7XDMA,3221
|
|
219
|
-
cognite_toolkit/_cdf_tk/resource_classes/migration.py,sha256=
|
|
219
|
+
cognite_toolkit/_cdf_tk/resource_classes/migration.py,sha256=ThMKmJSaMx9DKtqkwcY2Y_Y4hY0xk-UzyF7HC49qlnA,903
|
|
220
220
|
cognite_toolkit/_cdf_tk/resource_classes/raw_database_table.py,sha256=2It1o8-zsH1YMCXTnI_KMjjnuN4bnZ_2PS3ZyBUrh0I,538
|
|
221
221
|
cognite_toolkit/_cdf_tk/resource_classes/relationship.py,sha256=tZQvy_ofmxSry0e9BITKOcB-L8fNocQBl56BJjAgThc,2074
|
|
222
222
|
cognite_toolkit/_cdf_tk/resource_classes/search_config.py,sha256=KhHLKs6-tljU7tYaCc2u3qyHXbNDqCXI3OmntSsKW8E,837
|
|
@@ -305,13 +305,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
|
|
|
305
305
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
|
|
306
306
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
|
|
307
307
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
|
|
308
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=
|
|
309
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=
|
|
310
|
-
cognite_toolkit/_resources/cdf.toml,sha256=
|
|
308
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=9OAOoiEnbwN-vEuPQmI59u7_5bHwKKgJVd2b3wmXZZU,667
|
|
309
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=vVpoAsIznpwy42v_665Hg5E5N6pbI0i0Q8vQDjHCBeg,2430
|
|
310
|
+
cognite_toolkit/_resources/cdf.toml,sha256=rDE7YGIeaEnxBZX8qUEFV8gr-Gh8wq8YArsxlDEPjIQ,475
|
|
311
311
|
cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
|
|
312
312
|
cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
|
|
313
|
-
cognite_toolkit-0.7.
|
|
314
|
-
cognite_toolkit-0.7.
|
|
315
|
-
cognite_toolkit-0.7.
|
|
316
|
-
cognite_toolkit-0.7.
|
|
317
|
-
cognite_toolkit-0.7.
|
|
313
|
+
cognite_toolkit-0.7.23.dist-info/METADATA,sha256=nbev1eMp2ATVbkZUvRaDAlUsUOj5-KKDSdANwZ0gsK4,4501
|
|
314
|
+
cognite_toolkit-0.7.23.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
315
|
+
cognite_toolkit-0.7.23.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
|
|
316
|
+
cognite_toolkit-0.7.23.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
|
|
317
|
+
cognite_toolkit-0.7.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|