cognite-neat 0.127.31__py3-none-any.whl → 0.128.0__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.
@@ -68,7 +68,7 @@ class PhysicalDataModel:
68
68
 
69
69
  @session_wrapper
70
70
  class ReadPhysicalDataModel:
71
- """Read physical data model from various sources into NeatSession graph store."""
71
+ """Read physical data model from various sources into NeatSession store."""
72
72
 
73
73
  def __init__(self, store: NeatStore, client: NeatClient, config: NeatConfig) -> None:
74
74
  self._store = store
@@ -130,7 +130,12 @@ class ReadPhysicalDataModel:
130
130
  return self._store.read_physical(reader, on_success)
131
131
 
132
132
  def excel(self, io: Any) -> None:
133
- """Read physical data model from Excel file"""
133
+ """Read physical data model from Excel file
134
+
135
+ Args:
136
+ io (Any): The file path or buffer to read from.
137
+
138
+ """
134
139
 
135
140
  path = NeatReader.create(io).materialize_path()
136
141
  reader = DMSTableImporter.from_excel(path)
@@ -165,7 +170,7 @@ class ReadPhysicalDataModel:
165
170
 
166
171
  @session_wrapper
167
172
  class WritePhysicalDataModel:
168
- """Write physical data model to various sources from NeatSession graph store."""
173
+ """Write physical data model to various sources from NeatSession store."""
169
174
 
170
175
  def __init__(self, store: NeatStore, client: NeatClient, config: NeatConfig) -> None:
171
176
  self._store = store
cognite/neat/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.127.31"
1
+ __version__ = "0.128.0"
2
2
  __engine__ = "^2.0.4"
@@ -93,7 +93,7 @@ class EnvironmentVariables:
93
93
  LOGIN_FLOW: _LOGIN_FLOW = "infer"
94
94
  IDP_CLIENT_ID: str | None = None
95
95
  IDP_CLIENT_SECRET: str | None = None
96
- TOKEN: str | None = None
96
+ CDF_TOKEN: str | None = None
97
97
 
98
98
  IDP_TENANT_ID: str | None = None
99
99
  IDP_TOKEN_URL: str | None = None
@@ -103,7 +103,7 @@ class EnvironmentVariables:
103
103
  IDP_SCOPES: str | None = None
104
104
  IDP_AUTHORITY_URL: str | None = None
105
105
  CDF_MAX_WORKERS: int | None = None
106
- CDF_TIMEOUT: int | None = None
106
+ CDF_CLIENT_TIMEOUT: int | None = None
107
107
  CDF_REDIRECT_PORT: int = 53_000
108
108
 
109
109
  def __post_init__(self) -> None:
@@ -155,7 +155,7 @@ class EnvironmentVariables:
155
155
  LOGIN_FLOW=os.environ.get("LOGIN_FLOW", "infer"), # type: ignore[arg-type]
156
156
  IDP_CLIENT_ID=os.environ.get("IDP_CLIENT_ID"),
157
157
  IDP_CLIENT_SECRET=os.environ.get("IDP_CLIENT_SECRET"),
158
- TOKEN=os.environ.get("TOKEN"),
158
+ CDF_TOKEN=os.environ.get("CDF_TOKEN"),
159
159
  CDF_URL=os.environ.get("CDF_URL"),
160
160
  IDP_TOKEN_URL=os.environ.get("IDP_TOKEN_URL"),
161
161
  IDP_TENANT_ID=os.environ.get("IDP_TENANT_ID"),
@@ -163,7 +163,7 @@ class EnvironmentVariables:
163
163
  IDP_SCOPES=os.environ.get("IDP_SCOPES"),
164
164
  IDP_AUTHORITY_URL=os.environ.get("IDP_AUTHORITY_URL"),
165
165
  CDF_MAX_WORKERS=int(os.environ["CDF_MAX_WORKERS"]) if "CDF_MAX_WORKERS" in os.environ else None,
