cognite-extractor-utils 6.3.0__tar.gz → 6.3.2__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.

Files changed (27) hide show
  1. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/PKG-INFO +1 -1
  2. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/__init__.py +1 -1
  3. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/configtools/loaders.py +4 -3
  4. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/statestore.py +5 -3
  5. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/pyproject.toml +1 -1
  6. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/LICENSE +0 -0
  7. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/README.md +0 -0
  8. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/_inner_util.py +0 -0
  9. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/base.py +0 -0
  10. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/configtools/__init__.py +0 -0
  11. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/configtools/_util.py +0 -0
  12. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/configtools/elements.py +0 -0
  13. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/exceptions.py +0 -0
  14. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/metrics.py +0 -0
  15. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/middleware.py +0 -0
  16. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/py.typed +0 -0
  17. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/__init__.py +0 -0
  18. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/_base.py +0 -0
  19. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/_metrics.py +0 -0
  20. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/assets.py +0 -0
  21. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/events.py +0 -0
  22. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/files.py +0 -0
  23. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/raw.py +0 -0
  24. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader/time_series.py +0 -0
  25. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader_extractor.py +0 -0
  26. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/uploader_types.py +0 -0
  27. {cognite_extractor_utils-6.3.0 → cognite_extractor_utils-6.3.2}/cognite/extractorutils/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-extractor-utils
3
- Version: 6.3.0
3
+ Version: 6.3.2
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
@@ -16,5 +16,5 @@
16
16
  Cognite extractor utils is a Python package that simplifies the development of new extractors.
17
17
  """
18
18
 
19
- __version__ = "6.3.0"
19
+ __version__ = "6.3.2"
20
20
  from .base import Extractor
@@ -61,7 +61,8 @@ class KeyVaultLoader:
61
61
  "Include an `azure-keyvault` section in your config to use the !keyvault tag."
62
62
  )
63
63
 
64
- if "keyvault-name" not in self.config:
64
+ keyvault_name = self.config.get("keyvault-name")
65
+ if not keyvault_name:
65
66
  raise InvalidConfigError("Please add the keyvault-name")
66
67
 
67
68
  if "authentication-method" not in self.config:
@@ -70,7 +71,7 @@ class KeyVaultLoader:
70
71
  "Possible values are: default or client-secret"
71
72
  )
72
73
 
73
- vault_url = f"https://{self.config['keyvault-name']}.vault.azure.net"
74
+ vault_url = f"https://{keyvault_name}.vault.azure.net"
74
75
 
75
76
  if self.config["authentication-method"] == KeyVaultAuthenticationMethod.DEFAULT.value:
76
77
  _logger.info("Using Azure DefaultCredentials to access KeyVault")
@@ -151,7 +152,7 @@ def _load_yaml_dict(
151
152
  if not isinstance(source, str):
152
153
  source.seek(0)
153
154
 
154
- keyvault_config = initial_load.get("azure-keyvault")
155
+ keyvault_config = initial_load.get("azure-keyvault", initial_load.get("key-vault"))
155
156
 
156
157
  _EnvLoader.add_implicit_resolver("!env", re.compile(r"\$\{([^}^{]+)\}"), None)
157
158
  _EnvLoader.add_constructor("!env", _env_constructor)
@@ -92,6 +92,8 @@ from abc import ABC, abstractmethod
92
92
  from types import TracebackType
93
93
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
94
94
 
95
+ from requests.exceptions import ConnectionError
96
+
95
97
  from cognite.client import CogniteClient
96
98
  from cognite.client.exceptions import CogniteAPIError, CogniteException
97
99
  from cognite.extractorutils.uploader import DataPointList
@@ -346,7 +348,7 @@ class RawStateStore(AbstractStateStore):
346
348
  self._ensure_table()
347
349
 
348
350
  @retry(
349
- exceptions=(CogniteException,),
351
+ exceptions=(CogniteException, ConnectionError),
350
352
  tries=RETRIES,
351
353
  delay=RETRY_DELAY,
352
354
  max_delay=RETRY_MAX_DELAY,
@@ -368,7 +370,7 @@ class RawStateStore(AbstractStateStore):
368
370
  self._initialize_implementation(force)
369
371
 
370
372
  @retry(
371
- exceptions=(CogniteException,),
373
+ exceptions=(CogniteException, ConnectionError),
372
374
  tries=RETRIES,
373
375
  delay=RETRY_DELAY,
374
376
  max_delay=RETRY_MAX_DELAY,
@@ -402,7 +404,7 @@ class RawStateStore(AbstractStateStore):
402
404
  self._synchronize_implementation()
403
405
 
404
406
  @retry(
405
- exceptions=(CogniteException,),
407
+ exceptions=(CogniteException, ConnectionError),
406
408
  tries=RETRIES,
407
409
  delay=RETRY_DELAY,
408
410
  max_delay=RETRY_MAX_DELAY,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cognite-extractor-utils"
3
- version = "6.3.0"
3
+ version = "6.3.2"
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"