cognite-neat 0.85.10__tar.gz → 0.85.12__tar.gz
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.
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/PKG-INFO +1 -1
- cognite_neat-0.85.12/cognite/neat/_version.py +1 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/loaders/_rdf2dms.py +33 -5
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_inference2rules.py +4 -1
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/data_types.py +4 -4
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_rules.py +70 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_rules_input.py +3 -1
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/entities.py +7 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/pyproject.toml +1 -1
- cognite_neat-0.85.10/cognite/neat/_version.py +0 -1
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/LICENSE +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/README.md +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/_shared.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/configuration.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/explorer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/configuration.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/core.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/crud.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/data_exploration.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/metrics.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/workflows.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/utils/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/utils/logging.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/main.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/monitoring/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/monitoring/metrics.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/index.html +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/config.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/constants.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/_shared.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/_tracking/base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/_tracking/log.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/examples/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/issues/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/issues/loader.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/loaders/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/loaders/_rdf2asset.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/models.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/queries/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/queries/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/queries/_construct.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/queries/_shared.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/stores/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/stores/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/stores/_provenance.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/transformers/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/transformers/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/issues.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/models.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/transformer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/analysis.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/Rules-Nordic44.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_graph2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/tables.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/rules/models/value_types.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/py.typed +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/_shared.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/analysis/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/analysis/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/analysis/_information_rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/examples/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/dms.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/fileread.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/formatters.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/importing.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/spreadsheet.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_constants.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_types/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_types/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/_types/_field.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/_converter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/_rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/_rules_input.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/_serializer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/asset/_validation.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_converter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_serializer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/domain.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/_converter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/_rules.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/_serializer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/information/_validation.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/models/wrapped_entities.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/auth.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/auxiliary.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_classes.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_loaders/_base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_loaders/_data_modeling.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/spreadsheet.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/text.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/upload.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/utils.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/utils/xml_.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/_exceptions.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/base.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/cdf_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/manager.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/migration/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/migration/steps.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/model.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps/step_model.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/steps_registry.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/tasks.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/triggers.py +0 -0
- {cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/workflows/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.85.12"
|
|
@@ -2,7 +2,7 @@ import json
|
|
|
2
2
|
from collections import defaultdict
|
|
3
3
|
from collections.abc import Iterable, Sequence
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any, get_args
|
|
6
6
|
|
|
7
7
|
import yaml
|
|
8
8
|
from cognite.client import CogniteClient
|
|
@@ -20,7 +20,7 @@ from cognite.neat.graph.issues import loader as loader_issues
|
|
|
20
20
|
from cognite.neat.graph.stores import NeatGraphStore
|
|
21
21
|
from cognite.neat.issues import NeatIssue, NeatIssueList
|
|
22
22
|
from cognite.neat.rules.models import DMSRules
|
|
23
|
-
from cognite.neat.rules.models.data_types import _DATA_TYPE_BY_DMS_TYPE
|
|
23
|
+
from cognite.neat.rules.models.data_types import _DATA_TYPE_BY_DMS_TYPE, Json
|
|
24
24
|
from cognite.neat.utils.upload import UploadResult
|
|
25
25
|
from cognite.neat.utils.utils import create_sha256_hash
|
|
26
26
|
|
|
@@ -145,7 +145,9 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
145
145
|
issues = NeatIssueList[NeatIssue]()
|
|
146
146
|
field_definitions: dict[str, tuple[type, Any]] = {}
|
|
147
147
|
edge_by_property: dict[str, dm.EdgeConnection] = {}
|
|
148
|
+
validators: dict[str, classmethod] = {}
|
|
148
149
|
direct_relation_by_property: dict[str, dm.DirectRelation] = {}
|
|
150
|
+
json_fields: list[str] = []
|
|
149
151
|
for prop_name, prop in view.properties.items():
|
|
150
152
|
if isinstance(prop, dm.EdgeConnection):
|
|
151
153
|
edge_by_property[prop_name] = prop
|
|
@@ -163,6 +165,9 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
163
165
|
)
|
|
164
166
|
)
|
|
165
167
|
continue
|
|
168
|
+
|
|
169
|
+
if data_type == Json:
|
|
170
|
+
json_fields.append(prop_name)
|
|
166
171
|
python_type = data_type.python
|
|
167
172
|
if prop.type.is_list:
|
|
168
173
|
python_type = list[python_type]
|
|
@@ -175,13 +180,29 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
175
180
|
field_definitions[prop_name] = (python_type, default_value)
|
|
176
181
|
|
|
177
182
|
def parse_list(cls, value: Any, info: ValidationInfo) -> list[str]:
|
|
178
|
-
if isinstance(value, list) and
|
|
183
|
+
if isinstance(value, list) and list.__name__ not in _get_field_value_types(cls, info):
|
|
179
184
|
if len(value) == 1:
|
|
180
185
|
return value[0]
|
|
181
186
|
raise ValueError(f"Got multiple values for {info.field_name}: {value}")
|
|
187
|
+
|
|
182
188
|
return value
|
|
183
189
|
|
|
184
|
-
|
|
190
|
+
def parse_json_string(cls, value: Any, info: ValidationInfo) -> dict:
|
|
191
|
+
if isinstance(value, dict):
|
|
192
|
+
return value
|
|
193
|
+
elif isinstance(value, str):
|
|
194
|
+
try:
|
|
195
|
+
return json.loads(value)
|
|
196
|
+
except json.JSONDecodeError as error:
|
|
197
|
+
raise ValueError(f"Not valid JSON string for {info.field_name}: {value}, error {error}") from error
|
|
198
|
+
else:
|
|
199
|
+
raise ValueError(f"Expect valid JSON string or dict for {info.field_name}: {value}")
|
|
200
|
+
|
|
201
|
+
if json_fields:
|
|
202
|
+
validators["parse_json_string"] = field_validator(*json_fields, mode="before")(parse_json_string) # type: ignore[assignment, arg-type]
|
|
203
|
+
|
|
204
|
+
validators["parse_list"] = field_validator("*", mode="before")(parse_list) # type: ignore[assignment, arg-type]
|
|
205
|
+
|
|
185
206
|
if direct_relation_by_property:
|
|
186
207
|
|
|
187
208
|
def parse_direct_relation(cls, value: list, info: ValidationInfo) -> dict | list[dict]:
|
|
@@ -280,7 +301,10 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
280
301
|
result.created.update(item.as_id() for item in e.successful)
|
|
281
302
|
yield result
|
|
282
303
|
else:
|
|
283
|
-
for instance_type, instances in {
|
|
304
|
+
for instance_type, instances in {
|
|
305
|
+
"Nodes": upserted.nodes,
|
|
306
|
+
"Edges": upserted.edges,
|
|
307
|
+
}.items():
|
|
284
308
|
result = UploadResult[InstanceId](name=instance_type, issues=read_issues)
|
|
285
309
|
for instance in instances: # type: ignore[attr-defined]
|
|
286
310
|
if instance.was_modified and instance.created_time == instance.last_updated_time:
|
|
@@ -292,6 +316,10 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
292
316
|
yield result
|
|
293
317
|
|
|
294
318
|
|
|
319
|
+
def _get_field_value_types(cls, info):
|
|
320
|
+
return [type_.__name__ for type_ in get_args(cls.model_fields[info.field_name].annotation)]
|
|
321
|
+
|
|
322
|
+
|
|
295
323
|
def _triples2dictionary(
|
|
296
324
|
triples: Iterable[tuple[str, str, str]],
|
|
297
325
|
) -> dict[str, dict[str, list[str]]]:
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/rules/importers/_inference2rules.py
RENAMED
|
@@ -75,7 +75,9 @@ class InferenceImporter(BaseImporter):
|
|
|
75
75
|
self.graph = graph
|
|
76
76
|
self.max_number_of_instance = max_number_of_instance
|
|
77
77
|
self.prefix = prefix
|
|
78
|
-
self.check_for_json_string =
|
|
78
|
+
self.check_for_json_string = (
|
|
79
|
+
check_for_json_string if graph.store.__class__.__name__ != "OxigraphStore" else False
|
|
80
|
+
)
|
|
79
81
|
|
|
80
82
|
@classmethod
|
|
81
83
|
def from_graph_store(
|
|
@@ -235,6 +237,7 @@ class InferenceImporter(BaseImporter):
|
|
|
235
237
|
query.replace("instance_id", instance)
|
|
236
238
|
): # type: ignore[misc]
|
|
237
239
|
property_id = remove_namespace_from_uri(property_uri)
|
|
240
|
+
|
|
238
241
|
self._add_uri_namespace_to_prefixes(cast(URIRef, property_uri), prefixes)
|
|
239
242
|
value_type_uri = data_type_uri if data_type_uri else object_type_uri
|
|
240
243
|
|
|
@@ -237,7 +237,7 @@ class Literal(DataType):
|
|
|
237
237
|
|
|
238
238
|
class Timeseries(DataType):
|
|
239
239
|
name = "timeseries"
|
|
240
|
-
python =
|
|
240
|
+
python = str
|
|
241
241
|
dms = dms.TimeSeriesReference
|
|
242
242
|
graphql = "TimeSeries"
|
|
243
243
|
xsd = "string"
|
|
@@ -246,7 +246,7 @@ class Timeseries(DataType):
|
|
|
246
246
|
|
|
247
247
|
class File(DataType):
|
|
248
248
|
name = "file"
|
|
249
|
-
python =
|
|
249
|
+
python = str
|
|
250
250
|
dms = dms.FileReference
|
|
251
251
|
graphql = "File"
|
|
252
252
|
xsd = "string"
|
|
@@ -255,7 +255,7 @@ class File(DataType):
|
|
|
255
255
|
|
|
256
256
|
class Sequence(DataType):
|
|
257
257
|
name = "sequence"
|
|
258
|
-
python =
|
|
258
|
+
python = str
|
|
259
259
|
dms = dms.SequenceReference
|
|
260
260
|
graphql = "Sequence"
|
|
261
261
|
xsd = "string"
|
|
@@ -264,7 +264,7 @@ class Sequence(DataType):
|
|
|
264
264
|
|
|
265
265
|
class Json(DataType):
|
|
266
266
|
name = "json"
|
|
267
|
-
python =
|
|
267
|
+
python = dict
|
|
268
268
|
dms = dms.Json
|
|
269
269
|
graphql = "Json"
|
|
270
270
|
xsd = "json"
|
|
@@ -2,6 +2,7 @@ import math
|
|
|
2
2
|
import re
|
|
3
3
|
import sys
|
|
4
4
|
import warnings
|
|
5
|
+
from collections import defaultdict
|
|
5
6
|
from datetime import datetime
|
|
6
7
|
from typing import TYPE_CHECKING, Any, ClassVar, Literal
|
|
7
8
|
|
|
@@ -390,3 +391,72 @@ class DMSRules(BaseRules):
|
|
|
390
391
|
from ._converter import _DMSRulesConverter
|
|
391
392
|
|
|
392
393
|
return _DMSRulesConverter(self).as_domain_rules()
|
|
394
|
+
|
|
395
|
+
def create_reference(
|
|
396
|
+
self, reference: "DMSRules", view_extension_mapping: dict[str, str], default_extension: str | None = None
|
|
397
|
+
) -> None:
|
|
398
|
+
"""Takes this data models and makes it into an extension of the reference data model.
|
|
399
|
+
|
|
400
|
+
The argument view_extension_mapping is a dictionary where the keys are views of this data model,
|
|
401
|
+
and each value is the view of the reference data model that the view should extend. For example:
|
|
402
|
+
|
|
403
|
+
```python
|
|
404
|
+
view_extension_mapping = {"Pump": "Asset"}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
This would make the view "Pump" in this data model extend the view "Asset" in the reference data model.
|
|
408
|
+
Note that all the keys in the dictionary must be external ids of views in this data model,
|
|
409
|
+
and all the values must be external ids of views in the reference data model.
|
|
410
|
+
|
|
411
|
+
Args:
|
|
412
|
+
reference: The reference data model
|
|
413
|
+
view_extension_mapping: A dictionary mapping views in this data model to views in the reference data model
|
|
414
|
+
default_extension: The default view in the reference data model that views in this
|
|
415
|
+
data model should extend if no mapping is provided.
|
|
416
|
+
|
|
417
|
+
"""
|
|
418
|
+
if self.reference is not None:
|
|
419
|
+
raise ValueError("Reference already exists")
|
|
420
|
+
self.reference = reference
|
|
421
|
+
view_by_external_id = {view.view.external_id: view for view in self.views}
|
|
422
|
+
ref_view_by_external_id = {view.view.external_id: view for view in reference.views}
|
|
423
|
+
|
|
424
|
+
if invalid_views := set(view_extension_mapping.keys()) - set(view_by_external_id.keys()):
|
|
425
|
+
raise ValueError(f"Views are not in this dat model {invalid_views}")
|
|
426
|
+
if invalid_views := set(view_extension_mapping.values()) - set(ref_view_by_external_id.keys()):
|
|
427
|
+
raise ValueError(f"Views are not in the reference data model {invalid_views}")
|
|
428
|
+
if default_extension and default_extension not in ref_view_by_external_id:
|
|
429
|
+
raise ValueError(f"Default extension view not in the reference data model {default_extension}")
|
|
430
|
+
|
|
431
|
+
properties_by_view_external_id: dict[str, dict[str, DMSProperty]] = defaultdict(dict)
|
|
432
|
+
for prop in self.properties:
|
|
433
|
+
properties_by_view_external_id[prop.view.external_id][prop.view_property] = prop
|
|
434
|
+
|
|
435
|
+
ref_properties_by_view_external_id: dict[str, dict[str, DMSProperty]] = defaultdict(dict)
|
|
436
|
+
for prop in reference.properties:
|
|
437
|
+
ref_properties_by_view_external_id[prop.view.external_id][prop.view_property] = prop
|
|
438
|
+
|
|
439
|
+
for view_external_id, view in view_by_external_id.items():
|
|
440
|
+
if view_external_id in view_extension_mapping:
|
|
441
|
+
ref_external_id = view_extension_mapping[view_external_id]
|
|
442
|
+
elif default_extension:
|
|
443
|
+
ref_external_id = default_extension
|
|
444
|
+
else:
|
|
445
|
+
continue
|
|
446
|
+
|
|
447
|
+
ref_view = ref_view_by_external_id[ref_external_id]
|
|
448
|
+
shared_properties = set(properties_by_view_external_id[view_external_id].keys()) & set(
|
|
449
|
+
ref_properties_by_view_external_id[ref_external_id].keys()
|
|
450
|
+
)
|
|
451
|
+
if shared_properties:
|
|
452
|
+
if view.implements is None:
|
|
453
|
+
view.implements = [ref_view.view]
|
|
454
|
+
elif isinstance(view.implements, list) and ref_view.view not in view.implements:
|
|
455
|
+
view.implements.append(ref_view.view)
|
|
456
|
+
for prop_name in shared_properties:
|
|
457
|
+
prop = properties_by_view_external_id[view_external_id][prop_name]
|
|
458
|
+
ref_prop = ref_properties_by_view_external_id[ref_external_id][prop_name]
|
|
459
|
+
if ref_prop.container and ref_prop.container_property:
|
|
460
|
+
prop.container = ref_prop.container
|
|
461
|
+
prop.container_property = ref_prop.container_property
|
|
462
|
+
prop.reference = ReferenceEntity.from_entity(ref_prop.view, ref_prop.view_property)
|
|
@@ -146,7 +146,9 @@ class DMSPropertyInput:
|
|
|
146
146
|
"Value Type": value_type,
|
|
147
147
|
"Property (linage)": self.property_ or self.view_property,
|
|
148
148
|
"Class (linage)": (
|
|
149
|
-
ClassEntity.load(self.class_, prefix=default_space, version=default_version)
|
|
149
|
+
ClassEntity.load(self.class_ or self.view, prefix=default_space, version=default_version)
|
|
150
|
+
if self.class_ or self.view
|
|
151
|
+
else None
|
|
150
152
|
),
|
|
151
153
|
"Name": self.name,
|
|
152
154
|
"Description": self.description,
|
|
@@ -499,6 +499,13 @@ class ReferenceEntity(ClassEntity):
|
|
|
499
499
|
prefix: str
|
|
500
500
|
property_: str | None = Field(None, alias="property")
|
|
501
501
|
|
|
502
|
+
@classmethod
|
|
503
|
+
def from_entity(cls, entity: Entity, property_: str) -> "ReferenceEntity":
|
|
504
|
+
if isinstance(entity, ClassEntity):
|
|
505
|
+
return cls(prefix=str(entity.prefix), suffix=entity.suffix, version=entity.version, property=property_)
|
|
506
|
+
else:
|
|
507
|
+
return cls(prefix=str(entity.prefix), suffix=entity.suffix, property=property_)
|
|
508
|
+
|
|
502
509
|
def as_view_id(self) -> ViewId:
|
|
503
510
|
if isinstance(self.prefix, _UndefinedType) or isinstance(self.suffix, _UnknownType):
|
|
504
511
|
raise ValueError("Prefix is not defined or suffix is unknown")
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.85.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/context_manager/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/context_manager/manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/api/routers/data_exploration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/asset-manifest.json
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/logo192.png
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/app/ui/neat-app/build/manifest.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_assets.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_events.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_files.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_classic_cdf/_labels.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/extractors/_mock_graph_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/graph/transformers/_classic_cdf.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/examples/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/extractors/_dexpi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/_asset_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/_exceptions.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/labels.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/core/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/loaders/validator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_graphdb_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_memory_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_oxigraph_store.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py
RENAMED
|
File without changes
|
{cognite_neat-0.85.10 → cognite_neat-0.85.12}/cognite/neat/legacy/graph/transformations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|