cognite-extractor-utils 6.3.0__py3-none-any.whl → 6.3.2__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.

Potentially problematic release.


This version of cognite-extractor-utils might be problematic. Click here for more details.

@@ -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
  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
@@ -1,15 +1,15 @@
1
- cognite/extractorutils/__init__.py,sha256=GQEacMSjuMca4PqxS0wM8KyHMNPmrMZEzHspOCyo8ME,739
1
+ cognite/extractorutils/__init__.py,sha256=X7tmNy4D8099iyXkXH1QrvXWk2l-Q2z5KWymIjB-J2Y,739
2
2
  cognite/extractorutils/_inner_util.py,sha256=jCPLg-FfTpyLAHkhoKaKObNwbqm19d2Z11to_DYk5EU,1558
3
3
  cognite/extractorutils/base.py,sha256=8kzePjVlCIQVftDQ1t_4join9qhs-VOlB6eTpeX9zGk,16018
4
4
  cognite/extractorutils/configtools/__init__.py,sha256=fj9kH8DdisNi9mI8cKm2sz50vnzeOkJQErIGB3mTYRo,2861
5
5
  cognite/extractorutils/configtools/_util.py,sha256=SZycZm_py9v9WZbDiDQbgS6_PiLtu-TtwuuH7tG2YCI,4739
6
6
  cognite/extractorutils/configtools/elements.py,sha256=OgNuLF6iOBnPsANwMsSRrJ_0KwBngD_ZKIgE4NZfOOc,20626
7
- cognite/extractorutils/configtools/loaders.py,sha256=PmD2AWca4gG_hLSugAT6pZ_VUlQntFvbAnRnRwtmkn8,14913
7
+ cognite/extractorutils/configtools/loaders.py,sha256=s4tHuNgBhk6TnrDDifIYQX8CickXVSqVCol9E62DPIs,14969
8
8
  cognite/extractorutils/exceptions.py,sha256=PERRmySUfJRM2Ta8cFvADTe-KUdXsoMLKdk4140AOHI,1061
9
9
  cognite/extractorutils/metrics.py,sha256=PFrOO0yDRGaFiJmNLXModKY7CW1gvHDBtPaoK-ETCxw,15508
10
10
  cognite/extractorutils/middleware.py,sha256=d5bnKEOmC49QmoBK7OyM9krOGDYX8sXxM00wRWKhmHg,1108
11
11
  cognite/extractorutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- cognite/extractorutils/statestore.py,sha256=rzfjYlTdDL1mawKBOK41H8CUDdDiviDUB90ta_ycbUI,18175
12
+ cognite/extractorutils/statestore.py,sha256=wC619be0L0EKmn_Fn-ccT3-D2_wt4Mb9eAr_oqrDdis,18272
13
13
  cognite/extractorutils/uploader/__init__.py,sha256=W22u6QHA4cR0j78LN5LTL5YGbfC-uTApagTyP5ab7uQ,3110
14
14
  cognite/extractorutils/uploader/_base.py,sha256=ed9F-qFmlIylTg8UtuxfykYUfEsG_R0PrfufXYEPcjI,5169
15
15
  cognite/extractorutils/uploader/_metrics.py,sha256=J2LJXb19L_SLSJ_voNIQHYLp0pjxUKevpH1q_xKX6Hk,3247
@@ -21,7 +21,7 @@ cognite/extractorutils/uploader/time_series.py,sha256=ZPkz9NVCmz2vE7SkRm0-LjYi-Z
21
21
  cognite/extractorutils/uploader_extractor.py,sha256=K8cH8CIDiFNB0fXNdUymE_MKh1GYfqxHHcRoH07CFew,7673
22
22
  cognite/extractorutils/uploader_types.py,sha256=5MKT14DUnTFVD5Nx4Zvnfp2SfaICuTKLWAFAYaZishk,1045
23
23
  cognite/extractorutils/util.py,sha256=GDDpsoOQpgoTHUWVAUjWxGdulgOQovlD8yBWp_kObp8,14234
24
- cognite_extractor_utils-6.3.0.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
25
- cognite_extractor_utils-6.3.0.dist-info/METADATA,sha256=zWpIalHPdw6VU1mxuPltKmldkBP_pu9g6EQW7QiEL94,5560
26
- cognite_extractor_utils-6.3.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
27
- cognite_extractor_utils-6.3.0.dist-info/RECORD,,
24
+ cognite_extractor_utils-6.3.2.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
25
+ cognite_extractor_utils-6.3.2.dist-info/METADATA,sha256=9anL2vuUyAut2x8fe1wpUys1J0rEJmDQYINyshCsMCk,5560
26
+ cognite_extractor_utils-6.3.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
27
+ cognite_extractor_utils-6.3.2.dist-info/RECORD,,