cognite-neat 0.123.33__py3-none-any.whl → 0.123.34__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/__init__.py +2 -2
- cognite/neat/_data_model/_constants.py +3 -0
- cognite/neat/_data_model/_identifiers.py +61 -0
- cognite/neat/_data_model/models/dms/_space.py +1 -1
- cognite/neat/_data_model/models/entities/__init__.py +46 -0
- cognite/neat/_data_model/models/entities/_base.py +100 -0
- cognite/neat/_data_model/models/entities/_data_types.py +144 -0
- cognite/neat/{data_model → _data_model}/models/entities/_identifiers.py +1 -1
- cognite/neat/_data_model/models/entities/_parser.py +194 -0
- cognite/neat/_version.py +1 -1
- cognite/neat/{core → v0/core}/_client/_api/data_modeling_loaders.py +6 -6
- cognite/neat/{core → v0/core}/_client/_api/neat_instances.py +5 -5
- cognite/neat/{core → v0/core}/_client/_api/schema.py +5 -5
- cognite/neat/{core → v0/core}/_client/_api/statistics.py +3 -3
- cognite/neat/{core → v0/core}/_client/_api_client.py +1 -1
- cognite/neat/{core → v0/core}/_client/data_classes/schema.py +4 -4
- cognite/neat/{core → v0/core}/_client/testing.py +1 -1
- cognite/neat/{core → v0/core}/_constants.py +3 -3
- cognite/neat/{core → v0/core}/_data_model/_shared.py +4 -4
- cognite/neat/{core → v0/core}/_data_model/analysis/_base.py +8 -8
- cognite/neat/{core → v0/core}/_data_model/exporters/_base.py +7 -7
- cognite/neat/{core → v0/core}/_data_model/exporters/_data_model2dms.py +9 -9
- cognite/neat/{core → v0/core}/_data_model/exporters/_data_model2excel.py +9 -9
- cognite/neat/{core → v0/core}/_data_model/exporters/_data_model2instance_template.py +4 -4
- cognite/neat/{core → v0/core}/_data_model/exporters/_data_model2ontology.py +9 -9
- cognite/neat/{core → v0/core}/_data_model/exporters/_data_model2yaml.py +1 -1
- cognite/neat/{core → v0/core}/_data_model/importers/_base.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/importers/_base_file_reader.py +2 -2
- cognite/neat/{core → v0/core}/_data_model/importers/_dict2data_model.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/importers/_dms2data_model.py +12 -12
- cognite/neat/{core → v0/core}/_data_model/importers/_graph2data_model.py +12 -12
- cognite/neat/{core → v0/core}/_data_model/importers/_rdf/_base.py +12 -12
- cognite/neat/{core → v0/core}/_data_model/importers/_rdf/_inference2rdata_model.py +14 -14
- cognite/neat/{core → v0/core}/_data_model/importers/_rdf/_owl2data_model.py +2 -2
- cognite/neat/{core → v0/core}/_data_model/importers/_rdf/_shared.py +7 -7
- cognite/neat/{core → v0/core}/_data_model/importers/_spreadsheet2data_model.py +8 -8
- cognite/neat/{core → v0/core}/_data_model/models/__init__.py +3 -3
- cognite/neat/{core → v0/core}/_data_model/models/_base_verified.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/models/_import_contexts.py +1 -1
- cognite/neat/{core → v0/core}/_data_model/models/_types.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/models/conceptual/_unverified.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/models/conceptual/_validation.py +12 -12
- cognite/neat/{core → v0/core}/_data_model/models/conceptual/_verified.py +9 -9
- cognite/neat/{core → v0/core}/_data_model/models/data_types.py +3 -3
- cognite/neat/{core → v0/core}/_data_model/models/entities/_loaders.py +2 -2
- cognite/neat/{core → v0/core}/_data_model/models/entities/_multi_value.py +2 -2
- cognite/neat/{core → v0/core}/_data_model/models/entities/_restrictions.py +6 -6
- cognite/neat/{core → v0/core}/_data_model/models/entities/_single_value.py +3 -3
- cognite/neat/{core → v0/core}/_data_model/models/mapping/_classic2core.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/models/physical/__init__.py +1 -1
- cognite/neat/{core → v0/core}/_data_model/models/physical/_exporter.py +8 -8
- cognite/neat/{core → v0/core}/_data_model/models/physical/_unverified.py +8 -8
- cognite/neat/{core → v0/core}/_data_model/models/physical/_validation.py +16 -16
- cognite/neat/{core → v0/core}/_data_model/models/physical/_verified.py +10 -10
- cognite/neat/{core → v0/core}/_data_model/transformers/_base.py +4 -4
- cognite/neat/{core → v0/core}/_data_model/transformers/_converters.py +25 -25
- cognite/neat/{core → v0/core}/_data_model/transformers/_mapping.py +7 -7
- cognite/neat/{core → v0/core}/_data_model/transformers/_union_conceptual.py +5 -5
- cognite/neat/{core → v0/core}/_data_model/transformers/_verification.py +7 -7
- cognite/neat/{core → v0/core}/_instances/_tracking/base.py +1 -1
- cognite/neat/{core → v0/core}/_instances/_tracking/log.py +1 -1
- cognite/neat/{core → v0/core}/_instances/extractors/__init__.py +1 -1
- cognite/neat/{core → v0/core}/_instances/extractors/_base.py +6 -6
- cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_base.py +7 -7
- cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_classic.py +12 -12
- cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_relationships.py +3 -3
- cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_sequences.py +2 -2
- cognite/neat/{core → v0/core}/_instances/extractors/_dict.py +2 -2
- cognite/neat/{core → v0/core}/_instances/extractors/_dms.py +6 -6
- cognite/neat/{core → v0/core}/_instances/extractors/_dms_graph.py +11 -11
- cognite/neat/{core → v0/core}/_instances/extractors/_mock_graph_generator.py +10 -10
- cognite/neat/{core → v0/core}/_instances/extractors/_raw.py +3 -3
- cognite/neat/{core → v0/core}/_instances/extractors/_rdf_file.py +7 -7
- cognite/neat/{core → v0/core}/_instances/loaders/_base.py +5 -5
- cognite/neat/{core → v0/core}/_instances/loaders/_rdf2dms.py +17 -17
- cognite/neat/{core → v0/core}/_instances/loaders/_rdf_to_instance_space.py +11 -11
- cognite/neat/{core → v0/core}/_instances/queries/_select.py +3 -3
- cognite/neat/{core → v0/core}/_instances/queries/_update.py +1 -1
- cognite/neat/{core → v0/core}/_instances/transformers/_base.py +4 -4
- cognite/neat/{core → v0/core}/_instances/transformers/_classic_cdf.py +6 -6
- cognite/neat/{core → v0/core}/_instances/transformers/_prune_graph.py +4 -4
- cognite/neat/{core → v0/core}/_instances/transformers/_rdfpath.py +1 -1
- cognite/neat/{core → v0/core}/_instances/transformers/_value_type.py +4 -4
- cognite/neat/{core → v0/core}/_issues/_base.py +5 -5
- cognite/neat/{core → v0/core}/_issues/_contextmanagers.py +1 -1
- cognite/neat/{core → v0/core}/_issues/_factory.py +3 -3
- cognite/neat/{core → v0/core}/_issues/errors/__init__.py +1 -1
- cognite/neat/{core → v0/core}/_issues/errors/_external.py +1 -1
- cognite/neat/{core → v0/core}/_issues/errors/_general.py +1 -1
- cognite/neat/{core → v0/core}/_issues/errors/_properties.py +1 -1
- cognite/neat/{core → v0/core}/_issues/errors/_resources.py +2 -2
- cognite/neat/{core → v0/core}/_issues/errors/_wrapper.py +2 -2
- cognite/neat/{core → v0/core}/_issues/warnings/__init__.py +1 -1
- cognite/neat/{core → v0/core}/_issues/warnings/_external.py +1 -1
- cognite/neat/{core → v0/core}/_issues/warnings/_general.py +1 -1
- cognite/neat/{core → v0/core}/_issues/warnings/_models.py +2 -2
- cognite/neat/{core → v0/core}/_issues/warnings/_properties.py +2 -2
- cognite/neat/{core → v0/core}/_issues/warnings/_resources.py +1 -1
- cognite/neat/{core → v0/core}/_issues/warnings/user_modeling.py +1 -1
- cognite/neat/{core → v0/core}/_store/_data_model.py +12 -12
- cognite/neat/{core → v0/core}/_store/_instance.py +10 -10
- cognite/neat/{core → v0/core}/_store/_provenance.py +3 -3
- cognite/neat/{core → v0/core}/_store/exceptions.py +4 -4
- cognite/neat/{core → v0/core}/_utils/auth.py +1 -1
- cognite/neat/{core → v0/core}/_utils/auxiliary.py +1 -1
- cognite/neat/{core → v0/core}/_utils/collection_.py +2 -2
- cognite/neat/{core → v0/core}/_utils/graph_transformations_report.py +1 -1
- cognite/neat/{core → v0/core}/_utils/rdf_.py +1 -1
- cognite/neat/{core → v0/core}/_utils/reader/_base.py +1 -1
- cognite/neat/{core → v0/core}/_utils/spreadsheet.py +1 -1
- cognite/neat/{core → v0/core}/_utils/text.py +1 -1
- cognite/neat/{core → v0/core}/_utils/upload.py +3 -3
- cognite/neat/{plugins → v0/plugins}/_issues.py +1 -1
- cognite/neat/{plugins → v0/plugins}/_manager.py +2 -2
- cognite/neat/{plugins → v0/plugins}/data_model/importers/_base.py +1 -1
- cognite/neat/{session → v0/session}/_base.py +10 -10
- cognite/neat/{session → v0/session}/_collector.py +1 -1
- cognite/neat/{session → v0/session}/_drop.py +3 -3
- cognite/neat/{session → v0/session}/_explore.py +2 -2
- cognite/neat/{session → v0/session}/_fix.py +2 -2
- cognite/neat/{session → v0/session}/_inspect.py +3 -3
- cognite/neat/{session → v0/session}/_mapping.py +3 -3
- cognite/neat/{session → v0/session}/_plugin.py +5 -5
- cognite/neat/{session → v0/session}/_prepare.py +8 -8
- cognite/neat/{session → v0/session}/_read.py +17 -17
- cognite/neat/{session → v0/session}/_set.py +8 -8
- cognite/neat/{session → v0/session}/_show.py +5 -5
- cognite/neat/{session → v0/session}/_state.py +10 -10
- cognite/neat/{session → v0/session}/_subset.py +4 -4
- cognite/neat/{session → v0/session}/_template.py +11 -11
- cognite/neat/{session → v0/session}/_to.py +12 -12
- cognite/neat/{session → v0/session}/_wizard.py +1 -1
- cognite/neat/{session → v0/session}/engine/_load.py +1 -1
- cognite/neat/{session → v0/session}/exceptions.py +5 -5
- {cognite_neat-0.123.33.dist-info → cognite_neat-0.123.34.dist-info}/METADATA +1 -1
- cognite_neat-0.123.34.dist-info/RECORD +219 -0
- cognite/neat/data_model/models/entities/__init__.py +0 -9
- cognite_neat-0.123.33.dist-info/RECORD +0 -215
- /cognite/neat/{data_model → _data_model}/models/entities/_constants.py +0 -0
- /cognite/neat/{core → v0}/__init__.py +0 -0
- /cognite/neat/{core/_client/_api → v0/core}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_client/__init__.py +0 -0
- /cognite/neat/{core/_client/data_classes → v0/core/_client/_api}/__init__.py +0 -0
- /cognite/neat/{core/_data_model → v0/core/_client/data_classes}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_client/data_classes/data_modeling.py +0 -0
- /cognite/neat/{core → v0/core}/_client/data_classes/neat_sequence.py +0 -0
- /cognite/neat/{core → v0/core}/_client/data_classes/statistics.py +0 -0
- /cognite/neat/{core → v0/core}/_config.py +0 -0
- /cognite/neat/{core/_instances → v0/core/_data_model}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/_constants.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/analysis/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/catalog/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/catalog/classic_model.xlsx +0 -0
- /cognite/neat/{core → v0/core}/_data_model/catalog/conceptual-imf-data-model.xlsx +0 -0
- /cognite/neat/{core → v0/core}/_data_model/catalog/hello_world_pump.xlsx +0 -0
- /cognite/neat/{core → v0/core}/_data_model/exporters/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/importers/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/importers/_rdf/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/_base_unverified.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/conceptual/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/entities/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/entities/_constants.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/entities/_types.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/entities/_wrapped.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/mapping/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_data_model/models/mapping/_classic2core.yaml +0 -0
- /cognite/neat/{core → v0/core}/_data_model/transformers/__init__.py +0 -0
- /cognite/neat/{core/_instances/extractors/_classic_cdf → v0/core/_instances}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/_shared.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/_tracking/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- /cognite/neat/{core → v0/core}/_instances/examples/Knowledge-Graph-Nordic44.xml +0 -0
- /cognite/neat/{core → v0/core}/_instances/examples/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- /cognite/neat/{core/_utils → v0/core/_instances/extractors/_classic_cdf}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_assets.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_data_sets.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_events.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_files.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_labels.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/extractors/_classic_cdf/_timeseries.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/loaders/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/queries/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/queries/_base.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/queries/_queries.py +0 -0
- /cognite/neat/{core → v0/core}/_instances/transformers/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_issues/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_issues/formatters.py +0 -0
- /cognite/neat/{core → v0/core}/_shared.py +0 -0
- /cognite/neat/{core → v0/core}/_store/__init__.py +0 -0
- /cognite/neat/{data_model → v0/core/_utils}/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_utils/io_.py +0 -0
- /cognite/neat/{core → v0/core}/_utils/reader/__init__.py +0 -0
- /cognite/neat/{core → v0/core}/_utils/tarjan.py +0 -0
- /cognite/neat/{core → v0/core}/_utils/time_.py +0 -0
- /cognite/neat/{core → v0/core}/_utils/xml_.py +0 -0
- /cognite/neat/{plugins → v0/plugins}/__init__.py +0 -0
- /cognite/neat/{plugins → v0/plugins}/data_model/__init__.py +0 -0
- /cognite/neat/{plugins → v0/plugins}/data_model/importers/__init__.py +0 -0
- /cognite/neat/{session → v0/session}/__init__.py +0 -0
- /cognite/neat/{session → v0/session}/_experimental.py +0 -0
- /cognite/neat/{session → v0/session}/_state/README.md +0 -0
- /cognite/neat/{session → v0/session}/engine/__init__.py +0 -0
- /cognite/neat/{session → v0/session}/engine/_import.py +0 -0
- /cognite/neat/{session → v0/session}/engine/_interface.py +0 -0
- {cognite_neat-0.123.33.dist-info → cognite_neat-0.123.34.dist-info}/WHEEL +0 -0
- {cognite_neat-0.123.33.dist-info → cognite_neat-0.123.34.dist-info}/licenses/LICENSE +0 -0
|
@@ -20,21 +20,21 @@ from cognite.client.data_classes.data_modeling.views import (
|
|
|
20
20
|
ViewPropertyApply,
|
|
21
21
|
)
|
|
22
22
|
|
|
23
|
-
from cognite.neat.core._client.data_classes.data_modeling import (
|
|
23
|
+
from cognite.neat.v0.core._client.data_classes.data_modeling import (
|
|
24
24
|
CogniteResourceDict,
|
|
25
25
|
ContainerApplyDict,
|
|
26
26
|
NodeApplyDict,
|
|
27
27
|
SpaceApplyDict,
|
|
28
28
|
ViewApplyDict,
|
|
29
29
|
)
|
|
30
|
-
from cognite.neat.core._issues.errors import (
|
|
30
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
31
31
|
NeatYamlError,
|
|
32
32
|
)
|
|
33
|
-
from cognite.neat.core._issues.warnings import (
|
|
33
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
34
34
|
FileTypeUnexpectedWarning,
|
|
35
35
|
ResourcesDuplicatedWarning,
|
|
36
36
|
)
|
|
37
|
-
from cognite.neat.core._utils.text import to_camel_case
|
|
37
|
+
from cognite.neat.v0.core._utils.text import to_camel_case
|
|
38
38
|
|
|
39
39
|
if sys.version_info >= (3, 11):
|
|
40
40
|
from typing import Self
|
|
@@ -5,7 +5,7 @@ from unittest.mock import MagicMock
|
|
|
5
5
|
|
|
6
6
|
from cognite.client.testing import CogniteClientMock
|
|
7
7
|
|
|
8
|
-
from cognite.neat.core._client._api_client import NeatClient
|
|
8
|
+
from cognite.neat.v0.core._client._api_client import NeatClient
|
|
9
9
|
|
|
10
10
|
from ._api.data_modeling_loaders import DataModelLoaderAPI
|
|
11
11
|
from ._api.neat_instances import NeatInstancesAPI
|
|
@@ -11,7 +11,7 @@ from rdflib.namespace import DefinedNamespace
|
|
|
11
11
|
from cognite import neat
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
|
-
from cognite.neat.core._data_model.models.physical import PhysicalProperty
|
|
14
|
+
from cognite.neat.v0.core._data_model.models.physical import PhysicalProperty
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def _is_in_notebook() -> bool:
|
|
@@ -204,7 +204,7 @@ BASE_MODEL = Literal["CogniteCore"]
|
|
|
204
204
|
|
|
205
205
|
def get_asset_read_only_properties_with_connection() -> "list[PhysicalProperty]":
|
|
206
206
|
"""Gets the asset read-only properties with connection, i.e. Root and Path."""
|
|
207
|
-
from cognite.neat.core._data_model.models.physical import PhysicalProperty
|
|
207
|
+
from cognite.neat.v0.core._data_model.models.physical import PhysicalProperty
|
|
208
208
|
|
|
209
209
|
return [PhysicalProperty.model_validate(item) for item in (_ASSET_ROOT_PROPERTY, _ASSET_PATH_PROPERTY)]
|
|
210
210
|
|
|
@@ -219,7 +219,7 @@ def get_base_concepts(
|
|
|
219
219
|
total_concepts: The number of concepts to get. If None, all concepts are returned.
|
|
220
220
|
"""
|
|
221
221
|
# Local import to avoid circular dependency issues
|
|
222
|
-
from cognite.neat.core._issues.errors._general import NeatValueError
|
|
222
|
+
from cognite.neat.v0.core._issues.errors._general import NeatValueError
|
|
223
223
|
|
|
224
224
|
if base_model == "CogniteCore":
|
|
225
225
|
return [f"cdf_cdm:{concept}(version=v1)" for concept in COGNITE_CONCEPTS][:total_concepts]
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from typing import Generic, TypeAlias, TypeVar
|
|
3
3
|
|
|
4
|
-
from cognite.neat.core._data_model.models import (
|
|
4
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
5
5
|
ConceptualDataModel,
|
|
6
6
|
PhysicalDataModel,
|
|
7
7
|
)
|
|
8
|
-
from cognite.neat.core._data_model.models._import_contexts import ImportContext
|
|
9
|
-
from cognite.neat.core._data_model.models.conceptual._unverified import (
|
|
8
|
+
from cognite.neat.v0.core._data_model.models._import_contexts import ImportContext
|
|
9
|
+
from cognite.neat.v0.core._data_model.models.conceptual._unverified import (
|
|
10
10
|
UnverifiedConceptualDataModel,
|
|
11
11
|
)
|
|
12
|
-
from cognite.neat.core._data_model.models.physical._unverified import (
|
|
12
|
+
from cognite.neat.v0.core._data_model.models.physical._unverified import (
|
|
13
13
|
UnverifiedPhysicalDataModel,
|
|
14
14
|
)
|
|
15
15
|
|
|
@@ -11,23 +11,23 @@ import pandas as pd
|
|
|
11
11
|
from cognite.client import data_modeling as dm
|
|
12
12
|
from rdflib import URIRef
|
|
13
13
|
|
|
14
|
-
from cognite.neat.core._data_model.models import ConceptualDataModel, PhysicalDataModel
|
|
15
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
14
|
+
from cognite.neat.v0.core._data_model.models import ConceptualDataModel, PhysicalDataModel
|
|
15
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
16
16
|
Concept,
|
|
17
17
|
ConceptualProperty,
|
|
18
18
|
)
|
|
19
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
19
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
20
20
|
ConceptEntity,
|
|
21
21
|
MultiValueTypeInfo,
|
|
22
22
|
ViewEntity,
|
|
23
23
|
)
|
|
24
|
-
from cognite.neat.core._data_model.models.entities._single_value import (
|
|
24
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import (
|
|
25
25
|
UnknownEntity,
|
|
26
26
|
)
|
|
27
|
-
from cognite.neat.core._data_model.models.physical import PhysicalProperty
|
|
28
|
-
from cognite.neat.core._data_model.models.physical._verified import PhysicalView
|
|
29
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
30
|
-
from cognite.neat.core._issues.warnings import NeatValueWarning
|
|
27
|
+
from cognite.neat.v0.core._data_model.models.physical import PhysicalProperty
|
|
28
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import PhysicalView
|
|
29
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
30
|
+
from cognite.neat.v0.core._issues.warnings import NeatValueWarning
|
|
31
31
|
|
|
32
32
|
T_Hashable = TypeVar("T_Hashable", bound=Hashable)
|
|
33
33
|
|
|
@@ -5,14 +5,14 @@ from pathlib import Path
|
|
|
5
5
|
from types import UnionType
|
|
6
6
|
from typing import TYPE_CHECKING, Generic, TypeVar, Union, get_args, get_origin
|
|
7
7
|
|
|
8
|
-
from cognite.neat.core._client import NeatClient
|
|
9
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE
|
|
10
|
-
from cognite.neat.core._data_model._shared import T_VerifiedDataModel
|
|
11
|
-
from cognite.neat.core._utils.auxiliary import class_html_doc
|
|
12
|
-
from cognite.neat.core._utils.upload import UploadResult, UploadResultList
|
|
8
|
+
from cognite.neat.v0.core._client import NeatClient
|
|
9
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE
|
|
10
|
+
from cognite.neat.v0.core._data_model._shared import T_VerifiedDataModel
|
|
11
|
+
from cognite.neat.v0.core._utils.auxiliary import class_html_doc
|
|
12
|
+
from cognite.neat.v0.core._utils.upload import UploadResult, UploadResultList
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
15
|
-
from cognite.neat.core._store._provenance import Agent as ProvenanceAgent
|
|
15
|
+
from cognite.neat.v0.core._store._provenance import Agent as ProvenanceAgent
|
|
16
16
|
|
|
17
17
|
T_Export = TypeVar("T_Export")
|
|
18
18
|
|
|
@@ -36,7 +36,7 @@ class BaseExporter(ABC, Generic[T_VerifiedDataModel, T_Export]):
|
|
|
36
36
|
@property
|
|
37
37
|
def agent(self) -> "ProvenanceAgent":
|
|
38
38
|
"""Provenance agent for the importer."""
|
|
39
|
-
from cognite.neat.core._store._provenance import Agent as ProvenanceAgent
|
|
39
|
+
from cognite.neat.v0.core._store._provenance import Agent as ProvenanceAgent
|
|
40
40
|
|
|
41
41
|
return ProvenanceAgent(id_=DEFAULT_NAMESPACE[f"agent/{type(self).__name__}"])
|
|
42
42
|
|
|
@@ -18,24 +18,24 @@ from cognite.client.data_classes.data_modeling import (
|
|
|
18
18
|
)
|
|
19
19
|
from cognite.client.exceptions import CogniteAPIError
|
|
20
20
|
|
|
21
|
-
from cognite.neat.core._client import DataModelingLoader, NeatClient
|
|
22
|
-
from cognite.neat.core._client._api.data_modeling_loaders import (
|
|
21
|
+
from cognite.neat.v0.core._client import DataModelingLoader, NeatClient
|
|
22
|
+
from cognite.neat.v0.core._client._api.data_modeling_loaders import (
|
|
23
23
|
MultiCogniteAPIError,
|
|
24
24
|
T_WritableCogniteResourceList,
|
|
25
25
|
)
|
|
26
|
-
from cognite.neat.core._client.data_classes.data_modeling import (
|
|
26
|
+
from cognite.neat.v0.core._client.data_classes.data_modeling import (
|
|
27
27
|
Component,
|
|
28
28
|
ViewApplyDict,
|
|
29
29
|
)
|
|
30
|
-
from cognite.neat.core._client.data_classes.schema import DMSSchema
|
|
31
|
-
from cognite.neat.core._data_model.models.physical import PhysicalDataModel
|
|
32
|
-
from cognite.neat.core._issues import IssueList
|
|
33
|
-
from cognite.neat.core._issues.warnings import (
|
|
30
|
+
from cognite.neat.v0.core._client.data_classes.schema import DMSSchema
|
|
31
|
+
from cognite.neat.v0.core._data_model.models.physical import PhysicalDataModel
|
|
32
|
+
from cognite.neat.v0.core._issues import IssueList
|
|
33
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
34
34
|
PrincipleOneModelOneSpaceWarning,
|
|
35
35
|
ResourceRetrievalWarning,
|
|
36
36
|
)
|
|
37
|
-
from cognite.neat.core._shared import T_ID
|
|
38
|
-
from cognite.neat.core._utils.upload import UploadResult
|
|
37
|
+
from cognite.neat.v0.core._shared import T_ID
|
|
38
|
+
from cognite.neat.v0.core._utils.upload import UploadResult
|
|
39
39
|
|
|
40
40
|
from ._base import CDFExporter
|
|
41
41
|
|
|
@@ -14,24 +14,24 @@ from openpyxl.worksheet.datavalidation import DataValidation
|
|
|
14
14
|
from openpyxl.worksheet.worksheet import Worksheet
|
|
15
15
|
from rdflib import Namespace
|
|
16
16
|
|
|
17
|
-
from cognite.neat.core._constants import BASE_MODEL, get_base_concepts
|
|
18
|
-
from cognite.neat.core._data_model._constants import get_internal_properties
|
|
19
|
-
from cognite.neat.core._data_model._shared import VerifiedDataModel
|
|
20
|
-
from cognite.neat.core._data_model.models import (
|
|
17
|
+
from cognite.neat.v0.core._constants import BASE_MODEL, get_base_concepts
|
|
18
|
+
from cognite.neat.v0.core._data_model._constants import get_internal_properties
|
|
19
|
+
from cognite.neat.v0.core._data_model._shared import VerifiedDataModel
|
|
20
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
21
21
|
SheetRow,
|
|
22
22
|
)
|
|
23
|
-
from cognite.neat.core._data_model.models._base_verified import (
|
|
23
|
+
from cognite.neat.v0.core._data_model.models._base_verified import (
|
|
24
24
|
BaseVerifiedMetadata,
|
|
25
25
|
RoleTypes,
|
|
26
26
|
)
|
|
27
|
-
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
27
|
+
from cognite.neat.v0.core._data_model.models.conceptual._verified import (
|
|
28
28
|
ConceptualDataModel,
|
|
29
29
|
)
|
|
30
|
-
from cognite.neat.core._data_model.models.data_types import (
|
|
30
|
+
from cognite.neat.v0.core._data_model.models.data_types import (
|
|
31
31
|
_DATA_TYPE_BY_DMS_TYPE,
|
|
32
32
|
)
|
|
33
|
-
from cognite.neat.core._data_model.models.physical._verified import PhysicalDataModel
|
|
34
|
-
from cognite.neat.core._utils.spreadsheet import (
|
|
33
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import PhysicalDataModel
|
|
34
|
+
from cognite.neat.v0.core._utils.spreadsheet import (
|
|
35
35
|
find_column_with_value,
|
|
36
36
|
generate_data_validation,
|
|
37
37
|
)
|
|
@@ -8,12 +8,12 @@ from openpyxl.styles import Alignment, Border, Font, NamedStyle, PatternFill, Si
|
|
|
8
8
|
from openpyxl.utils import get_column_letter
|
|
9
9
|
from openpyxl.worksheet.datavalidation import DataValidation
|
|
10
10
|
|
|
11
|
-
from cognite.neat.core._data_model._constants import EntityTypes
|
|
12
|
-
from cognite.neat.core._data_model.analysis import DataModelAnalysis
|
|
13
|
-
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
11
|
+
from cognite.neat.v0.core._data_model._constants import EntityTypes
|
|
12
|
+
from cognite.neat.v0.core._data_model.analysis import DataModelAnalysis
|
|
13
|
+
from cognite.neat.v0.core._data_model.models.conceptual._verified import (
|
|
14
14
|
ConceptualDataModel,
|
|
15
15
|
)
|
|
16
|
-
from cognite.neat.core._data_model.models.entities._single_value import ConceptEntity
|
|
16
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import ConceptEntity
|
|
17
17
|
|
|
18
18
|
from ._base import BaseExporter
|
|
19
19
|
|
|
@@ -8,22 +8,22 @@ from pydantic import BaseModel, ConfigDict, ValidationInfo, field_validator
|
|
|
8
8
|
from rdflib import DCTERMS, OWL, RDF, RDFS, XSD, BNode, Graph, Literal, Namespace, URIRef
|
|
9
9
|
from rdflib.collection import Collection as GraphCollection
|
|
10
10
|
|
|
11
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE as NEAT_NAMESPACE
|
|
12
|
-
from cognite.neat.core._data_model._constants import EntityTypes
|
|
13
|
-
from cognite.neat.core._data_model.analysis import DataModelAnalysis
|
|
14
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
11
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE as NEAT_NAMESPACE
|
|
12
|
+
from cognite.neat.v0.core._data_model._constants import EntityTypes
|
|
13
|
+
from cognite.neat.v0.core._data_model.analysis import DataModelAnalysis
|
|
14
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
15
15
|
Concept,
|
|
16
16
|
ConceptualDataModel,
|
|
17
17
|
ConceptualMetadata,
|
|
18
18
|
ConceptualProperty,
|
|
19
19
|
)
|
|
20
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
21
|
-
from cognite.neat.core._data_model.models.entities import ConceptEntity
|
|
22
|
-
from cognite.neat.core._issues.errors import (
|
|
20
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
21
|
+
from cognite.neat.v0.core._data_model.models.entities import ConceptEntity
|
|
22
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
23
23
|
PropertyDefinitionDuplicatedError,
|
|
24
24
|
)
|
|
25
|
-
from cognite.neat.core._issues.warnings import PropertyDefinitionDuplicatedWarning
|
|
26
|
-
from cognite.neat.core._utils.rdf_ import remove_namespace_from_uri
|
|
25
|
+
from cognite.neat.v0.core._issues.warnings import PropertyDefinitionDuplicatedWarning
|
|
26
|
+
from cognite.neat.v0.core._utils.rdf_ import remove_namespace_from_uri
|
|
27
27
|
|
|
28
28
|
from ._base import BaseExporter
|
|
29
29
|
|
|
@@ -5,15 +5,15 @@ from typing import TYPE_CHECKING, Any, Generic
|
|
|
5
5
|
|
|
6
6
|
from rdflib import URIRef
|
|
7
7
|
|
|
8
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE
|
|
9
|
-
from cognite.neat.core._data_model._shared import (
|
|
8
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE
|
|
9
|
+
from cognite.neat.v0.core._data_model._shared import (
|
|
10
10
|
ImportedDataModel,
|
|
11
11
|
T_UnverifiedDataModel,
|
|
12
12
|
)
|
|
13
|
-
from cognite.neat.core._utils.auxiliary import class_html_doc
|
|
13
|
+
from cognite.neat.v0.core._utils.auxiliary import class_html_doc
|
|
14
14
|
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
|
-
from cognite.neat.core._store._provenance import Agent as ProvenanceAgent
|
|
16
|
+
from cognite.neat.v0.core._store._provenance import Agent as ProvenanceAgent
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class BaseImporter(ABC, Generic[T_UnverifiedDataModel]):
|
|
@@ -51,7 +51,7 @@ class BaseImporter(ABC, Generic[T_UnverifiedDataModel]):
|
|
|
51
51
|
@property
|
|
52
52
|
def agent(self) -> "ProvenanceAgent":
|
|
53
53
|
"""Provenance agent for the importer."""
|
|
54
|
-
from cognite.neat.core._store._provenance import Agent as ProvenanceAgent
|
|
54
|
+
from cognite.neat.v0.core._store._provenance import Agent as ProvenanceAgent
|
|
55
55
|
|
|
56
56
|
return ProvenanceAgent(id_=DEFAULT_NAMESPACE[f"agent/{type(self).__name__}"])
|
|
57
57
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from typing import Protocol, TypeVar
|
|
3
3
|
|
|
4
|
-
from cognite.neat.core._issues import NeatIssue
|
|
5
|
-
from cognite.neat.core._issues.errors import (
|
|
4
|
+
from cognite.neat.v0.core._issues import NeatIssue
|
|
5
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
6
6
|
FileNotAFileError,
|
|
7
7
|
FileNotFoundNeatError,
|
|
8
8
|
FileTypeUnexpectedError,
|
|
@@ -3,20 +3,20 @@ from typing import Any, cast
|
|
|
3
3
|
|
|
4
4
|
import yaml
|
|
5
5
|
|
|
6
|
-
from cognite.neat.core._data_model._shared import (
|
|
6
|
+
from cognite.neat.v0.core._data_model._shared import (
|
|
7
7
|
ImportedDataModel,
|
|
8
8
|
T_UnverifiedDataModel,
|
|
9
9
|
)
|
|
10
|
-
from cognite.neat.core._data_model.models import (
|
|
10
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
11
11
|
UNVERIFIED_DATA_MODEL_BY_ROLE,
|
|
12
12
|
RoleTypes,
|
|
13
13
|
)
|
|
14
|
-
from cognite.neat.core._issues import IssueList, MultiValueError, NeatIssue
|
|
15
|
-
from cognite.neat.core._issues.errors import (
|
|
14
|
+
from cognite.neat.v0.core._issues import IssueList, MultiValueError, NeatIssue
|
|
15
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
16
16
|
FileMissingRequiredFieldError,
|
|
17
17
|
FileReadError,
|
|
18
18
|
)
|
|
19
|
-
from cognite.neat.core._issues.warnings import NeatValueWarning
|
|
19
|
+
from cognite.neat.v0.core._issues.warnings import NeatValueWarning
|
|
20
20
|
|
|
21
21
|
from ._base import BaseImporter
|
|
22
22
|
from ._base_file_reader import BaseFileReader
|
|
@@ -28,23 +28,23 @@ from cognite.client.data_classes.data_modeling.views import (
|
|
|
28
28
|
)
|
|
29
29
|
from cognite.client.utils import ms_to_datetime
|
|
30
30
|
|
|
31
|
-
from cognite.neat.core._client import NeatClient
|
|
32
|
-
from cognite.neat.core._constants import (
|
|
31
|
+
from cognite.neat.v0.core._client import NeatClient
|
|
32
|
+
from cognite.neat.v0.core._constants import (
|
|
33
33
|
DMS_DIRECT_RELATION_LIST_DEFAULT_LIMIT,
|
|
34
34
|
DMS_PRIMITIVE_LIST_DEFAULT_LIMIT,
|
|
35
35
|
)
|
|
36
|
-
from cognite.neat.core._data_model._shared import ImportedDataModel
|
|
37
|
-
from cognite.neat.core._data_model.importers._base import BaseImporter
|
|
38
|
-
from cognite.neat.core._data_model.models import (
|
|
36
|
+
from cognite.neat.v0.core._data_model._shared import ImportedDataModel
|
|
37
|
+
from cognite.neat.v0.core._data_model.importers._base import BaseImporter
|
|
38
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
39
39
|
DMSSchema,
|
|
40
40
|
UnverifiedPhysicalDataModel,
|
|
41
41
|
)
|
|
42
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
42
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
43
43
|
UnverifiedConcept,
|
|
44
44
|
UnverifiedConceptualProperty,
|
|
45
45
|
)
|
|
46
|
-
from cognite.neat.core._data_model.models.data_types import DataType, Enum, String
|
|
47
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
46
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType, Enum, String
|
|
47
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
48
48
|
ConceptEntity,
|
|
49
49
|
ContainerEntity,
|
|
50
50
|
ContainerIndexEntity,
|
|
@@ -54,7 +54,7 @@ from cognite.neat.core._data_model.models.entities import (
|
|
|
54
54
|
ReverseConnectionEntity,
|
|
55
55
|
ViewEntity,
|
|
56
56
|
)
|
|
57
|
-
from cognite.neat.core._data_model.models.physical import (
|
|
57
|
+
from cognite.neat.v0.core._data_model.models.physical import (
|
|
58
58
|
UnverifiedPhysicalContainer,
|
|
59
59
|
UnverifiedPhysicalEnum,
|
|
60
60
|
UnverifiedPhysicalMetadata,
|
|
@@ -62,13 +62,13 @@ from cognite.neat.core._data_model.models.physical import (
|
|
|
62
62
|
UnverifiedPhysicalProperty,
|
|
63
63
|
UnverifiedPhysicalView,
|
|
64
64
|
)
|
|
65
|
-
from cognite.neat.core._issues import (
|
|
65
|
+
from cognite.neat.v0.core._issues import (
|
|
66
66
|
IssueList,
|
|
67
67
|
MultiValueError,
|
|
68
68
|
NeatIssue,
|
|
69
69
|
catch_issues,
|
|
70
70
|
)
|
|
71
|
-
from cognite.neat.core._issues.errors import (
|
|
71
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
72
72
|
FileNotFoundNeatError,
|
|
73
73
|
FileTypeUnexpectedError,
|
|
74
74
|
NeatValueError,
|
|
@@ -76,7 +76,7 @@ from cognite.neat.core._issues.errors import (
|
|
|
76
76
|
ResourceMissingIdentifierError,
|
|
77
77
|
ResourceRetrievalError,
|
|
78
78
|
)
|
|
79
|
-
from cognite.neat.core._issues.warnings import (
|
|
79
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
80
80
|
MissingCogniteClientWarning,
|
|
81
81
|
NeatValueWarning,
|
|
82
82
|
PropertyNotFoundWarning,
|
|
@@ -12,22 +12,22 @@ from rdflib import RDF, RDFS, Namespace, URIRef
|
|
|
12
12
|
from rdflib import Literal as RdfLiteral
|
|
13
13
|
from rdflib.query import ResultRow
|
|
14
14
|
|
|
15
|
-
from cognite.neat.core._config import GLOBAL_CONFIG
|
|
16
|
-
from cognite.neat.core._constants import NEAT
|
|
17
|
-
from cognite.neat.core._data_model._shared import ImportedDataModel
|
|
18
|
-
from cognite.neat.core._data_model.models import UnverifiedConceptualDataModel
|
|
19
|
-
from cognite.neat.core._data_model.models._import_contexts import GraphContext
|
|
20
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
15
|
+
from cognite.neat.v0.core._config import GLOBAL_CONFIG
|
|
16
|
+
from cognite.neat.v0.core._constants import NEAT
|
|
17
|
+
from cognite.neat.v0.core._data_model._shared import ImportedDataModel
|
|
18
|
+
from cognite.neat.v0.core._data_model.models import UnverifiedConceptualDataModel
|
|
19
|
+
from cognite.neat.v0.core._data_model.models._import_contexts import GraphContext
|
|
20
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
21
21
|
UnverifiedConcept,
|
|
22
22
|
UnverifiedConceptualMetadata,
|
|
23
23
|
UnverifiedConceptualProperty,
|
|
24
24
|
)
|
|
25
|
-
from cognite.neat.core._data_model.models.entities import UnknownEntity
|
|
26
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
27
|
-
from cognite.neat.core._issues.warnings import NeatValueWarning
|
|
28
|
-
from cognite.neat.core._store import NeatInstanceStore
|
|
29
|
-
from cognite.neat.core._utils.collection_ import iterate_progress_bar
|
|
30
|
-
from cognite.neat.core._utils.rdf_ import split_uri
|
|
25
|
+
from cognite.neat.v0.core._data_model.models.entities import UnknownEntity
|
|
26
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
27
|
+
from cognite.neat.v0.core._issues.warnings import NeatValueWarning
|
|
28
|
+
from cognite.neat.v0.core._store import NeatInstanceStore
|
|
29
|
+
from cognite.neat.v0.core._utils.collection_ import iterate_progress_bar
|
|
30
|
+
from cognite.neat.v0.core._utils.rdf_ import split_uri
|
|
31
31
|
|
|
32
32
|
from ._base import BaseImporter
|
|
33
33
|
|
|
@@ -6,20 +6,20 @@ from cognite.client import data_modeling as dm
|
|
|
6
6
|
from rdflib import Graph, Namespace, URIRef
|
|
7
7
|
from typing_extensions import Self
|
|
8
8
|
|
|
9
|
-
from cognite.neat.core._constants import get_default_prefixes_and_namespaces
|
|
10
|
-
from cognite.neat.core._data_model._shared import ImportedDataModel
|
|
11
|
-
from cognite.neat.core._data_model.importers._base import BaseImporter
|
|
12
|
-
from cognite.neat.core._data_model.models._base_verified import RoleTypes
|
|
13
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
9
|
+
from cognite.neat.v0.core._constants import get_default_prefixes_and_namespaces
|
|
10
|
+
from cognite.neat.v0.core._data_model._shared import ImportedDataModel
|
|
11
|
+
from cognite.neat.v0.core._data_model.importers._base import BaseImporter
|
|
12
|
+
from cognite.neat.v0.core._data_model.models._base_verified import RoleTypes
|
|
13
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
14
14
|
UnverifiedConceptualDataModel,
|
|
15
15
|
)
|
|
16
|
-
from cognite.neat.core._data_model.models.data_types import AnyURI
|
|
17
|
-
from cognite.neat.core._data_model.models.entities import UnknownEntity
|
|
18
|
-
from cognite.neat.core._issues import IssueList, MultiValueError
|
|
19
|
-
from cognite.neat.core._issues.errors import FileReadError
|
|
20
|
-
from cognite.neat.core._issues.errors._general import NeatValueError
|
|
21
|
-
from cognite.neat.core._store import NeatInstanceStore
|
|
22
|
-
from cognite.neat.core._utils.rdf_ import get_namespace
|
|
16
|
+
from cognite.neat.v0.core._data_model.models.data_types import AnyURI
|
|
17
|
+
from cognite.neat.v0.core._data_model.models.entities import UnknownEntity
|
|
18
|
+
from cognite.neat.v0.core._issues import IssueList, MultiValueError
|
|
19
|
+
from cognite.neat.v0.core._issues.errors import FileReadError
|
|
20
|
+
from cognite.neat.v0.core._issues.errors._general import NeatValueError
|
|
21
|
+
from cognite.neat.v0.core._store import NeatInstanceStore
|
|
22
|
+
from cognite.neat.v0.core._utils.rdf_ import get_namespace
|
|
23
23
|
|
|
24
24
|
DEFAULT_NON_EXISTING_NODE_TYPE = AnyURI()
|
|
25
25
|
|
|
@@ -10,25 +10,25 @@ from cognite.client import data_modeling as dm
|
|
|
10
10
|
from rdflib import RDF, RDFS, Graph, Namespace, URIRef
|
|
11
11
|
from rdflib import Literal as RdfLiteral
|
|
12
12
|
|
|
13
|
-
from cognite.neat.core._config import GLOBAL_CONFIG
|
|
14
|
-
from cognite.neat.core._constants import NEAT, get_default_prefixes_and_namespaces
|
|
15
|
-
from cognite.neat.core._data_model.analysis import DataModelAnalysis
|
|
16
|
-
from cognite.neat.core._data_model.models import ConceptualDataModel, data_types
|
|
17
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
13
|
+
from cognite.neat.v0.core._config import GLOBAL_CONFIG
|
|
14
|
+
from cognite.neat.v0.core._constants import NEAT, get_default_prefixes_and_namespaces
|
|
15
|
+
from cognite.neat.v0.core._data_model.analysis import DataModelAnalysis
|
|
16
|
+
from cognite.neat.v0.core._data_model.models import ConceptualDataModel, data_types
|
|
17
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
18
18
|
Concept,
|
|
19
19
|
ConceptualMetadata,
|
|
20
20
|
UnverifiedConcept,
|
|
21
21
|
UnverifiedConceptualProperty,
|
|
22
22
|
)
|
|
23
|
-
from cognite.neat.core._data_model.models.data_types import AnyURI
|
|
24
|
-
from cognite.neat.core._data_model.models.entities._single_value import UnknownEntity
|
|
25
|
-
from cognite.neat.core._issues import IssueList
|
|
26
|
-
from cognite.neat.core._issues.warnings import PropertyValueTypeUndefinedWarning
|
|
27
|
-
from cognite.neat.core._store import NeatInstanceStore
|
|
28
|
-
from cognite.neat.core._store._provenance import INSTANCES_ENTITY
|
|
29
|
-
from cognite.neat.core._utils.collection_ import iterate_progress_bar
|
|
30
|
-
from cognite.neat.core._utils.rdf_ import remove_namespace_from_uri, uri_to_short_form
|
|
31
|
-
from cognite.neat.core._utils.text import NamingStandardization
|
|
23
|
+
from cognite.neat.v0.core._data_model.models.data_types import AnyURI
|
|
24
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import UnknownEntity
|
|
25
|
+
from cognite.neat.v0.core._issues import IssueList
|
|
26
|
+
from cognite.neat.v0.core._issues.warnings import PropertyValueTypeUndefinedWarning
|
|
27
|
+
from cognite.neat.v0.core._store import NeatInstanceStore
|
|
28
|
+
from cognite.neat.v0.core._store._provenance import INSTANCES_ENTITY
|
|
29
|
+
from cognite.neat.v0.core._utils.collection_ import iterate_progress_bar
|
|
30
|
+
from cognite.neat.v0.core._utils.rdf_ import remove_namespace_from_uri, uri_to_short_form
|
|
31
|
+
from cognite.neat.v0.core._utils.text import NamingStandardization
|
|
32
32
|
|
|
33
33
|
from ._base import DEFAULT_NON_EXISTING_NODE_TYPE, BaseRDFImporter
|
|
34
34
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""This module performs importing of various formats to one of serializations for which
|
|
2
2
|
there are loaders to data model pydantic class."""
|
|
3
3
|
|
|
4
|
-
from cognite.neat.core._data_model.importers._rdf._base import BaseRDFImporter
|
|
5
|
-
from cognite.neat.core._data_model.importers._rdf._shared import (
|
|
4
|
+
from cognite.neat.v0.core._data_model.importers._rdf._base import BaseRDFImporter
|
|
5
|
+
from cognite.neat.v0.core._data_model.importers._rdf._shared import (
|
|
6
6
|
parse_concepts,
|
|
7
7
|
parse_properties,
|
|
8
8
|
)
|
|
@@ -6,16 +6,16 @@ from rdflib import Literal as RdfLiteral
|
|
|
6
6
|
from rdflib.plugins.sparql import prepareQuery
|
|
7
7
|
from rdflib.query import ResultRow
|
|
8
8
|
|
|
9
|
-
from cognite.neat.core._constants import cognite_prefixes
|
|
10
|
-
from cognite.neat.core._data_model.models.entities._constants import Unknown
|
|
11
|
-
from cognite.neat.core._data_model.models.entities._single_value import ConceptEntity
|
|
12
|
-
from cognite.neat.core._issues._base import IssueList
|
|
13
|
-
from cognite.neat.core._issues.errors._general import NeatValueError
|
|
14
|
-
from cognite.neat.core._issues.warnings._resources import (
|
|
9
|
+
from cognite.neat.v0.core._constants import cognite_prefixes
|
|
10
|
+
from cognite.neat.v0.core._data_model.models.entities._constants import Unknown
|
|
11
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import ConceptEntity
|
|
12
|
+
from cognite.neat.v0.core._issues._base import IssueList
|
|
13
|
+
from cognite.neat.v0.core._issues.errors._general import NeatValueError
|
|
14
|
+
from cognite.neat.v0.core._issues.warnings._resources import (
|
|
15
15
|
ResourceRedefinedWarning,
|
|
16
16
|
ResourceRetrievalWarning,
|
|
17
17
|
)
|
|
18
|
-
from cognite.neat.core._utils.rdf_ import remove_namespace_from_uri, uri_to_entity_components
|
|
18
|
+
from cognite.neat.v0.core._utils.rdf_ import remove_namespace_from_uri, uri_to_entity_components
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def parse_concepts(
|
|
@@ -12,26 +12,26 @@ from openpyxl.worksheet.worksheet import Worksheet
|
|
|
12
12
|
from pandas import ExcelFile
|
|
13
13
|
from rdflib import Namespace, URIRef
|
|
14
14
|
|
|
15
|
-
from cognite.neat.core._data_model._shared import (
|
|
15
|
+
from cognite.neat.v0.core._data_model._shared import (
|
|
16
16
|
ImportedDataModel,
|
|
17
17
|
T_UnverifiedDataModel,
|
|
18
18
|
)
|
|
19
|
-
from cognite.neat.core._data_model.models import (
|
|
19
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
20
20
|
UNVERIFIED_DATA_MODEL_BY_ROLE,
|
|
21
21
|
VERIFIED_DATA_MODEL_BY_ROLE,
|
|
22
22
|
RoleTypes,
|
|
23
23
|
SchemaCompleteness,
|
|
24
24
|
)
|
|
25
|
-
from cognite.neat.core._data_model.models._import_contexts import SpreadsheetContext
|
|
26
|
-
from cognite.neat.core._issues import IssueList, MultiValueError
|
|
27
|
-
from cognite.neat.core._issues.errors import (
|
|
25
|
+
from cognite.neat.v0.core._data_model.models._import_contexts import SpreadsheetContext
|
|
26
|
+
from cognite.neat.v0.core._issues import IssueList, MultiValueError
|
|
27
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
28
28
|
FileMissingRequiredFieldError,
|
|
29
29
|
FileNotFoundNeatError,
|
|
30
30
|
FileReadError,
|
|
31
31
|
)
|
|
32
|
-
from cognite.neat.core._issues.warnings import FileMissingRequiredFieldWarning
|
|
33
|
-
from cognite.neat.core._utils.spreadsheet import SpreadsheetRead, read_individual_sheet
|
|
34
|
-
from cognite.neat.core._utils.text import humanize_collection
|
|
32
|
+
from cognite.neat.v0.core._issues.warnings import FileMissingRequiredFieldWarning
|
|
33
|
+
from cognite.neat.v0.core._utils.spreadsheet import SpreadsheetRead, read_individual_sheet
|
|
34
|
+
from cognite.neat.v0.core._utils.text import humanize_collection
|
|
35
35
|
|
|
36
36
|
from ._base import BaseImporter
|
|
37
37
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from cognite.neat.core._client.data_classes.schema import DMSSchema
|
|
2
|
-
from cognite.neat.core._data_model.models.conceptual._unverified import (
|
|
1
|
+
from cognite.neat.v0.core._client.data_classes.schema import DMSSchema
|
|
2
|
+
from cognite.neat.v0.core._data_model.models.conceptual._unverified import (
|
|
3
3
|
UnverifiedConceptualDataModel,
|
|
4
4
|
)
|
|
5
|
-
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
5
|
+
from cognite.neat.v0.core._data_model.models.conceptual._verified import (
|
|
6
6
|
ConceptualDataModel,
|
|
7
7
|
)
|
|
8
8
|
|
|
@@ -26,8 +26,8 @@ from pydantic.main import IncEx
|
|
|
26
26
|
from pydantic_core import core_schema
|
|
27
27
|
from rdflib import Namespace, URIRef
|
|
28
28
|
|
|
29
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE
|
|
30
|
-
from cognite.neat.core._data_model.models._types import (
|
|
29
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE
|
|
30
|
+
from cognite.neat.v0.core._data_model.models._types import (
|
|
31
31
|
ContainerEntityType,
|
|
32
32
|
DataModelExternalIdType,
|
|
33
33
|
PhysicalPropertyType,
|
|
@@ -37,13 +37,13 @@ from cognite.neat.core._data_model.models._types import (
|
|
|
37
37
|
VersionType,
|
|
38
38
|
ViewEntityType,
|
|
39
39
|
)
|
|
40
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
41
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
40
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
41
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
42
42
|
EdgeEntity,
|
|
43
43
|
ReverseConnectionEntity,
|
|
44
44
|
ViewEntity,
|
|
45
45
|
)
|
|
46
|
-
from cognite.neat.core._utils.rdf_ import uri_display_name
|
|
46
|
+
from cognite.neat.v0.core._utils.rdf_ import uri_display_name
|
|
47
47
|
|
|
48
48
|
if sys.version_info >= (3, 11):
|
|
49
49
|
from enum import StrEnum
|