cognite-extractor-utils 7.5.1__tar.gz → 7.5.4__tar.gz
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 cognite-extractor-utils might be problematic. Click here for more details.
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/PKG-INFO +2 -2
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/__init__.py +1 -1
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/files.py +17 -7
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/pyproject.toml +5 -5
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/LICENSE +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/README.md +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/_inner_util.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/base.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/configtools/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/configtools/_util.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/configtools/elements.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/configtools/loaders.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/configtools/validators.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/exceptions.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/metrics.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/py.typed +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/statestore/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/statestore/_base.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/statestore/hashing.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/statestore/watermark.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/threading.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/configuration/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/configuration/loaders.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/configuration/models.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/__main__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/_dto.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/_messaging.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/base.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/runtime.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/core/tasks.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/scheduling/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/scheduling/_scheduler.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/unstable/scheduling/_schedules.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/__init__.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/_base.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/_metrics.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/assets.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/data_modeling.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/events.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/raw.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader/time_series.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader_extractor.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/uploader_types.py +0 -0
- {cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cognite-extractor-utils
|
|
3
|
-
Version: 7.5.
|
|
3
|
+
Version: 7.5.4
|
|
4
4
|
Summary: Utilities for easier development of extractors for CDF
|
|
5
5
|
Home-page: https://github.com/cognitedata/python-extractor-utils
|
|
6
6
|
License: Apache-2.0
|
|
@@ -19,7 +19,7 @@ Requires-Dist: arrow (>=1.0.0,<2.0.0)
|
|
|
19
19
|
Requires-Dist: azure-identity (>=1.14.0,<2.0.0)
|
|
20
20
|
Requires-Dist: azure-keyvault-secrets (>=4.7.0,<5.0.0)
|
|
21
21
|
Requires-Dist: cognite-sdk (>=7.59.0,<8.0.0)
|
|
22
|
-
Requires-Dist: croniter (>=
|
|
22
|
+
Requires-Dist: croniter (>=5.0.0,<6.0.0)
|
|
23
23
|
Requires-Dist: dacite (>=1.6.0,<2.0.0)
|
|
24
24
|
Requires-Dist: decorator (>=5.1.1,<6.0.0)
|
|
25
25
|
Requires-Dist: httpx (>=0.27.0,<0.28.0)
|
|
@@ -25,7 +25,7 @@ from httpx import URL, Client, Headers, Request, StreamConsumed, SyncByteStream
|
|
|
25
25
|
from requests.utils import super_len
|
|
26
26
|
|
|
27
27
|
from cognite.client import CogniteClient
|
|
28
|
-
from cognite.client.data_classes import FileMetadata
|
|
28
|
+
from cognite.client.data_classes import FileMetadata, FileMetadataUpdate
|
|
29
29
|
from cognite.client.data_classes.data_modeling import NodeId
|
|
30
30
|
from cognite.client.data_classes.data_modeling.extractor_extensions.v1 import CogniteExtractorFileApply
|
|
31
31
|
from cognite.client.utils._identifier import IdentifierSequence
|
|
@@ -261,13 +261,23 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
261
261
|
file_meta_response, url = self.cdf_client.files.create(
|
|
262
262
|
file_metadata=file_meta, overwrite=self.overwrite_existing
|
|
263
263
|
)
|
|
264
|
-
# trigger update after creation (upsert =P)
|
|
265
|
-
basic_attributes = set(["externalId", "name"])
|
|
266
|
-
attr = set(file_meta.dump().keys())
|
|
267
|
-
diff = attr - basic_attributes
|
|
268
264
|
|
|
269
|
-
|
|
270
|
-
|
|
265
|
+
# The files API for whatever reason doesn't update directory or source when you overwrite,
|
|
266
|
+
# so we need to update those later.
|
|
267
|
+
any_unchaged = (
|
|
268
|
+
file_meta_response.directory != file_meta.directory or file_meta_response.source != file_meta.source
|
|
269
|
+
)
|
|
270
|
+
if any_unchaged:
|
|
271
|
+
update = FileMetadataUpdate(external_id=file_meta.external_id)
|
|
272
|
+
any = False
|
|
273
|
+
if file_meta.source:
|
|
274
|
+
any = True
|
|
275
|
+
update.source.set(file_meta.source)
|
|
276
|
+
if file_meta.directory:
|
|
277
|
+
any = True
|
|
278
|
+
update.directory.set(file_meta.directory)
|
|
279
|
+
if any:
|
|
280
|
+
self.cdf_client.files.update(update)
|
|
271
281
|
|
|
272
282
|
return file_meta_response, url
|
|
273
283
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cognite-extractor-utils"
|
|
3
|
-
version = "7.5.
|
|
3
|
+
version = "7.5.4"
|
|
4
4
|
description = "Utilities for easier development of extractors for CDF"
|
|
5
5
|
authors = ["Mathias Lohne <mathias.lohne@cognite.com>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -74,16 +74,16 @@ orjson = "^3.10.3"
|
|
|
74
74
|
httpx = "^0.27.0"
|
|
75
75
|
pydantic = "^2.8.2"
|
|
76
76
|
pyhumps = "^3.8.0"
|
|
77
|
-
croniter = "^
|
|
77
|
+
croniter = "^5.0.0"
|
|
78
78
|
|
|
79
79
|
[tool.poetry.extras]
|
|
80
80
|
experimental = ["cognite-sdk-experimental"]
|
|
81
81
|
|
|
82
82
|
[tool.poetry.group.dev.dependencies]
|
|
83
|
-
mypy = "1.
|
|
83
|
+
mypy = "1.13.0"
|
|
84
84
|
ruff = "^0.7.0"
|
|
85
85
|
pytest = "^8.0.0"
|
|
86
|
-
pytest-cov = "^
|
|
86
|
+
pytest-cov = "^6.0.0"
|
|
87
87
|
sphinx = "^7.0.0"
|
|
88
88
|
sphinx-rtd-theme = "^3.0.0"
|
|
89
89
|
pre-commit = "^4.0.0"
|
|
@@ -94,7 +94,7 @@ parameterized = "*"
|
|
|
94
94
|
requests = "^2.31.0"
|
|
95
95
|
types-requests = "^2.31.0.20240125"
|
|
96
96
|
httpx = "^0.27.0"
|
|
97
|
-
faker = "^
|
|
97
|
+
faker = "^33.0.0"
|
|
98
98
|
|
|
99
99
|
[build-system]
|
|
100
100
|
requires = ["poetry-core>=1.0.0"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/exceptions.py
RENAMED
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/metrics.py
RENAMED
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/threading.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.5.1 → cognite_extractor_utils-7.5.4}/cognite/extractorutils/util.py
RENAMED
|
File without changes
|