166
- CDF_TIMEOUT=int(os.environ["CDF_TIMEOUT"]) if "CDF_TIMEOUT" in os.environ else None,
166
+ CDF_CLIENT_TIMEOUT=int(os.environ["CDF_CLIENT_TIMEOUT"]) if "CDF_CLIENT_TIMEOUT" in os.environ else None,
167
167
  CDF_REDIRECT_PORT=int(os.environ.get("CDF_REDIRECT_PORT", 53_000)),
168
168
  )
169
169
 
@@ -179,7 +179,7 @@ class EnvironmentVariables:
179
179
  IDP_CLIENT_ID="neat",
180
180
  IDP_CLIENT_SECRET="secret",
181
181
  IDP_SCOPES="project:read,project:write",
182
- CDF_TIMEOUT=60,
182
+ CDF_CLIENT_TIMEOUT=60,
183
183
  CDF_MAX_WORKERS=3,
184
184
  )
185
185
 
@@ -228,9 +228,9 @@ class EnvironmentVariables:
228
228
  )
229
229
 
230
230
  def get_token(self) -> Token:
231
- if not self.TOKEN:
232
- raise KeyError("TOKEN must be set in the environment", "TOKEN")
233
- return Token(self.TOKEN)
231
+ if not self.CDF_TOKEN:
232
+ raise KeyError("CDF_TOKEN must be set in the environment", "CDF_TOKEN")
233
+ return Token(self.CDF_TOKEN)
234
234
 
235
235
  def get_client(self) -> CogniteClient:
236
236
  config = ClientConfig(
@@ -239,7 +239,7 @@ class EnvironmentVariables:
239
239
  credentials=self.get_credentials(),
240
240
  base_url=self.cdf_url,
241
241
  max_workers=self.CDF_MAX_WORKERS,
242
- timeout=self.CDF_TIMEOUT,
242
+ timeout=self.CDF_CLIENT_TIMEOUT,
243
243
  )
244
244
  return CogniteClient(config)
245
245
 
@@ -298,7 +298,7 @@ def _prompt_user() -> EnvironmentVariables:
298
298
  variables.LOGIN_FLOW = login_flow # type: ignore[assignment]
299
299
  if login_flow == "token":
300
300
  token = Prompt.ask("Enter token")
301
- variables.TOKEN = token
301
+ variables.CDF_TOKEN = token
302
302
  return variables
303
303
 
304
304
  variables.IDP_CLIENT_ID = Prompt.ask("Enter IDP Client ID")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite-neat
3
- Version: 0.127.31
3
+ Version: 0.128.0
4
4
  Summary: Knowledge graph transformation
5
5
  Project-URL: Documentation, https://cognite-neat.readthedocs-hosted.com/
6
6
  Project-URL: Homepage, https://cognite-neat.readthedocs-hosted.com/
@@ -2,7 +2,7 @@ cognite/neat/__init__.py,sha256=Lo4DbjDOwnhCYUoAgPp5RG1fDdF7OlnomalTe7n1ydw,211
2
2
  cognite/neat/_config.py,sha256=W42Lj5PNR9X1is9vIPHLHvkl_rpU5PCrDuQI4zSNTJQ,6359
3
3
  cognite/neat/_exceptions.py,sha256=ox-5hXpee4UJlPE7HpuEHV2C96aLbLKo-BhPDoOAzhA,1650
4
4
  cognite/neat/_issues.py,sha256=wH1mnkrpBsHUkQMGUHFLUIQWQlfJ_qMfdF7q0d9wNhY,1871
5
- cognite/neat/_version.py,sha256=rvkcySAmEggTDqAglgVEXmb2SsDZO3WaXGVcdNwHKNU,47
5
+ cognite/neat/_version.py,sha256=XCcMciPV0cp-JoQPmWFRmq1-Jwman3BoubFATr_y8pU,46
6
6
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  cognite/neat/v1.py,sha256=owqW5Mml2DSZx1AvPvwNRTBngfhBNrQ6EH-7CKL7Jp0,61
8
8
  cognite/neat/_client/__init__.py,sha256=75Bh7eGhaN4sOt3ZcRzHl7pXaheu1z27kmTHeaI05vo,114
@@ -86,7 +86,7 @@ cognite/neat/_data_model/validation/dms/_views.py,sha256=M4egIa7UAMGtZlqzIxx6ZzL
86
86
  cognite/neat/_session/__init__.py,sha256=owqW5Mml2DSZx1AvPvwNRTBngfhBNrQ6EH-7CKL7Jp0,61
