cognite-extractor-utils 7.4.4__tar.gz → 7.4.6__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.4.4 → cognite_extractor_utils-7.4.6}/PKG-INFO +1 -1
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/__init__.py +1 -1
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/configtools/elements.py +1 -1
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/configtools/loaders.py +6 -1
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/files.py +8 -2
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/pyproject.toml +1 -1
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/LICENSE +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/README.md +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/_inner_util.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/base.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/configtools/__init__.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/configtools/_util.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/exceptions.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/metrics.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/py.typed +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/statestore/__init__.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/statestore/_base.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/statestore/hashing.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/statestore/watermark.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/threading.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/unstable/__init__.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/unstable/configuration/__init__.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/unstable/configuration/loaders.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/unstable/configuration/models.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/__init__.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/_base.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/_metrics.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/assets.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/data_modeling.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/events.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/raw.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader/time_series.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader_extractor.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/uploader_types.py +0 -0
- {cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/util.py +0 -0
|
@@ -334,7 +334,7 @@ class CogniteConfig:
|
|
|
334
334
|
self.idp_authentication.certificate.password,
|
|
335
335
|
)
|
|
336
336
|
if not self.idp_authentication.scopes:
|
|
337
|
-
_logger.
|
|
337
|
+
_logger.warning("No scopes configured. Authenticating with CDF is unlikely to work correctly")
|
|
338
338
|
credential_provider = OAuthClientCertificate(
|
|
339
339
|
authority_url=authority_url,
|
|
340
340
|
client_id=self.idp_authentication.client_id,
|
|
@@ -34,7 +34,12 @@ from yaml.scanner import ScannerError
|
|
|
34
34
|
|
|
35
35
|
from cognite.client import CogniteClient
|
|
36
36
|
from cognite.extractorutils.configtools._util import _to_snake_case
|
|
37
|
-
from cognite.extractorutils.configtools.elements import
|
|
37
|
+
from cognite.extractorutils.configtools.elements import (
|
|
38
|
+
BaseConfig,
|
|
39
|
+
ConfigType,
|
|
40
|
+
TimeIntervalConfig,
|
|
41
|
+
_BaseConfig,
|
|
42
|
+
)
|
|
38
43
|
from cognite.extractorutils.exceptions import InvalidConfigError
|
|
39
44
|
|
|
40
45
|
_logger = logging.getLogger(__name__)
|
|
@@ -258,6 +258,14 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
258
258
|
file_meta, url = self._create_cdm(instance_id=node_id)
|
|
259
259
|
else:
|
|
260
260
|
file_meta, url = self.cdf_client.files.create(file_metadata=file_meta, overwrite=self.overwrite_existing)
|
|
261
|
+
# trigger update after creation (upsert =P)
|
|
262
|
+
basic_attributes = set(["externalId", "name"])
|
|
263
|
+
attr = set(file_meta.dump().keys())
|
|
264
|
+
diff = attr - basic_attributes
|
|
265
|
+
|
|
266
|
+
if len(diff) >= 1 and "externalId" in attr:
|
|
267
|
+
file_meta = self.cdf_client.files.update(file_meta)
|
|
268
|
+
|
|
261
269
|
return file_meta, url
|
|
262
270
|
|
|
263
271
|
def _upload_bytes(self, size: int, file: BinaryIO, file_meta: FileMetadataOrCogniteExtractorFile) -> None:
|
|
@@ -296,7 +304,6 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
296
304
|
if isinstance(file_meta, CogniteExtractorFileApply):
|
|
297
305
|
node_id = self._apply_cognite_file(file_meta)
|
|
298
306
|
identifiers = IdentifierSequence.load(instance_ids=node_id).as_singleton()
|
|
299
|
-
self.cdf_client.files._warn_alpha()
|
|
300
307
|
res = self.cdf_client.files._post(
|
|
301
308
|
url_path="/files/multiuploadlink",
|
|
302
309
|
json={"items": identifiers.as_dicts()},
|
|
@@ -420,7 +427,6 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
420
427
|
)
|
|
421
428
|
|
|
422
429
|
def _create_cdm(self, instance_id: NodeId) -> tuple[FileMetadata, str]:
|
|
423
|
-
self.cdf_client.files._warn_alpha()
|
|
424
430
|
identifiers = IdentifierSequence.load(instance_ids=instance_id).as_singleton()
|
|
425
431
|
res = self.cdf_client.files._post(
|
|
426
432
|
url_path="/files/uploadlink",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/exceptions.py
RENAMED
|
File without changes
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/metrics.py
RENAMED
|
File without changes
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/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
|
{cognite_extractor_utils-7.4.4 → cognite_extractor_utils-7.4.6}/cognite/extractorutils/util.py
RENAMED
|
File without changes
|