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
|
@@ -3,7 +3,7 @@ from typing import TypeVar
|
|
|
3
3
|
|
|
4
4
|
from rdflib import URIRef
|
|
5
5
|
|
|
6
|
-
from cognite.neat.core._utils.spreadsheet import SpreadsheetRead
|
|
6
|
+
from cognite.neat.v0.core._utils.spreadsheet import SpreadsheetRead
|
|
7
7
|
|
|
8
8
|
T_Key = TypeVar("T_Key", bound=Hashable)
|
|
9
9
|
T_Value = TypeVar("T_Value")
|
|
@@ -14,21 +14,21 @@ from pydantic import (
|
|
|
14
14
|
)
|
|
15
15
|
from pydantic.functional_serializers import PlainSerializer
|
|
16
16
|
|
|
17
|
-
from cognite.neat.core._data_model._constants import (
|
|
17
|
+
from cognite.neat.v0.core._data_model._constants import (
|
|
18
18
|
DATA_MODEL_COMPLIANCE_REGEX,
|
|
19
19
|
PATTERNS,
|
|
20
20
|
PREFIX_COMPLIANCE_REGEX,
|
|
21
21
|
VERSION_COMPLIANCE_REGEX,
|
|
22
22
|
EntityTypes,
|
|
23
23
|
)
|
|
24
|
-
from cognite.neat.core._data_model.models.entities._multi_value import MultiValueTypeInfo
|
|
25
|
-
from cognite.neat.core._data_model.models.entities._single_value import (
|
|
24
|
+
from cognite.neat.v0.core._data_model.models.entities._multi_value import MultiValueTypeInfo
|
|
25
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import (
|
|
26
26
|
ConceptEntity,
|
|
27
27
|
ContainerEntity,
|
|
28
28
|
ViewEntity,
|
|
29
29
|
)
|
|
30
|
-
from cognite.neat.core._issues.errors import RegexViolationError
|
|
31
|
-
from cognite.neat.core._issues.warnings import RegexViolationWarning
|
|
30
|
+
from cognite.neat.v0.core._issues.errors import RegexViolationError
|
|
31
|
+
from cognite.neat.v0.core._issues.warnings import RegexViolationWarning
|
|
32
32
|
|
|
33
33
|
Entities: TypeAlias = ConceptEntity | ViewEntity | ContainerEntity
|
|
34
34
|
T_Entities = TypeVar("T_Entities", bound=Entities)
|
|
@@ -6,19 +6,19 @@ import pandas as pd
|
|
|
6
6
|
from cognite.client import data_modeling as dm
|
|
7
7
|
from rdflib import Namespace, URIRef
|
|
8
8
|
|
|
9
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE
|
|
10
|
-
from cognite.neat.core._data_model.models._base_unverified import (
|
|
9
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE
|
|
10
|
+
from cognite.neat.v0.core._data_model.models._base_unverified import (
|
|
11
11
|
UnverifiedComponent,
|
|
12
12
|
UnverifiedDataModel,
|
|
13
13
|
)
|
|
14
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
15
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
14
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
15
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
16
16
|
ConceptEntity,
|
|
17
17
|
MultiValueTypeInfo,
|
|
18
18
|
UnknownEntity,
|
|
19
19
|
load_value_type,
|
|
20
20
|
)
|
|
21
|
-
from cognite.neat.core._utils.rdf_ import uri_display_name
|
|
21
|
+
from cognite.neat.v0.core._utils.rdf_ import uri_display_name
|
|
22
22
|
|
|
23
23
|
from ._verified import (
|
|
24
24
|
Concept,
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import itertools
|
|
2
2
|
from collections import Counter, defaultdict
|
|
3
3
|
|
|
4
|
-
from cognite.neat.core._constants import get_base_concepts
|
|
5
|
-
from cognite.neat.core._data_model._constants import PATTERNS, EntityTypes
|
|
6
|
-
from cognite.neat.core._data_model.models._import_contexts import ImportContext, SpreadsheetContext
|
|
7
|
-
from cognite.neat.core._data_model.models.entities import ConceptEntity, UnknownEntity
|
|
8
|
-
from cognite.neat.core._data_model.models.entities._multi_value import MultiValueTypeInfo
|
|
9
|
-
from cognite.neat.core._issues import IssueList
|
|
10
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
11
|
-
from cognite.neat.core._issues.errors._resources import (
|
|
4
|
+
from cognite.neat.v0.core._constants import get_base_concepts
|
|
5
|
+
from cognite.neat.v0.core._data_model._constants import PATTERNS, EntityTypes
|
|
6
|
+
from cognite.neat.v0.core._data_model.models._import_contexts import ImportContext, SpreadsheetContext
|
|
7
|
+
from cognite.neat.v0.core._data_model.models.entities import ConceptEntity, UnknownEntity
|
|
8
|
+
from cognite.neat.v0.core._data_model.models.entities._multi_value import MultiValueTypeInfo
|
|
9
|
+
from cognite.neat.v0.core._issues import IssueList
|
|
10
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
11
|
+
from cognite.neat.v0.core._issues.errors._resources import (
|
|
12
12
|
ResourceDuplicatedError,
|
|
13
13
|
ResourceNotDefinedError,
|
|
14
14
|
)
|
|
15
|
-
from cognite.neat.core._issues.warnings._models import (
|
|
15
|
+
from cognite.neat.v0.core._issues.warnings._models import (
|
|
16
16
|
ConceptOnlyDataModelWarning,
|
|
17
17
|
ConversionToPhysicalModelImpossibleWarning,
|
|
18
18
|
DanglingPropertyWarning,
|
|
19
19
|
UndefinedConceptWarning,
|
|
20
20
|
)
|
|
21
|
-
from cognite.neat.core._issues.warnings._resources import (
|
|
21
|
+
from cognite.neat.v0.core._issues.warnings._resources import (
|
|
22
22
|
ResourceNotDefinedWarning,
|
|
23
23
|
ResourceRegexViolationWarning,
|
|
24
24
|
)
|
|
25
|
-
from cognite.neat.core._utils.text import humanize_collection
|
|
25
|
+
from cognite.neat.v0.core._utils.text import humanize_collection
|
|
26
26
|
|
|
27
27
|
from ._verified import ConceptualDataModel
|
|
28
28
|
|
|
@@ -37,7 +37,7 @@ class ConceptualValidation:
|
|
|
37
37
|
context: ImportContext | None = None,
|
|
38
38
|
):
|
|
39
39
|
# import here to avoid circular import issues
|
|
40
|
-
from cognite.neat.core._data_model.analysis._base import DataModelAnalysis
|
|
40
|
+
from cognite.neat.v0.core._data_model.analysis._base import DataModelAnalysis
|
|
41
41
|
|
|
42
42
|
self.data_model = data_model
|
|
43
43
|
self.analysis = DataModelAnalysis(self.data_model)
|
|
@@ -7,9 +7,9 @@ from pydantic import Field, field_serializer, field_validator, model_validator
|
|
|
7
7
|
from pydantic_core.core_schema import SerializationInfo
|
|
8
8
|
from rdflib import Namespace, URIRef
|
|
9
9
|
|
|
10
|
-
from cognite.neat.core._constants import get_default_prefixes_and_namespaces
|
|
11
|
-
from cognite.neat.core._data_model._constants import EntityTypes
|
|
12
|
-
from cognite.neat.core._data_model.models._base_verified import (
|
|
10
|
+
from cognite.neat.v0.core._constants import get_default_prefixes_and_namespaces
|
|
11
|
+
from cognite.neat.v0.core._data_model._constants import EntityTypes
|
|
12
|
+
from cognite.neat.v0.core._data_model.models._base_verified import (
|
|
13
13
|
BaseVerifiedDataModel,
|
|
14
14
|
BaseVerifiedMetadata,
|
|
15
15
|
DataModelLevel,
|
|
@@ -17,7 +17,7 @@ from cognite.neat.core._data_model.models._base_verified import (
|
|
|
17
17
|
SheetList,
|
|
18
18
|
SheetRow,
|
|
19
19
|
)
|
|
20
|
-
from cognite.neat.core._data_model.models._types import (
|
|
20
|
+
from cognite.neat.v0.core._data_model.models._types import (
|
|
21
21
|
ConceptEntityType,
|
|
22
22
|
ConceptualPropertyType,
|
|
23
23
|
MultiValueTypeType,
|
|
@@ -25,17 +25,17 @@ from cognite.neat.core._data_model.models._types import (
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
# NeatIdType,
|
|
28
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
29
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
28
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
29
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
30
30
|
ClassEntityList,
|
|
31
31
|
ConceptEntity,
|
|
32
32
|
ConceptualEntity,
|
|
33
33
|
UnknownEntity,
|
|
34
34
|
)
|
|
35
|
-
from cognite.neat.core._issues.errors import PropertyDefinitionError
|
|
35
|
+
from cognite.neat.v0.core._issues.errors import PropertyDefinitionError
|
|
36
36
|
|
|
37
37
|
if TYPE_CHECKING:
|
|
38
|
-
from cognite.neat.core._data_model.models import PhysicalDataModel
|
|
38
|
+
from cognite.neat.v0.core._data_model.models import PhysicalDataModel
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class ConceptualMetadata(BaseVerifiedMetadata):
|
|
@@ -303,7 +303,7 @@ class ConceptualDataModel(BaseVerifiedDataModel):
|
|
|
303
303
|
classes_by_neat_id[view.conceptual].physical = neat_id
|
|
304
304
|
|
|
305
305
|
def as_physical_data_model(self) -> "PhysicalDataModel":
|
|
306
|
-
from cognite.neat.core._data_model.transformers._converters import (
|
|
306
|
+
from cognite.neat.v0.core._data_model.transformers._converters import (
|
|
307
307
|
_ConceptualDataModelConverter,
|
|
308
308
|
)
|
|
309
309
|
|
|
@@ -10,12 +10,12 @@ from pydantic import BaseModel, Field, model_serializer, model_validator
|
|
|
10
10
|
from pydantic.functional_validators import ModelWrapValidatorHandler
|
|
11
11
|
from rdflib import URIRef
|
|
12
12
|
|
|
13
|
-
from cognite.neat.core._constants import XML_SCHEMA_NAMESPACE
|
|
14
|
-
from cognite.neat.core._data_model._constants import (
|
|
13
|
+
from cognite.neat.v0.core._constants import XML_SCHEMA_NAMESPACE
|
|
14
|
+
from cognite.neat.v0.core._data_model._constants import (
|
|
15
15
|
SPLIT_ON_COMMA_PATTERN,
|
|
16
16
|
SPLIT_ON_EQUAL_PATTERN,
|
|
17
17
|
)
|
|
18
|
-
from cognite.neat.core._data_model.models.entities._single_value import (
|
|
18
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import (
|
|
19
19
|
ConceptEntity,
|
|
20
20
|
UnitEntity,
|
|
21
21
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Literal, overload
|
|
2
2
|
|
|
3
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
4
|
-
from cognite.neat.core._issues.errors import NeatTypeError
|
|
3
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
4
|
+
from cognite.neat.v0.core._issues.errors import NeatTypeError
|
|
5
5
|
|
|
6
6
|
from ._multi_value import MultiValueTypeInfo
|
|
7
7
|
from ._single_value import (
|
|
@@ -6,8 +6,8 @@ from pydantic import (
|
|
|
6
6
|
model_validator,
|
|
7
7
|
)
|
|
8
8
|
|
|
9
|
-
from cognite.neat.core._data_model._constants import EntityTypes
|
|
10
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
9
|
+
from cognite.neat.v0.core._data_model._constants import EntityTypes
|
|
10
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
11
11
|
|
|
12
12
|
from ._constants import _PARSE, Undefined
|
|
13
13
|
from ._single_value import ConceptEntity, UnknownEntity
|
|
@@ -7,12 +7,12 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator, model_valida
|
|
|
7
7
|
from rdflib import Literal as RDFLiteral
|
|
8
8
|
from rdflib import URIRef
|
|
9
9
|
|
|
10
|
-
from cognite.neat.core._data_model._constants import EntityTypes
|
|
11
|
-
from cognite.neat.core._data_model.models.data_types import _XSD_TYPES, DataType
|
|
12
|
-
from cognite.neat.core._data_model.models.entities._constants import _PARSE
|
|
13
|
-
from cognite.neat.core._data_model.models.entities._single_value import ConceptEntity, ConceptualEntity
|
|
14
|
-
from cognite.neat.core._issues.errors._general import NeatValueError
|
|
15
|
-
from cognite.neat.core._utils.rdf_ import remove_namespace_from_uri
|
|
10
|
+
from cognite.neat.v0.core._data_model._constants import EntityTypes
|
|
11
|
+
from cognite.neat.v0.core._data_model.models.data_types import _XSD_TYPES, DataType
|
|
12
|
+
from cognite.neat.v0.core._data_model.models.entities._constants import _PARSE
|
|
13
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import ConceptEntity, ConceptualEntity
|
|
14
|
+
from cognite.neat.v0.core._issues.errors._general import NeatValueError
|
|
15
|
+
from cognite.neat.v0.core._utils.rdf_ import remove_namespace_from_uri
|
|
16
16
|
|
|
17
17
|
if sys.version_info <= (3, 11):
|
|
18
18
|
from typing_extensions import Self
|
|
@@ -22,8 +22,8 @@ from pydantic import (
|
|
|
22
22
|
model_validator,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
26
|
-
from cognite.neat.core._utils.text import replace_non_alphanumeric_with_underscore
|
|
25
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
26
|
+
from cognite.neat.v0.core._utils.text import replace_non_alphanumeric_with_underscore
|
|
27
27
|
|
|
28
28
|
if sys.version_info >= (3, 11):
|
|
29
29
|
from enum import StrEnum
|
|
@@ -32,7 +32,7 @@ else:
|
|
|
32
32
|
from backports.strenum import StrEnum
|
|
33
33
|
from typing_extensions import Self
|
|
34
34
|
|
|
35
|
-
from cognite.neat.core._data_model._constants import (
|
|
35
|
+
from cognite.neat.v0.core._data_model._constants import (
|
|
36
36
|
ENTITY_PATTERN,
|
|
37
37
|
SPLIT_ON_COMMA_PATTERN,
|
|
38
38
|
SPLIT_ON_EDGE_ENTITY_ARGS_PATTERN,
|
|
@@ -3,12 +3,12 @@ from pathlib import Path
|
|
|
3
3
|
|
|
4
4
|
import yaml
|
|
5
5
|
|
|
6
|
-
from cognite.neat.core._data_model._shared import ImportedDataModel
|
|
7
|
-
from cognite.neat.core._data_model.models.physical import (
|
|
6
|
+
from cognite.neat.v0.core._data_model._shared import ImportedDataModel
|
|
7
|
+
from cognite.neat.v0.core._data_model.models.physical import (
|
|
8
8
|
PhysicalDataModel,
|
|
9
9
|
UnverifiedPhysicalDataModel,
|
|
10
10
|
)
|
|
11
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
11
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
12
12
|
|
|
13
13
|
_CLASSIC_TO_CORE_MAPPING = Path(__file__).resolve().parent / "_classic2core.yaml"
|
|
14
14
|
|
|
@@ -19,8 +19,8 @@ def _read_source_file() -> str:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def load_classic_to_core_mapping(org_name: str | None, source_space: str, source_version: str) -> PhysicalDataModel:
|
|
22
|
-
from cognite.neat.core._data_model.importers import DictImporter
|
|
23
|
-
from cognite.neat.core._data_model.transformers import VerifyPhysicalDataModel
|
|
22
|
+
from cognite.neat.v0.core._data_model.importers import DictImporter
|
|
23
|
+
from cognite.neat.v0.core._data_model.transformers import VerifyPhysicalDataModel
|
|
24
24
|
|
|
25
25
|
raw_str = _read_source_file()
|
|
26
26
|
if org_name is not None:
|
|
@@ -13,20 +13,20 @@ from cognite.client.data_classes.data_modeling.views import (
|
|
|
13
13
|
ViewPropertyApply,
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
from cognite.neat.core._client.data_classes.data_modeling import (
|
|
16
|
+
from cognite.neat.v0.core._client.data_classes.data_modeling import (
|
|
17
17
|
ContainerApplyDict,
|
|
18
18
|
NodeApplyDict,
|
|
19
19
|
SpaceApplyDict,
|
|
20
20
|
ViewApplyDict,
|
|
21
21
|
)
|
|
22
|
-
from cognite.neat.core._client.data_classes.schema import DMSSchema
|
|
23
|
-
from cognite.neat.core._constants import (
|
|
22
|
+
from cognite.neat.v0.core._client.data_classes.schema import DMSSchema
|
|
23
|
+
from cognite.neat.v0.core._constants import (
|
|
24
24
|
COGNITE_SPACES,
|
|
25
25
|
DMS_DIRECT_RELATION_LIST_DEFAULT_LIMIT,
|
|
26
26
|
DMS_PRIMITIVE_LIST_DEFAULT_LIMIT,
|
|
27
27
|
)
|
|
28
|
-
from cognite.neat.core._data_model.models.data_types import DataType, Double, Enum, Float, LangString, String
|
|
29
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
28
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType, Double, Enum, Float, LangString, String
|
|
29
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
30
30
|
ConceptEntity,
|
|
31
31
|
ContainerEntity,
|
|
32
32
|
ContainerIndexEntity,
|
|
@@ -41,16 +41,16 @@ from cognite.neat.core._data_model.models.entities import (
|
|
|
41
41
|
UnitEntity,
|
|
42
42
|
ViewEntity,
|
|
43
43
|
)
|
|
44
|
-
from cognite.neat.core._issues.errors import (
|
|
44
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
45
45
|
NeatTypeError,
|
|
46
46
|
NeatValueError,
|
|
47
47
|
ResourceNotFoundError,
|
|
48
48
|
)
|
|
49
|
-
from cognite.neat.core._issues.warnings import (
|
|
49
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
50
50
|
NotSupportedWarning,
|
|
51
51
|
PropertyNotFoundWarning,
|
|
52
52
|
)
|
|
53
|
-
from cognite.neat.core._issues.warnings.user_modeling import (
|
|
53
|
+
from cognite.neat.v0.core._issues.warnings.user_modeling import (
|
|
54
54
|
EmptyContainerWarning,
|
|
55
55
|
HasDataFilterOnNoPropertiesViewWarning,
|
|
56
56
|
)
|
|
@@ -10,17 +10,17 @@ from cognite.client import data_modeling as dm
|
|
|
10
10
|
from cognite.client.data_classes.data_modeling import ContainerId, ViewId
|
|
11
11
|
from rdflib import Namespace, URIRef
|
|
12
12
|
|
|
13
|
-
from cognite.neat.core._constants import (
|
|
13
|
+
from cognite.neat.v0.core._constants import (
|
|
14
14
|
DEFAULT_NAMESPACE,
|
|
15
15
|
DMS_DIRECT_RELATION_LIST_DEFAULT_LIMIT,
|
|
16
16
|
)
|
|
17
|
-
from cognite.neat.core._data_model._constants import SPLIT_ON_COMMA_PATTERN
|
|
18
|
-
from cognite.neat.core._data_model.models._base_unverified import (
|
|
17
|
+
from cognite.neat.v0.core._data_model._constants import SPLIT_ON_COMMA_PATTERN
|
|
18
|
+
from cognite.neat.v0.core._data_model.models._base_unverified import (
|
|
19
19
|
UnverifiedComponent,
|
|
20
20
|
UnverifiedDataModel,
|
|
21
21
|
)
|
|
22
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
23
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
22
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
23
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
24
24
|
ContainerEntity,
|
|
25
25
|
ContainerIndexEntity,
|
|
26
26
|
DMSNodeEntity,
|
|
@@ -31,9 +31,9 @@ from cognite.neat.core._data_model.models.entities import (
|
|
|
31
31
|
load_connection,
|
|
32
32
|
load_dms_value_type,
|
|
33
33
|
)
|
|
34
|
-
from cognite.neat.core._data_model.models.entities._wrapped import DMSFilter
|
|
35
|
-
from cognite.neat.core._issues.warnings import DeprecatedWarning
|
|
36
|
-
from cognite.neat.core._utils.rdf_ import uri_display_name
|
|
34
|
+
from cognite.neat.v0.core._data_model.models.entities._wrapped import DMSFilter
|
|
35
|
+
from cognite.neat.v0.core._issues.warnings import DeprecatedWarning
|
|
36
|
+
from cognite.neat.v0.core._utils.rdf_ import uri_display_name
|
|
37
37
|
|
|
38
38
|
from ._verified import (
|
|
39
39
|
_DEFAULT_VERSION,
|
|
@@ -13,25 +13,25 @@ from cognite.client.data_classes.data_modeling.views import (
|
|
|
13
13
|
ViewPropertyApply,
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
from cognite.neat.core._client import NeatClient
|
|
17
|
-
from cognite.neat.core._client.data_classes.data_modeling import ViewApplyDict
|
|
18
|
-
from cognite.neat.core._client.data_classes.schema import DMSSchema
|
|
19
|
-
from cognite.neat.core._constants import (
|
|
16
|
+
from cognite.neat.v0.core._client import NeatClient
|
|
17
|
+
from cognite.neat.v0.core._client.data_classes.data_modeling import ViewApplyDict
|
|
18
|
+
from cognite.neat.v0.core._client.data_classes.schema import DMSSchema
|
|
19
|
+
from cognite.neat.v0.core._constants import (
|
|
20
20
|
COGNITE_MODELS,
|
|
21
21
|
COGNITE_SPACES,
|
|
22
22
|
DMS_CONTAINER_PROPERTY_SIZE_LIMIT,
|
|
23
23
|
DMS_VIEW_CONTAINER_SIZE_LIMIT,
|
|
24
24
|
get_base_concepts,
|
|
25
25
|
)
|
|
26
|
-
from cognite.neat.core._data_model.models._import_contexts import ImportContext, SpreadsheetContext
|
|
27
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
28
|
-
from cognite.neat.core._data_model.models.entities import ContainerEntity, RawFilter
|
|
29
|
-
from cognite.neat.core._data_model.models.entities._single_value import (
|
|
26
|
+
from cognite.neat.v0.core._data_model.models._import_contexts import ImportContext, SpreadsheetContext
|
|
27
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
28
|
+
from cognite.neat.v0.core._data_model.models.entities import ContainerEntity, RawFilter
|
|
29
|
+
from cognite.neat.v0.core._data_model.models.entities._single_value import (
|
|
30
30
|
ContainerIndexEntity,
|
|
31
31
|
ViewEntity,
|
|
32
32
|
)
|
|
33
|
-
from cognite.neat.core._issues import IssueList, NeatError
|
|
34
|
-
from cognite.neat.core._issues.errors import (
|
|
33
|
+
from cognite.neat.v0.core._issues import IssueList, NeatError
|
|
34
|
+
from cognite.neat.v0.core._issues.errors import (
|
|
35
35
|
CDFMissingClientError,
|
|
36
36
|
PropertyDefinitionDuplicatedError,
|
|
37
37
|
PropertyInvalidDefinitionError,
|
|
@@ -41,21 +41,21 @@ from cognite.neat.core._issues.errors import (
|
|
|
41
41
|
ResourceNotFoundError,
|
|
42
42
|
ReversedConnectionNotFeasibleError,
|
|
43
43
|
)
|
|
44
|
-
from cognite.neat.core._issues.errors._external import CDFMissingResourcesError
|
|
45
|
-
from cognite.neat.core._issues.warnings import (
|
|
44
|
+
from cognite.neat.v0.core._issues.errors._external import CDFMissingResourcesError
|
|
45
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
46
46
|
NotSupportedHasDataFilterLimitWarning,
|
|
47
47
|
NotSupportedViewContainerLimitWarning,
|
|
48
48
|
ReversedConnectionNotFeasibleWarning,
|
|
49
49
|
UndefinedViewWarning,
|
|
50
50
|
user_modeling,
|
|
51
51
|
)
|
|
52
|
-
from cognite.neat.core._issues.warnings._models import ViewWithoutPropertiesWarning
|
|
53
|
-
from cognite.neat.core._issues.warnings.user_modeling import (
|
|
52
|
+
from cognite.neat.v0.core._issues.warnings._models import ViewWithoutPropertiesWarning
|
|
53
|
+
from cognite.neat.v0.core._issues.warnings.user_modeling import (
|
|
54
54
|
ContainerPropertyLimitWarning,
|
|
55
55
|
DirectRelationMissingSourceWarning,
|
|
56
56
|
NotNeatSupportedFilterWarning,
|
|
57
57
|
)
|
|
58
|
-
from cognite.neat.core._utils.text import humanize_collection
|
|
58
|
+
from cognite.neat.v0.core._utils.text import humanize_collection
|
|
59
59
|
|
|
60
60
|
from ._verified import PhysicalDataModel, PhysicalProperty
|
|
61
61
|
|
|
@@ -86,7 +86,7 @@ class PhysicalValidation:
|
|
|
86
86
|
context: ImportContext | None = None,
|
|
87
87
|
) -> None:
|
|
88
88
|
# import here to avoid circular import issues
|
|
89
|
-
from cognite.neat.core._data_model.analysis._base import DataModelAnalysis
|
|
89
|
+
from cognite.neat.v0.core._data_model.analysis._base import DataModelAnalysis
|
|
90
90
|
|
|
91
91
|
self._data_model = data_model
|
|
92
92
|
self._client = client
|
|
@@ -8,9 +8,9 @@ from cognite.client import data_modeling as dm
|
|
|
8
8
|
from pydantic import Field, field_serializer, field_validator, model_validator
|
|
9
9
|
from pydantic_core.core_schema import SerializationInfo, ValidationInfo
|
|
10
10
|
|
|
11
|
-
from cognite.neat.core._client.data_classes.schema import DMSSchema
|
|
12
|
-
from cognite.neat.core._constants import DMS_CONTAINER_LIST_MAX_LIMIT
|
|
13
|
-
from cognite.neat.core._data_model.models._base_verified import (
|
|
11
|
+
from cognite.neat.v0.core._client.data_classes.schema import DMSSchema
|
|
12
|
+
from cognite.neat.v0.core._constants import DMS_CONTAINER_LIST_MAX_LIMIT
|
|
13
|
+
from cognite.neat.v0.core._data_model.models._base_verified import (
|
|
14
14
|
BaseVerifiedDataModel,
|
|
15
15
|
BaseVerifiedMetadata,
|
|
16
16
|
ContainerProperty,
|
|
@@ -21,7 +21,7 @@ from cognite.neat.core._data_model.models._base_verified import (
|
|
|
21
21
|
ViewProperty,
|
|
22
22
|
ViewRef,
|
|
23
23
|
)
|
|
24
|
-
from cognite.neat.core._data_model.models._types import (
|
|
24
|
+
from cognite.neat.v0.core._data_model.models._types import (
|
|
25
25
|
ConceptEntityType,
|
|
26
26
|
ContainerEntityType,
|
|
27
27
|
PhysicalPropertyType,
|
|
@@ -29,8 +29,8 @@ from cognite.neat.core._data_model.models._types import (
|
|
|
29
29
|
URIRefType,
|
|
30
30
|
ViewEntityType,
|
|
31
31
|
)
|
|
32
|
-
from cognite.neat.core._data_model.models.data_types import DataType
|
|
33
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
32
|
+
from cognite.neat.v0.core._data_model.models.data_types import DataType
|
|
33
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
34
34
|
ConceptualEntity,
|
|
35
35
|
ContainerIndexEntity,
|
|
36
36
|
DMSNodeEntity,
|
|
@@ -45,12 +45,12 @@ from cognite.neat.core._data_model.models.entities import (
|
|
|
45
45
|
ViewEntity,
|
|
46
46
|
ViewEntityList,
|
|
47
47
|
)
|
|
48
|
-
from cognite.neat.core._data_model.models.entities._types import ContainerEntityList, ContainerIndexListType
|
|
49
|
-
from cognite.neat.core._issues.errors import NeatValueError
|
|
50
|
-
from cognite.neat.core._issues.warnings import NeatValueWarning, PropertyDefinitionWarning
|
|
48
|
+
from cognite.neat.v0.core._data_model.models.entities._types import ContainerEntityList, ContainerIndexListType
|
|
49
|
+
from cognite.neat.v0.core._issues.errors import NeatValueError
|
|
50
|
+
from cognite.neat.v0.core._issues.warnings import NeatValueWarning, PropertyDefinitionWarning
|
|
51
51
|
|
|
52
52
|
if TYPE_CHECKING:
|
|
53
|
-
from cognite.neat.core._data_model.models import ConceptualDataModel
|
|
53
|
+
from cognite.neat.v0.core._data_model.models import ConceptualDataModel
|
|
54
54
|
|
|
55
55
|
_DEFAULT_VERSION = "1"
|
|
56
56
|
|
|
@@ -4,17 +4,17 @@ from functools import lru_cache
|
|
|
4
4
|
from types import UnionType
|
|
5
5
|
from typing import Generic, TypeVar, Union, get_args, get_origin
|
|
6
6
|
|
|
7
|
-
from cognite.neat.core._constants import DEFAULT_NAMESPACE
|
|
8
|
-
from cognite.neat.core._data_model._shared import (
|
|
7
|
+
from cognite.neat.v0.core._constants import DEFAULT_NAMESPACE
|
|
8
|
+
from cognite.neat.v0.core._data_model._shared import (
|
|
9
9
|
DataModel,
|
|
10
10
|
ImportedDataModel,
|
|
11
11
|
VerifiedDataModel,
|
|
12
12
|
)
|
|
13
|
-
from cognite.neat.core._data_model.models import (
|
|
13
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
14
14
|
UnverifiedConceptualDataModel,
|
|
15
15
|
UnverifiedPhysicalDataModel,
|
|
16
16
|
)
|
|
17
|
-
from cognite.neat.core._store._provenance import Agent as ProvenanceAgent
|
|
17
|
+
from cognite.neat.v0.core._store._provenance import Agent as ProvenanceAgent
|
|
18
18
|
|
|
19
19
|
T_DataModelIn = TypeVar("T_DataModelIn", bound=DataModel)
|
|
20
20
|
T_DataModelOut = TypeVar("T_DataModelOut", bound=DataModel)
|
|
@@ -16,12 +16,12 @@ from cognite.client.utils.useful_types import SequenceNotStr
|
|
|
16
16
|
from pydantic import ValidationError
|
|
17
17
|
from rdflib import Namespace
|
|
18
18
|
|
|
19
|
-
from cognite.neat.core._client import NeatClient
|
|
20
|
-
from cognite.neat.core._client.data_classes.data_modeling import (
|
|
19
|
+
from cognite.neat.v0.core._client import NeatClient
|
|
20
|
+
from cognite.neat.v0.core._client.data_classes.data_modeling import (
|
|
21
21
|
ContainerApplyDict,
|
|
22
22
|
ViewApplyDict,
|
|
23
23
|
)
|
|
24
|
-
from cognite.neat.core._constants import (
|
|
24
|
+
from cognite.neat.v0.core._constants import (
|
|
25
25
|
COGNITE_CONCEPTS,
|
|
26
26
|
COGNITE_MODELS,
|
|
27
27
|
COGNITE_SPACES,
|
|
@@ -29,16 +29,16 @@ from cognite.neat.core._constants import (
|
|
|
29
29
|
DMS_RESERVED_PROPERTIES,
|
|
30
30
|
get_default_prefixes_and_namespaces,
|
|
31
31
|
)
|
|
32
|
-
from cognite.neat.core._data_model._constants import PATTERNS, get_reserved_words
|
|
33
|
-
from cognite.neat.core._data_model._shared import (
|
|
32
|
+
from cognite.neat.v0.core._data_model._constants import PATTERNS, get_reserved_words
|
|
33
|
+
from cognite.neat.v0.core._data_model._shared import (
|
|
34
34
|
ImportContext,
|
|
35
35
|
ImportedDataModel,
|
|
36
36
|
ImportedUnverifiedDataModel,
|
|
37
37
|
VerifiedDataModel,
|
|
38
38
|
)
|
|
39
|
-
from cognite.neat.core._data_model.analysis import DataModelAnalysis
|
|
40
|
-
from cognite.neat.core._data_model.importers import DMSImporter
|
|
41
|
-
from cognite.neat.core._data_model.models import (
|
|
39
|
+
from cognite.neat.v0.core._data_model.analysis import DataModelAnalysis
|
|
40
|
+
from cognite.neat.v0.core._data_model.importers import DMSImporter
|
|
41
|
+
from cognite.neat.v0.core._data_model.models import (
|
|
42
42
|
ConceptualDataModel,
|
|
43
43
|
PhysicalDataModel,
|
|
44
44
|
SheetList,
|
|
@@ -46,14 +46,14 @@ from cognite.neat.core._data_model.models import (
|
|
|
46
46
|
UnverifiedPhysicalDataModel,
|
|
47
47
|
data_types,
|
|
48
48
|
)
|
|
49
|
-
from cognite.neat.core._data_model.models.conceptual import (
|
|
49
|
+
from cognite.neat.v0.core._data_model.models.conceptual import (
|
|
50
50
|
Concept,
|
|
51
51
|
ConceptualMetadata,
|
|
52
52
|
ConceptualProperty,
|
|
53
53
|
UnverifiedConcept,
|
|
54
54
|
UnverifiedConceptualProperty,
|
|
55
55
|
)
|
|
56
|
-
from cognite.neat.core._data_model.models.data_types import (
|
|
56
|
+
from cognite.neat.v0.core._data_model.models.data_types import (
|
|
57
57
|
AnyURI,
|
|
58
58
|
DataType,
|
|
59
59
|
Enum,
|
|
@@ -61,7 +61,7 @@ from cognite.neat.core._data_model.models.data_types import (
|
|
|
61
61
|
String,
|
|
62
62
|
Timeseries,
|
|
63
63
|
)
|
|
64
|
-
from cognite.neat.core._data_model.models.entities import (
|
|
64
|
+
from cognite.neat.v0.core._data_model.models.entities import (
|
|
65
65
|
ConceptEntity,
|
|
66
66
|
ContainerEntity,
|
|
67
67
|
EdgeEntity,
|
|
@@ -72,29 +72,29 @@ from cognite.neat.core._data_model.models.entities import (
|
|
|
72
72
|
UnknownEntity,
|
|
73
73
|
ViewEntity,
|
|
74
74
|
)
|
|
75
|
-
from cognite.neat.core._data_model.models.physical import (
|
|
75
|
+
from cognite.neat.v0.core._data_model.models.physical import (
|
|
76
76
|
PhysicalMetadata,
|
|
77
77
|
PhysicalProperty,
|
|
78
78
|
PhysicalValidation,
|
|
79
79
|
PhysicalView,
|
|
80
80
|
)
|
|
81
|
-
from cognite.neat.core._data_model.models.physical._verified import (
|
|
81
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import (
|
|
82
82
|
PhysicalContainer,
|
|
83
83
|
PhysicalEnum,
|
|
84
84
|
PhysicalNodeType,
|
|
85
85
|
)
|
|
86
|
-
from cognite.neat.core._issues import IssueList
|
|
87
|
-
from cognite.neat.core._issues._factory import from_pydantic_errors
|
|
88
|
-
from cognite.neat.core._issues.errors import CDFMissingClientError, NeatValueError
|
|
89
|
-
from cognite.neat.core._issues.warnings import (
|
|
86
|
+
from cognite.neat.v0.core._issues import IssueList
|
|
87
|
+
from cognite.neat.v0.core._issues._factory import from_pydantic_errors
|
|
88
|
+
from cognite.neat.v0.core._issues.errors import CDFMissingClientError, NeatValueError
|
|
89
|
+
from cognite.neat.v0.core._issues.warnings import (
|
|
90
90
|
NeatValueWarning,
|
|
91
91
|
PropertyOverwritingWarning,
|
|
92
92
|
)
|
|
93
|
-
from cognite.neat.core._issues.warnings._models import (
|
|
93
|
+
from cognite.neat.v0.core._issues.warnings._models import (
|
|
94
94
|
SolutionModelBuildOnTopOfCDMWarning,
|
|
95
95
|
)
|
|
96
|
-
from cognite.neat.core._utils.rdf_ import get_inheritance_path
|
|
97
|
-
from cognite.neat.core._utils.text import (
|
|
96
|
+
from cognite.neat.v0.core._utils.rdf_ import get_inheritance_path
|
|
97
|
+
from cognite.neat.v0.core._utils.text import (
|
|
98
98
|
NamingStandardization,
|
|
99
99
|
humanize_collection,
|
|
100
100
|
title,
|
|
@@ -1437,7 +1437,7 @@ class _ConceptualDataModelConverter:
|
|
|
1437
1437
|
ignore_undefined_value_types: bool = False,
|
|
1438
1438
|
reserved_properties: Literal["error", "warning"] = "error",
|
|
1439
1439
|
) -> "PhysicalDataModel":
|
|
1440
|
-
from cognite.neat.core._data_model.models.physical._verified import (
|
|
1440
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import (
|
|
1441
1441
|
PhysicalContainer,
|
|
1442
1442
|
PhysicalDataModel,
|
|
1443
1443
|
PhysicalProperty,
|
|
@@ -1650,7 +1650,7 @@ class _ConceptualDataModelConverter:
|
|
|
1650
1650
|
|
|
1651
1651
|
@classmethod
|
|
1652
1652
|
def _convert_conceptual_to_physical_metadata(cls, metadata: ConceptualMetadata) -> "PhysicalMetadata":
|
|
1653
|
-
from cognite.neat.core._data_model.models.physical._verified import (
|
|
1653
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import (
|
|
1654
1654
|
PhysicalMetadata,
|
|
1655
1655
|
)
|
|
1656
1656
|
|
|
@@ -1676,7 +1676,7 @@ class _ConceptualDataModelConverter:
|
|
|
1676
1676
|
edge_value_types_by_concept_property_pair: dict[tuple[ConceptEntity, str], ConceptEntity],
|
|
1677
1677
|
end_node_by_edge: dict[ConceptEntity, ConceptEntity],
|
|
1678
1678
|
) -> "PhysicalProperty":
|
|
1679
|
-
from cognite.neat.core._data_model.models.physical._verified import PhysicalProperty
|
|
1679
|
+
from cognite.neat.v0.core._data_model.models.physical._verified import PhysicalProperty
|
|
1680
1680
|
|
|
1681
1681
|
# returns property type, which can be ObjectProperty or DatatypeProperty
|
|
1682
1682
|
value_type = self._get_value_type(
|
|
@@ -2012,7 +2012,7 @@ class _PhysicalDataModelConverter:
|
|
|
2012
2012
|
def as_conceptual_data_model(
|
|
2013
2013
|
self,
|
|
2014
2014
|
) -> "ConceptualDataModel":
|
|
2015
|
-
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
2015
|
+
from cognite.neat.v0.core._data_model.models.conceptual._verified import (
|
|
2016
2016
|
Concept,
|
|
2017
2017
|
ConceptualDataModel,
|
|
2018
2018
|
ConceptualProperty,
|
|
@@ -2090,7 +2090,7 @@ class _PhysicalDataModelConverter:
|
|
|
2090
2090
|
|
|
2091
2091
|
@classmethod
|
|
2092
2092
|
def _convert_physical_to_conceptual_metadata(cls, metadata: PhysicalMetadata) -> "ConceptualMetadata":
|
|
2093
|
-
from cognite.neat.core._data_model.models.conceptual._verified import (
|
|
2093
|
+
from cognite.neat.v0.core._data_model.models.conceptual._verified import (
|
|
2094
2094
|
ConceptualMetadata,
|
|
2095
2095
|
)
|
|
2096
2096
|
|