cognite-neat 0.117.7__py3-none-any.whl → 0.117.9__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-neat might be problematic. Click here for more details.

@@ -1,5 +1,4 @@
1
1
  import json
2
- import re
3
2
  from abc import ABC, abstractmethod
4
3
  from collections.abc import Collection
5
4
  from functools import total_ordering
@@ -42,8 +41,8 @@ class WrappedEntity(BaseModel, ABC):
42
41
 
43
42
  # raw filter case:
44
43
  if cls.__name__ == "RawFilter":
45
- if match := re.search(r"rawFilter\(([\s\S]*?)\)", data):
46
- return {"filter": match.group(1), "inner": None}
44
+ if data.startswith("rawFilter(") and data.endswith(")"):
45
+ return {"filter": data[10:-1], "inner": None}
47
46
  else:
48
47
  raise ValueError(f"Cannot parse {cls.name} from {data}. Ill formatted raw filter.")
49
48
 
@@ -193,7 +192,7 @@ class RawFilter(DMSFilter):
193
192
  filter: str
194
193
  inner: None = None # type: ignore[assignment]
195
194
 
196
- def as_dms_filter(self) -> dm.Filter: # type: ignore[override]
195
+ def as_dms_filter(self, default: Any | None = None) -> dm.Filter:
197
196
  try:
198
197
  return dm.Filter.load(json.loads(self.filter))
199
198
  except json.JSONDecodeError as e:
@@ -342,7 +342,9 @@ def _prompt_cluster_and_project() -> EnvironmentVariables:
342
342
  def _repo_root() -> Path | None:
343
343
  # Redirecting stderr to suppress the error message if the command fails
344
344
  with suppress(Exception), redirect_stderr(StringIO()), redirect_stdout(StringIO()):
345
- result = subprocess.run("git rev-parse --show-toplevel".split(), stdout=subprocess.PIPE)
345
+ result = subprocess.run(
346
+ "git rev-parse --show-toplevel".split(), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
347
+ )
346
348
  if (output := result.stdout.decode().strip()) != "":
347
349
  return Path(output)
348
350
  return None
cognite/neat/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.117.7"
1
+ __version__ = "0.117.9"
2
2
  __engine__ = "^2.0.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cognite-neat
3
- Version: 0.117.7
3
+ Version: 0.117.9
4
4
  Summary: Knowledge graph transformation
5
5
  License: Apache-2.0
6
6
  Author: Nikola Vasiljevic
@@ -122,7 +122,7 @@ cognite/neat/_rules/models/entities/_loaders.py,sha256=OQDbz5ANMQ_7ZcdMIBdTR94Bo
122
122
  cognite/neat/_rules/models/entities/_multi_value.py,sha256=DNoc0XUhqZhaSXoocJKL6oGOqlv_TB_oqYKp11BmD_c,2762
123
123
  cognite/neat/_rules/models/entities/_single_value.py,sha256=7VBnsnmceaOEPmMnF_bHQz8drflc7pcQYmGC39Vj8Fk,19891
124
124
  cognite/neat/_rules/models/entities/_types.py,sha256=df9rnXJJKciv2Bp-Ve2q4xdEJt6WWniq12Z0hW2d6sk,1917
125
- cognite/neat/_rules/models/entities/_wrapped.py,sha256=DaEfd14m6vLdb51ohSCzlvVGLf3KB70WNJQ23QpkDV4,7767
125
+ cognite/neat/_rules/models/entities/_wrapped.py,sha256=L8ujfOHLQxkUzuJWHgdpPUCaHbjcCdDUiKsyApS7McU,7756
126
126
  cognite/neat/_rules/models/information/__init__.py,sha256=lV7l8RTfWBvN_DFkzea8OzADjq0rZGgWe_0Fiwtfje0,556
127
127
  cognite/neat/_rules/models/information/_rules.py,sha256=eb1_uunWmEnZV0rnuGq7-GyDICJU5yvGrzQNHSGoUKE,13561
128
128
  cognite/neat/_rules/models/information/_rules_input.py,sha256=Pk6DNwDfTUr5DbbuIaFj0ICS9XmwqbhYlaz1d96ouDk,6037
@@ -164,7 +164,7 @@ cognite/neat/_store/_provenance.py,sha256=V2rBK3L4wneoiTBvir3AbmrcPsl6XVmefovkkj
164
164
  cognite/neat/_store/_rules_store.py,sha256=dh2GfDRRtQ2F00I5hdqYveULQKx2_kt630Mac_ZFF2k,18562
165
165
  cognite/neat/_store/exceptions.py,sha256=XznWE3X8iBpnTKcC2SpInwesQVpfinGBzQT6xX9GANg,1614
166
166
  cognite/neat/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
167
- cognite/neat/_utils/auth.py,sha256=pr210CK2HGeJ3qkZ8nug6UHl43lQonJEWAGx5GU1_2E,14709
167
+ cognite/neat/_utils/auth.py,sha256=br3Q6ZxHl71Z_6nJaCoMv2zixiXi4oZFSPHNnBERxQI,14758
168
168
  cognite/neat/_utils/auxiliary.py,sha256=wYEoOpq-3FCWm0wYQG2xG18aorUrHYrNdi41gqDyxZU,6845
169
169
  cognite/neat/_utils/collection_.py,sha256=JvYLSR6Cf8PIKGhr8HKRvep0U-z0980jbnIM_g-5I5I,2366
170
170
  cognite/neat/_utils/graph_transformations_report.py,sha256=rjEy4XMvOygFL4UgnYOmFW6AHxaU9IXep-dmYc5654c,1230
@@ -177,10 +177,10 @@ cognite/neat/_utils/text.py,sha256=qy7lgMdRjzxSYkL8teAnWsq6T5baS_QcezHLK007_7M,7
177
177
  cognite/neat/_utils/time_.py,sha256=7ayUm0OWZm1JDmy32E4ip8WRr2o0GLwrHwJA8sJ43Z4,357
178
178
  cognite/neat/_utils/upload.py,sha256=xWtM6mFuD2QYQHaZ7zCAuGptbEpPIxcH-raWQu93-Ug,5845
179
179
  cognite/neat/_utils/xml_.py,sha256=FQkq84u35MUsnKcL6nTMJ9ajtG9D5i1u4VBnhGqP2DQ,1710
180
- cognite/neat/_version.py,sha256=YaJljgB-To714TXw92iAMOx0O_mDVE8_4374I5hLzUM,46
180
+ cognite/neat/_version.py,sha256=QAfP-nKtktitR2MDA9DYnxpbDb854mbJ_-5pKo0A0L0,46
181
181
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
- cognite_neat-0.117.7.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
183
- cognite_neat-0.117.7.dist-info/METADATA,sha256=wPT2i-xQ3VetpDGye8FiVdrRnMRW6vyZnIZ9dxRfUQE,5361
184
- cognite_neat-0.117.7.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
185
- cognite_neat-0.117.7.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
186
- cognite_neat-0.117.7.dist-info/RECORD,,
182
+ cognite_neat-0.117.9.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
183
+ cognite_neat-0.117.9.dist-info/METADATA,sha256=dlBeOE7p53mRzY2Xw0zuRYJ-6vM5uoZISd9vTn-DYtQ,5361
184
+ cognite_neat-0.117.9.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
185
+ cognite_neat-0.117.9.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
186
+ cognite_neat-0.117.9.dist-info/RECORD,,