cognite-neat 0.121.1__py3-none-any.whl → 0.122.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.
Potentially problematic release.
This version of cognite-neat might be problematic. Click here for more details.
- cognite/neat/_version.py +1 -1
- cognite/neat/core/_client/_api/statistics.py +91 -0
- cognite/neat/core/_client/_api_client.py +2 -0
- cognite/neat/core/_client/data_classes/statistics.py +125 -0
- cognite/neat/core/_client/testing.py +4 -0
- cognite/neat/core/_constants.py +6 -7
- cognite/neat/core/_data_model/_constants.py +23 -16
- cognite/neat/core/_data_model/_shared.py +33 -17
- cognite/neat/core/_data_model/analysis/__init__.py +2 -2
- cognite/neat/core/_data_model/analysis/_base.py +186 -183
- cognite/neat/core/_data_model/catalog/__init__.py +2 -2
- cognite/neat/core/_data_model/exporters/__init__.py +6 -6
- cognite/neat/core/_data_model/exporters/_base.py +10 -8
- cognite/neat/core/_data_model/exporters/{_rules2dms.py → _data_model2dms.py} +22 -18
- cognite/neat/core/_data_model/exporters/{_rules2excel.py → _data_model2excel.py} +51 -51
- cognite/neat/core/_data_model/exporters/{_rules2instance_template.py → _data_model2instance_template.py} +14 -14
- cognite/neat/core/_data_model/exporters/{_rules2ontology.py → _data_model2ontology.py} +50 -50
- cognite/neat/core/_data_model/exporters/{_rules2yaml.py → _data_model2yaml.py} +21 -18
- cognite/neat/core/_data_model/importers/__init__.py +8 -8
- cognite/neat/core/_data_model/importers/_base.py +8 -6
- cognite/neat/core/_data_model/importers/_base_file_reader.py +56 -0
- cognite/neat/core/_data_model/importers/{_yaml2rules.py → _dict2data_model.py} +50 -25
- cognite/neat/core/_data_model/importers/{_dms2rules.py → _dms2data_model.py} +58 -49
- cognite/neat/core/_data_model/importers/{_dtdl2rules → _dtdl2data_model}/dtdl_converter.py +22 -22
- cognite/neat/core/_data_model/importers/{_dtdl2rules → _dtdl2data_model}/dtdl_importer.py +7 -7
- cognite/neat/core/_data_model/importers/{_dtdl2rules → _dtdl2data_model}/spec.py +3 -3
- cognite/neat/core/_data_model/importers/_rdf/__init__.py +3 -3
- cognite/neat/core/_data_model/importers/_rdf/_base.py +15 -15
- cognite/neat/core/_data_model/importers/_rdf/{_imf2rules.py → _imf2data_model.py} +17 -17
- cognite/neat/core/_data_model/importers/_rdf/{_inference2rules.py → _inference2rdata_model.py} +59 -59
- cognite/neat/core/_data_model/importers/_rdf/{_owl2rules.py → _owl2data_model.py} +17 -17
- cognite/neat/core/_data_model/importers/_rdf/_shared.py +25 -25
- cognite/neat/core/_data_model/importers/{_spreadsheet2rules.py → _spreadsheet2data_model.py} +76 -19
- cognite/neat/core/_data_model/models/__init__.py +11 -9
- cognite/neat/core/_data_model/models/_base_unverified.py +12 -12
- cognite/neat/core/_data_model/models/_base_verified.py +9 -14
- cognite/neat/core/_data_model/models/_types.py +6 -6
- cognite/neat/core/_data_model/models/conceptual/__init__.py +6 -6
- cognite/neat/core/_data_model/models/conceptual/_unverified.py +20 -20
- cognite/neat/core/_data_model/models/conceptual/_validation.py +88 -78
- cognite/neat/core/_data_model/models/conceptual/_verified.py +54 -52
- cognite/neat/core/_data_model/models/data_types.py +2 -2
- cognite/neat/core/_data_model/models/entities/__init__.py +8 -8
- cognite/neat/core/_data_model/models/entities/_loaders.py +11 -10
- cognite/neat/core/_data_model/models/entities/_multi_value.py +5 -5
- cognite/neat/core/_data_model/models/entities/_single_value.py +44 -38
- cognite/neat/core/_data_model/models/entities/_types.py +9 -3
- cognite/neat/core/_data_model/models/entities/_wrapped.py +3 -3
- cognite/neat/core/_data_model/models/mapping/_classic2core.py +12 -9
- cognite/neat/core/_data_model/models/physical/__init__.py +40 -0
- cognite/neat/core/_data_model/models/{dms → physical}/_exporter.py +75 -55
- cognite/neat/core/_data_model/models/{dms/_rules_input.py → physical/_unverified.py} +48 -39
- cognite/neat/core/_data_model/models/{dms → physical}/_validation.py +17 -15
- cognite/neat/core/_data_model/models/{dms/_rules.py → physical/_verified.py} +68 -60
- cognite/neat/core/_data_model/transformers/__init__.py +29 -25
- cognite/neat/core/_data_model/transformers/_base.py +27 -20
- cognite/neat/core/_data_model/transformers/_converters.py +707 -622
- cognite/neat/core/_data_model/transformers/_mapping.py +74 -55
- cognite/neat/core/_data_model/transformers/_verification.py +64 -55
- cognite/neat/core/_instances/extractors/_base.py +2 -2
- cognite/neat/core/_instances/extractors/_classic_cdf/_classic.py +9 -9
- cognite/neat/core/_instances/extractors/_dms_graph.py +42 -34
- cognite/neat/core/_instances/extractors/_mock_graph_generator.py +107 -103
- cognite/neat/core/_instances/loaders/_base.py +3 -3
- cognite/neat/core/_instances/loaders/_rdf2dms.py +22 -22
- cognite/neat/core/_instances/transformers/_base.py +7 -4
- cognite/neat/core/_instances/transformers/_rdfpath.py +1 -1
- cognite/neat/core/_instances/transformers/_value_type.py +2 -6
- cognite/neat/core/_issues/_base.py +4 -4
- cognite/neat/core/_issues/_factory.py +1 -1
- cognite/neat/core/_issues/errors/__init__.py +2 -2
- cognite/neat/core/_issues/errors/_resources.py +1 -1
- cognite/neat/core/_issues/errors/_wrapper.py +2 -2
- cognite/neat/core/_issues/warnings/_models.py +4 -4
- cognite/neat/core/_issues/warnings/_properties.py +1 -1
- cognite/neat/core/_store/__init__.py +3 -3
- cognite/neat/core/_store/{_rules_store.py → _data_model.py} +119 -112
- cognite/neat/core/_store/{_graph_store.py → _instance.py} +3 -4
- cognite/neat/core/_store/_provenance.py +2 -2
- cognite/neat/core/_store/exceptions.py +2 -2
- cognite/neat/core/_utils/rdf_.py +14 -0
- cognite/neat/core/_utils/text.py +1 -1
- cognite/neat/session/_base.py +42 -36
- cognite/neat/session/_drop.py +2 -2
- cognite/neat/session/_experimental.py +1 -1
- cognite/neat/session/_inspect.py +13 -13
- cognite/neat/session/_mapping.py +15 -9
- cognite/neat/session/_read.py +39 -37
- cognite/neat/session/_set.py +6 -6
- cognite/neat/session/_show.py +24 -21
- cognite/neat/session/_state/README.md +1 -1
- cognite/neat/session/_state.py +27 -27
- cognite/neat/session/_subset.py +14 -11
- cognite/neat/session/_template.py +23 -21
- cognite/neat/session/_to.py +42 -42
- {cognite_neat-0.121.1.dist-info → cognite_neat-0.122.0.dist-info}/METADATA +14 -7
- {cognite_neat-0.121.1.dist-info → cognite_neat-0.122.0.dist-info}/RECORD +102 -100
- cognite/neat/core/_data_model/exporters/_validation.py +0 -14
- cognite/neat/core/_data_model/models/dms/__init__.py +0 -32
- /cognite/neat/core/_data_model/catalog/{info-rules-imf.xlsx → conceptual-imf-data-model.xlsx} +0 -0
- /cognite/neat/core/_data_model/importers/{_dtdl2rules → _dtdl2data_model}/__init__.py +0 -0
- /cognite/neat/core/_data_model/importers/{_dtdl2rules → _dtdl2data_model}/_unit_lookup.py +0 -0
- {cognite_neat-0.121.1.dist-info → cognite_neat-0.122.0.dist-info}/WHEEL +0 -0
- {cognite_neat-0.121.1.dist-info → cognite_neat-0.122.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -25,9 +25,9 @@ from cognite.neat.core._constants import (
|
|
|
25
25
|
DMS_DIRECT_RELATION_LIST_DEFAULT_LIMIT,
|
|
26
26
|
is_readonly_property,
|
|
27
27
|
)
|
|
28
|
-
from cognite.neat.core._data_model.analysis import
|
|
28
|
+
from cognite.neat.core._data_model.analysis import DataModelAnalysis
|
|
29
29
|
from cognite.neat.core._data_model.analysis._base import ViewQuery, ViewQueryDict
|
|
30
|
-
from cognite.neat.core._data_model.models import
|
|
30
|
+
from cognite.neat.core._data_model.models import PhysicalDataModel
|
|
31
31
|
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
32
32
|
ConceptualDataModel,
|
|
33
33
|
)
|
|
@@ -51,7 +51,7 @@ from cognite.neat.core._issues.warnings import (
|
|
|
51
51
|
ResourceNeatWarning,
|
|
52
52
|
)
|
|
53
53
|
from cognite.neat.core._shared import InstanceType
|
|
54
|
-
from cognite.neat.core._store import
|
|
54
|
+
from cognite.neat.core._store import NeatInstanceStore
|
|
55
55
|
from cognite.neat.core._utils.auxiliary import create_sha256_hash
|
|
56
56
|
from cognite.neat.core._utils.collection_ import (
|
|
57
57
|
iterate_progress_bar_if_above_config_threshold,
|
|
@@ -96,13 +96,13 @@ class _Projection:
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
99
|
-
"""Loads Instances to Cognite Data Fusion Data Model Service from
|
|
99
|
+
"""Loads Instances to Cognite Data Fusion Data Model Service from NeatInstanceStore.
|
|
100
100
|
|
|
101
101
|
Args:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
look+up the instances in the store.
|
|
105
|
-
|
|
102
|
+
physical_data_model (PhysicalDataModel): Physical data model.
|
|
103
|
+
conceptual_data_model (ConceptualDataModel): Conceptual data model,
|
|
104
|
+
used to look+up the instances in the store.
|
|
105
|
+
instance_store (NeatInstanceStore): The instance store to load the instances from.
|
|
106
106
|
instance_space (str): The instance space to load the data into.
|
|
107
107
|
create_issues (Sequence[NeatIssue] | None): A list of issues that occurred during reading. Defaults to None.
|
|
108
108
|
client (NeatClient | None): This is used to lookup containers such that the loader
|
|
@@ -115,9 +115,9 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
115
115
|
|
|
116
116
|
def __init__(
|
|
117
117
|
self,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
physical_data_model: PhysicalDataModel,
|
|
119
|
+
conceptual_data_model: ConceptualDataModel,
|
|
120
|
+
instance_store: NeatInstanceStore,
|
|
121
121
|
instance_space: str,
|
|
122
122
|
space_property: str | None = None,
|
|
123
123
|
use_source_space: bool = False,
|
|
@@ -127,9 +127,9 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
127
127
|
neat_prefix_by_predicate_uri: dict[URIRef, str] | None = None,
|
|
128
128
|
neat_prefix_by_type_uri: dict[URIRef, str] | None = None,
|
|
129
129
|
):
|
|
130
|
-
super().__init__(
|
|
131
|
-
self.
|
|
132
|
-
self.
|
|
130
|
+
super().__init__(instance_store)
|
|
131
|
+
self.physical_data_model = physical_data_model
|
|
132
|
+
self.conceptual_data_model = conceptual_data_model
|
|
133
133
|
self.neat_prefix_by_predicate_uri = neat_prefix_by_predicate_uri or {}
|
|
134
134
|
self.neat_prefix_by_type_uri = neat_prefix_by_type_uri or {}
|
|
135
135
|
self._instance_space = instance_space
|
|
@@ -192,7 +192,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
192
192
|
projection, issues = self._create_projection(view)
|
|
193
193
|
yield from issues
|
|
194
194
|
query = it.query
|
|
195
|
-
reader = self.
|
|
195
|
+
reader = self.instance_store.read(
|
|
196
196
|
query.rdf_type,
|
|
197
197
|
property_renaming_config=query.property_renaming_config,
|
|
198
198
|
remove_uri_namespace=False,
|
|
@@ -209,7 +209,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
209
209
|
yield _END_OF_CLASS
|
|
210
210
|
|
|
211
211
|
def _create_view_iterations(self) -> tuple[list[_ViewIterator], IssueList]:
|
|
212
|
-
view_query_by_id =
|
|
212
|
+
view_query_by_id = DataModelAnalysis(self.conceptual_data_model, self.physical_data_model).view_query_by_id
|
|
213
213
|
iterations_by_view_id = self._select_views_with_instances(view_query_by_id)
|
|
214
214
|
if self._client:
|
|
215
215
|
issues = IssueList()
|
|
@@ -224,7 +224,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
224
224
|
else:
|
|
225
225
|
views = dm.ViewList([])
|
|
226
226
|
with catch_issues() as issues:
|
|
227
|
-
read_model = self.
|
|
227
|
+
read_model = self.physical_data_model.as_schema().as_read_model()
|
|
228
228
|
views.extend(read_model.views)
|
|
229
229
|
if issues.has_errors:
|
|
230
230
|
return [], issues
|
|
@@ -274,7 +274,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
274
274
|
"""Selects the views with data."""
|
|
275
275
|
view_iterations: dict[dm.ViewId, _ViewIterator] = {}
|
|
276
276
|
for view_id, query in view_query_by_id.items():
|
|
277
|
-
count = self.
|
|
277
|
+
count = self.instance_store.queries.select.count_of_type(query.rdf_type)
|
|
278
278
|
if count > 0:
|
|
279
279
|
view_iterations[view_id] = _ViewIterator(view_id, count, query)
|
|
280
280
|
return view_iterations
|
|
@@ -284,7 +284,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
284
284
|
if self._space_property is None:
|
|
285
285
|
return issues
|
|
286
286
|
total = sum(it.instance_count for it in view_iterations)
|
|
287
|
-
properties_by_uriref = self.
|
|
287
|
+
properties_by_uriref = self.instance_store.queries.select.properties()
|
|
288
288
|
space_property_uri = next((k for k, v in properties_by_uriref.items() if v == self._space_property), None)
|
|
289
289
|
if space_property_uri is None:
|
|
290
290
|
error: ResourceNotFoundError[str, str] = ResourceNotFoundError(
|
|
@@ -297,7 +297,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
297
297
|
issues.append(error)
|
|
298
298
|
return issues
|
|
299
299
|
|
|
300
|
-
instance_iterable = self.
|
|
300
|
+
instance_iterable = self.instance_store.queries.select.list_instances_ids_by_space(space_property_uri)
|
|
301
301
|
instance_iterable = iterate_progress_bar_if_above_config_threshold(
|
|
302
302
|
instance_iterable, total, f"Looking up spaces for {total} instances..."
|
|
303
303
|
)
|
|
@@ -323,8 +323,8 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
323
323
|
if not self.neat_prefix_by_type_uri:
|
|
324
324
|
return
|
|
325
325
|
|
|
326
|
-
count = sum(count for _, count in self.
|
|
327
|
-
instance_iterable = self.
|
|
326
|
+
count = sum(count for _, count in self.instance_store.queries.select.summarize_instances())
|
|
327
|
+
instance_iterable = self.instance_store.queries.select.list_instances_ids()
|
|
328
328
|
instance_iterable = iterate_progress_bar_if_above_config_threshold(
|
|
329
329
|
instance_iterable, count, f"Looking up identifiers for {count} instances..."
|
|
330
330
|
)
|
|
@@ -100,10 +100,13 @@ class BaseTransformerStandardised(ABC):
|
|
|
100
100
|
if self._skip_count_query():
|
|
101
101
|
skipped_count_res = list(graph.query(self._skip_count_query()))
|
|
102
102
|
skipped_count = int(skipped_count_res[0][0]) # type: ignore [index, arg-type]
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
if skipped_count > 0:
|
|
104
|
+
warnings.warn(
|
|
105
|
+
NeatValueWarning(
|
|
106
|
+
f"Skipping {skipped_count} properties in transformation {self.__class__.__name__}"
|
|
107
|
+
),
|
|
108
|
+
stacklevel=2,
|
|
109
|
+
)
|
|
107
110
|
outcome.skipped = skipped_count
|
|
108
111
|
|
|
109
112
|
if iteration_count == 0:
|
|
@@ -10,7 +10,7 @@ from ._base import BaseTransformerStandardised, RowTransformationOutput
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class MakeConnectionOnExactMatch(BaseTransformerStandardised):
|
|
13
|
-
description: str = "Adds property that contains id of reference to all references of given class in
|
|
13
|
+
description: str = "Adds property that contains id of reference to all references of given class in model"
|
|
14
14
|
_use_only_once: bool = False
|
|
15
15
|
_need_changes = frozenset({})
|
|
16
16
|
|
|
@@ -10,11 +10,7 @@ from rdflib.query import ResultRow
|
|
|
10
10
|
from cognite.neat.core._constants import NEAT
|
|
11
11
|
from cognite.neat.core._issues.warnings import PropertyDataTypeConversionWarning
|
|
12
12
|
from cognite.neat.core._utils.auxiliary import string_to_ideal_type
|
|
13
|
-
from cognite.neat.core._utils.rdf_ import
|
|
14
|
-
Triple,
|
|
15
|
-
get_namespace,
|
|
16
|
-
remove_namespace_from_uri,
|
|
17
|
-
)
|
|
13
|
+
from cognite.neat.core._utils.rdf_ import Triple, get_namespace, remove_namespace_from_uri, uri_to_cdf_id
|
|
18
14
|
|
|
19
15
|
from ._base import BaseTransformerStandardised, RowTransformationOutput
|
|
20
16
|
|
|
@@ -303,7 +299,7 @@ class ConnectionToLiteral(BaseTransformerStandardised):
|
|
|
303
299
|
row_output = RowTransformationOutput()
|
|
304
300
|
|
|
305
301
|
instance, object_entity = cast(tuple[URIRef, URIRef], query_result_row)
|
|
306
|
-
value =
|
|
302
|
+
value = uri_to_cdf_id(object_entity)
|
|
307
303
|
|
|
308
304
|
row_output.add_triples.add((instance, self.subject_predicate, rdflib.Literal(value)))
|
|
309
305
|
row_output.remove_triples.add((instance, self.subject_predicate, object_entity))
|
|
@@ -119,7 +119,7 @@ class NeatIssue:
|
|
|
119
119
|
|
|
120
120
|
@classmethod
|
|
121
121
|
def _dump_value(cls, value: Any) -> list | int | bool | float | str | dict:
|
|
122
|
-
from cognite.neat.core._data_model.models.entities import
|
|
122
|
+
from cognite.neat.core._data_model.models.entities import ConceptualEntity
|
|
123
123
|
|
|
124
124
|
if isinstance(value, str | int | bool | float):
|
|
125
125
|
return value
|
|
@@ -131,7 +131,7 @@ class NeatIssue:
|
|
|
131
131
|
return [cls._dump_value(item) for item in value]
|
|
132
132
|
elif isinstance(value, ViewId | ContainerId):
|
|
133
133
|
return value.dump(camel_case=True, include_type=True)
|
|
134
|
-
elif isinstance(value,
|
|
134
|
+
elif isinstance(value, ConceptualEntity):
|
|
135
135
|
return value.dump()
|
|
136
136
|
elif isinstance(value, PropertyId):
|
|
137
137
|
return value.dump(camel_case=True)
|
|
@@ -173,7 +173,7 @@ class NeatIssue:
|
|
|
173
173
|
|
|
174
174
|
@classmethod
|
|
175
175
|
def _load_value(cls, type_: Any, value: Any) -> Any:
|
|
176
|
-
from cognite.neat.core._data_model.models.entities import
|
|
176
|
+
from cognite.neat.core._data_model.models.entities import ConceptualEntity
|
|
177
177
|
|
|
178
178
|
if isinstance(type_, UnionType) or get_origin(type_) is UnionType:
|
|
179
179
|
args = get_args(type_)
|
|
@@ -194,7 +194,7 @@ class NeatIssue:
|
|
|
194
194
|
return PropertyId.load(value)
|
|
195
195
|
elif type_ is ContainerId:
|
|
196
196
|
return ContainerId.load(value)
|
|
197
|
-
elif inspect.isclass(type_) and issubclass(type_,
|
|
197
|
+
elif inspect.isclass(type_) and issubclass(type_, ConceptualEntity):
|
|
198
198
|
return type_.load(value)
|
|
199
199
|
elif type_ is NeatError:
|
|
200
200
|
return cls.load(value)
|
|
@@ -37,7 +37,7 @@ def _from_pydantic_error(error: ErrorDetails, read_info_by_sheet: dict[str, Spre
|
|
|
37
37
|
if location:
|
|
38
38
|
return SpreadsheetError.create(location, neat_error, read_info_by_sheet.get(cast(str, location[0])))
|
|
39
39
|
|
|
40
|
-
# errors that occur while for example parsing spreadsheet in
|
|
40
|
+
# errors that occur while for example parsing spreadsheet in imported data model
|
|
41
41
|
# will not have location information so we return neat_error as is
|
|
42
42
|
# this is workaround until more elegant solution is found
|
|
43
43
|
return neat_error
|
|
@@ -33,7 +33,7 @@ from ._resources import (
|
|
|
33
33
|
ResourceRetrievalError,
|
|
34
34
|
)
|
|
35
35
|
from ._wrapper import (
|
|
36
|
-
|
|
36
|
+
ConceptValueError,
|
|
37
37
|
ContainerValueError,
|
|
38
38
|
EnumValueError,
|
|
39
39
|
MetadataValueError,
|
|
@@ -47,7 +47,7 @@ __all__ = [
|
|
|
47
47
|
"AuthorizationError",
|
|
48
48
|
"CDFMissingClientError",
|
|
49
49
|
"CDFMissingResourcesError",
|
|
50
|
-
"
|
|
50
|
+
"ConceptValueError",
|
|
51
51
|
"ContainerValueError",
|
|
52
52
|
"EnumValueError",
|
|
53
53
|
"FileMissingRequiredFieldError",
|
|
@@ -72,7 +72,7 @@ class ResourceNotDefinedError(ResourceError[T_Identifier]):
|
|
|
72
72
|
class ResourceConversionError(ResourceError, ValueError):
|
|
73
73
|
"""Failed to convert the {resource_type} {identifier} to {target_format}: {reason}"""
|
|
74
74
|
|
|
75
|
-
fix = "Check the error message and correct the
|
|
75
|
+
fix = "Check the error message and correct the data model."
|
|
76
76
|
target_format: str
|
|
77
77
|
reason: str
|
|
78
78
|
|
|
@@ -67,8 +67,8 @@ class PropertyValueError(SpreadsheetListError):
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
@dataclass(unsafe_hash=True)
|
|
70
|
-
class
|
|
71
|
-
_name = "
|
|
70
|
+
class ConceptValueError(SpreadsheetListError):
|
|
71
|
+
_name = "Concepts"
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
@dataclass(unsafe_hash=True)
|
|
@@ -93,12 +93,12 @@ class NotSupportedHasDataFilterLimitWarning(CDFNotSupportedWarning):
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
@dataclass(unsafe_hash=True)
|
|
96
|
-
class
|
|
97
|
-
"""Class {
|
|
96
|
+
class UndefinedConceptWarning(UserModelingWarning):
|
|
97
|
+
"""Class {concept_id} has no explicit properties defined neither implements other concepts"""
|
|
98
98
|
|
|
99
|
-
fix = "Define properties for
|
|
99
|
+
fix = "Define properties for concept or inherit properties by implementing another concept."
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
concept_id: str
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
@dataclass(unsafe_hash=True)
|
|
@@ -48,7 +48,7 @@ class PropertyDefinitionDuplicatedWarning(PropertyWarning[T_Identifier]):
|
|
|
48
48
|
@dataclass(unsafe_hash=True)
|
|
49
49
|
class PropertyValueTypeUndefinedWarning(PropertyWarning[T_Identifier]):
|
|
50
50
|
"""The {resource_type} with identifier {identifier} has a property {property_name}
|
|
51
|
-
which has undefined value type. This may result in unexpected behavior when exporting
|
|
51
|
+
which has undefined value type. This may result in unexpected behavior when exporting data model.
|
|
52
52
|
{default_action}"""
|
|
53
53
|
|
|
54
54
|
extra = "Recommended action: {recommended_action}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from .
|
|
1
|
+
from ._data_model import NeatDataModelStore
|
|
2
|
+
from ._instance import NeatInstanceStore
|
|
3
3
|
|
|
4
|
-
__all__ = ["
|
|
4
|
+
__all__ = ["NeatDataModelStore", "NeatInstanceStore"]
|