cognite-toolkit 0.7.52__py3-none-any.whl → 0.7.53__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/commands/_purge.py +12 -8
- 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.52.dist-info → cognite_toolkit-0.7.53.dist-info}/METADATA +1 -1
- {cognite_toolkit-0.7.52.dist-info → cognite_toolkit-0.7.53.dist-info}/RECORD +9 -9
- {cognite_toolkit-0.7.52.dist-info → cognite_toolkit-0.7.53.dist-info}/WHEEL +1 -1
- {cognite_toolkit-0.7.52.dist-info → cognite_toolkit-0.7.53.dist-info}/entry_points.txt +0 -0
|
@@ -735,13 +735,17 @@ class PurgeCommand(ToolkitCommand):
|
|
|
735
735
|
node_ids = [instance for instance in instances if isinstance(instance, NodeId)]
|
|
736
736
|
if node_ids:
|
|
737
737
|
timeseries = client.time_series.retrieve_multiple(instance_ids=node_ids, ignore_unknown_ids=True)
|
|
738
|
+
migrated_timeseries_ids = [
|
|
739
|
+
ts.id
|
|
740
|
+
for ts in timeseries
|
|
741
|
+
if ts.instance_id and ts.pending_instance_id # type: ignore[attr-defined]
|
|
742
|
+
]
|
|
738
743
|
if not dry_run and timeseries:
|
|
739
|
-
migrated_timeseries_ids = [ts.id for ts in timeseries if ts.instance_id and ts.pending_instance_id] # type: ignore[attr-defined]
|
|
740
744
|
client.time_series.unlink_instance_ids(id=migrated_timeseries_ids)
|
|
741
745
|
if verbose:
|
|
742
746
|
console.print(f"Unlinked {len(migrated_timeseries_ids)} timeseries from datapoints.")
|
|
743
747
|
elif verbose and timeseries:
|
|
744
|
-
console.print(f"Would have unlinked {len(
|
|
748
|
+
console.print(f"Would have unlinked {len(migrated_timeseries_ids)} timeseries from datapoints.")
|
|
745
749
|
return instances
|
|
746
750
|
|
|
747
751
|
@staticmethod
|
|
@@ -751,15 +755,15 @@ class PurgeCommand(ToolkitCommand):
|
|
|
751
755
|
file_ids = [instance for instance in instances if isinstance(instance, NodeId)]
|
|
752
756
|
if file_ids:
|
|
753
757
|
files = client.files.retrieve_multiple(instance_ids=file_ids, ignore_unknown_ids=True)
|
|
758
|
+
migrated_file_ids = [
|
|
759
|
+
file.id
|
|
760
|
+
for file in files
|
|
761
|
+
if file.instance_id and file.pending_instance_id and file.id is not None # type: ignore[attr-defined]
|
|
762
|
+
]
|
|
754
763
|
if not dry_run and files:
|
|
755
|
-
migrated_file_ids = [
|
|
756
|
-
file.id
|
|
757
|
-
for file in files
|
|
758
|
-
if file.instance_id and file.pending_instance_id and file.id is not None # type: ignore[attr-defined]
|
|
759
|
-
]
|
|
760
764
|
client.files.unlink_instance_ids(id=migrated_file_ids)
|
|
761
765
|
if verbose:
|
|
762
766
|
console.print(f"Unlinked {len(migrated_file_ids)} files from nodes.")
|
|
763
767
|
elif verbose and files:
|
|
764
|
-
console.print(f"Would have unlinked {len(
|
|
768
|
+
console.print(f"Would have unlinked {len(migrated_file_ids)} files from their blob content.")
|
|
765
769
|
return instances
|
cognite_toolkit/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.7.
|
|
1
|
+
__version__ = "0.7.53"
|
|
@@ -235,7 +235,7 @@ cognite_toolkit/_cdf_tk/commands/_migrate/migration_io.py,sha256=ZrmI_jx6sf7G027
|
|
|
235
235
|
cognite_toolkit/_cdf_tk/commands/_migrate/prepare.py,sha256=RfqaNoso5CyBwc-p6ckwcYqBfZXKhdJgdGIyd0TATaI,2635
|
|
236
236
|
cognite_toolkit/_cdf_tk/commands/_migrate/selectors.py,sha256=N1H_-rBpPUD6pbrlcofn1uEK1bA694EUXEe1zIXeqyo,2489
|
|
237
237
|
cognite_toolkit/_cdf_tk/commands/_profile.py,sha256=c42Na8r1Xcd1zSIJtU8eZMQTFBTzNmxtTIBLKBePzyA,43131
|
|
238
|
-
cognite_toolkit/_cdf_tk/commands/_purge.py,sha256=
|
|
238
|
+
cognite_toolkit/_cdf_tk/commands/_purge.py,sha256=5r5zgzalGvzd4NYGY-rKFvpzn9JdsLeKJpPbjkBKc2U,32832
|
|
239
239
|
cognite_toolkit/_cdf_tk/commands/_questionary_style.py,sha256=h-w7fZKkGls3TrzIGBKjsZSGoXJJIYchgD1StfA40r8,806
|
|
240
240
|
cognite_toolkit/_cdf_tk/commands/_upload.py,sha256=ncI1XIKRsqLzCPFS6twsKwKdpcrS6QKwzQpC8-uv0X4,13041
|
|
241
241
|
cognite_toolkit/_cdf_tk/commands/_utils.py,sha256=UxMJW5QYKts4om5n6x2Tq2ihvfO9gWjhQKeqZNFTlKg,402
|
|
@@ -432,14 +432,14 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
|
|
|
432
432
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
|
|
433
433
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
|
|
434
434
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
|
|
435
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=
|
|
436
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=
|
|
437
|
-
cognite_toolkit/_resources/cdf.toml,sha256=
|
|
438
|
-
cognite_toolkit/_version.py,sha256=
|
|
435
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=sxXXSoM8YzyWhrMxweR-qD1x68m_mqXamz6koBYLQlI,667
|
|
436
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=z9CsKojSJ6j5uBGEj-Swo5j3EqqIbGw9deWIp4zutlI,2430
|
|
437
|
+
cognite_toolkit/_resources/cdf.toml,sha256=Gvh7jHce3fx-TBX41R0ou7YSaxgvGkNVRJlJeH-6k7w,475
|
|
438
|
+
cognite_toolkit/_version.py,sha256=JP9RKOpQyDoUb8AfOg0ujLNcQLJPJfFX7VENgDRl3XU,23
|
|
439
439
|
cognite_toolkit/config.dev.yaml,sha256=M33FiIKdS3XKif-9vXniQ444GTZ-bLXV8aFH86u9iUQ,332
|
|
440
440
|
cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
|
|
441
441
|
cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
|
|
442
|
-
cognite_toolkit-0.7.
|
|
443
|
-
cognite_toolkit-0.7.
|
|
444
|
-
cognite_toolkit-0.7.
|
|
445
|
-
cognite_toolkit-0.7.
|
|
442
|
+
cognite_toolkit-0.7.53.dist-info/WHEEL,sha256=e_m4S054HL0hyR3CpOk-b7Q7fDX6BuFkgL5OjAExXas,80
|
|
443
|
+
cognite_toolkit-0.7.53.dist-info/entry_points.txt,sha256=EtZ17K2mUjh-AY0QNU1CPIB_aDSSOdmtNI_4Fj967mA,84
|
|
444
|
+
cognite_toolkit-0.7.53.dist-info/METADATA,sha256=jmWwjMBPQ8lUs6fueggE0guDcY7Q1dmYJG8v0KcaPn8,5026
|
|
445
|
+
cognite_toolkit-0.7.53.dist-info/RECORD,,
|
|
File without changes
|