87
87
  cognite/neat/_session/_issues.py,sha256=E8UQeSJURg2dm4MF1pfD9dp-heSRT7pgQZgKlD1-FGs,2723
88
88
  cognite/neat/_session/_opt.py,sha256=QcVK08JMmVzJpD0GKHelbljMOQi6CMD1w-maQOlbyZQ,1350
89
- cognite/neat/_session/_physical.py,sha256=0EdpFS5v4pk4XJju8vZm3pHIM4AlSaCjxGRKeMAcq9g,11304
89
+ cognite/neat/_session/_physical.py,sha256=ajNanS87THBESx_y1x6p6LomqOe51b197VKPaBPLZ30,11377
90
90
  cognite/neat/_session/_result.py,sha256=po2X4s-Tioe0GQAGCfK862hKXNRX5YjJZsEzNcTC8nI,7879
91
91
  cognite/neat/_session/_session.py,sha256=tWEvzi_85Ji52i2q5vJ7xIg3yR-8ywVCH8FjgncdlnU,3471
92
92
  cognite/neat/_session/_wrappers.py,sha256=9t_MnJ0Sw_v-f6oTIh8dtAT-3oEbqumGuND97aPCC3M,3581
@@ -268,7 +268,7 @@ cognite/neat/v0/core/_store/_instance.py,sha256=zt7pgYwgMbnAwz7Xn-_AiMsXhbBdwXWB
268
268
  cognite/neat/v0/core/_store/_provenance.py,sha256=Q96wkVXRovO_uTlNvwCAOl6pAoWItTgFq1F79L_FqBk,7335
269
269
  cognite/neat/v0/core/_store/exceptions.py,sha256=dTaBSt7IV7XWtS3EsE8lBX1Dv3tfWX1nIEgGHkluy3s,1668
270
270
  cognite/neat/v0/core/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
271
- cognite/neat/v0/core/_utils/auth.py,sha256=CAAmIYT_Cy458XXsx10ggPhatPbL6sGt90C3DpJAog0,14766
271
+ cognite/neat/v0/core/_utils/auth.py,sha256=SHGujntO3_dGMzCXyF6R24ECtN8DZmmM_1cKigD6byk,14840
272
272
  cognite/neat/v0/core/_utils/auxiliary.py,sha256=lflbBC_cxO3PyQGvnwIGDZZIOSGNNyNrbawaFe8tNys,7115
273
273
  cognite/neat/v0/core/_utils/collection_.py,sha256=hYyvje47AAvY7sCmZy0NouX1OMVKLhJ6qAzwg0DIOhg,2382
274
274
  cognite/neat/v0/core/_utils/graph_transformations_report.py,sha256=-V0LM9BI_bHT6PTTG9Qby4PGtFkYU3cxtF0cz8KoKek,1238
@@ -313,7 +313,7 @@ cognite/neat/v0/session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4
313
313
  cognite/neat/v0/session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
314
314
  cognite/neat/v0/session/engine/_interface.py,sha256=3W-cYr493c_mW3P5O6MKN1xEQg3cA7NHR_ev3zdF9Vk,533
315
315
  cognite/neat/v0/session/engine/_load.py,sha256=u0x7vuQCRoNcPt25KJBJRn8sJabonYK4vtSZpiTdP4k,5201
316
- cognite_neat-0.127.31.dist-info/METADATA,sha256=M2giADSPBb8V9B1ejRjCNgGcYL8hZCdPoyg3Ddwrt9M,9150
317
- cognite_neat-0.127.31.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
318
- cognite_neat-0.127.31.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
319
- cognite_neat-0.127.31.dist-info/RECORD,,
316
+ cognite_neat-0.128.0.dist-info/METADATA,sha256=52-VxFdZ3tRmBFhwP47Ishu7aJ3ocVbVq2M5NJhbMP4,9149
317
+ cognite_neat-0.128.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
318
+ cognite_neat-0.128.0.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
319
+ cognite_neat-0.128.0.dist-info/RECORD,,