cognite-neat 0.81.6__tar.gz → 0.81.8__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.
Potentially problematic release.
This version of cognite-neat might be problematic. Click here for more details.
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/PKG-INFO +1 -1
- cognite_neat-0.81.8/cognite/neat/_version.py +1 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/stores/_base.py +7 -9
- cognite_neat-0.81.8/cognite/neat/graph/transformers/__init__.py +5 -0
- cognite_neat-0.81.8/cognite/neat/graph/transformers/_classic_cdf.py +135 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/pyproject.toml +1 -1
- cognite_neat-0.81.6/cognite/neat/_version.py +0 -1
- cognite_neat-0.81.6/cognite/neat/graph/transformers/__init__.py +0 -5
- cognite_neat-0.81.6/cognite/neat/graph/transformers/_classic_cdf.py +0 -59
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/LICENSE +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/README.md +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/configuration.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/explorer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/configuration.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/core.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/crud.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/data_exploration.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/metrics.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/routers/workflows.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/utils/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/utils/logging.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/main.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/monitoring/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/monitoring/metrics.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/index.html +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/config.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/constants.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/_shared.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/_tracking/base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/_tracking/log.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/examples/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/issues/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/issues/loader.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/loaders/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/models.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/stores/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/stores/_provenance.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/transformers/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/issues.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/models.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/transformer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/analysis.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-TNT.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_graph2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/tables.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/models/value_types.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/py.typed +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/_shared.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/analysis/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/analysis/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/analysis/_information_rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/examples/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_inference2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/dms.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/fileread.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/formatters.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/importing.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/spreadsheet.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_constants.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_types/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_types/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/_types/_field.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/data_types.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_converter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_serializer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/domain.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/entities.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/_converter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/_rules.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/_serializer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/information/_validation.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/rules/models/wrapped_entities.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/auxiliary.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_classes.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_loaders/_base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_loaders/_data_modeling.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/spreadsheet.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/text.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/upload.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/utils.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/utils/xml.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/_exceptions.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/base.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/cdf_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/manager.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/migration/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/migration/steps.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/model.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps/step_model.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/steps_registry.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/tasks.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/triggers.py +0 -0
- {cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/workflows/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.81.8"
|
|
@@ -234,15 +234,13 @@ class NeatGraphStore:
|
|
|
234
234
|
else:
|
|
235
235
|
_start = datetime.now(timezone.utc)
|
|
236
236
|
transformer.transform(self.graph)
|
|
237
|
-
self.provenance
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
)
|
|
245
|
-
]
|
|
237
|
+
self.provenance.append(
|
|
238
|
+
Change.record(
|
|
239
|
+
activity=f"{type(transformer).__name__}",
|
|
240
|
+
start=_start,
|
|
241
|
+
end=datetime.now(timezone.utc),
|
|
242
|
+
description=transformer.description,
|
|
243
|
+
)
|
|
246
244
|
)
|
|
247
245
|
|
|
248
246
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
from typing import cast
|
|
2
|
+
|
|
3
|
+
from rdflib import Graph, Literal, URIRef
|
|
4
|
+
|
|
5
|
+
from cognite.neat.constants import DEFAULT_NAMESPACE
|
|
6
|
+
from cognite.neat.graph import extractors
|
|
7
|
+
|
|
8
|
+
from ._base import BaseTransformer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AddAssetDepth(BaseTransformer):
|
|
12
|
+
description: str = "Adds depth of asset in the asset hierarchy to the graph"
|
|
13
|
+
_use_only_once: bool = True
|
|
14
|
+
_need_changes = frozenset({str(extractors.AssetsExtractor.__name__)})
|
|
15
|
+
|
|
16
|
+
_parent_template: str = """SELECT ?child ?parent WHERE {{
|
|
17
|
+
<{asset_id}> <{parent_prop}> ?child .
|
|
18
|
+
OPTIONAL{{?child <{parent_prop}>+ ?parent .}}}}"""
|
|
19
|
+
|
|
20
|
+
_root_template: str = """SELECT ?root WHERE {{
|
|
21
|
+
<{asset_id}> <{root_prop}> ?root .}}"""
|
|
22
|
+
|
|
23
|
+
def __init__(
|
|
24
|
+
self, asset_type: URIRef | None = None, root_prop: URIRef | None = None, parent_prop: URIRef | None = None
|
|
25
|
+
):
|
|
26
|
+
self.asset_type = asset_type or DEFAULT_NAMESPACE.Asset
|
|
27
|
+
self.root_prop = root_prop or DEFAULT_NAMESPACE.root
|
|
28
|
+
self.parent_prop = parent_prop or DEFAULT_NAMESPACE.parent
|
|
29
|
+
|
|
30
|
+
def transform(self, graph: Graph) -> None:
|
|
31
|
+
"""Adds depth of asset in the asset hierarchy to the graph."""
|
|
32
|
+
for result in graph.query(f"SELECT DISTINCT ?asset_id WHERE {{?asset_id a <{self.asset_type}>}}"):
|
|
33
|
+
asset_id = cast(tuple, result)[0]
|
|
34
|
+
if depth := self.get_depth(graph, asset_id, self.root_prop, self.parent_prop):
|
|
35
|
+
graph.add((asset_id, DEFAULT_NAMESPACE.depth, Literal(depth)))
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def get_depth(
|
|
39
|
+
cls,
|
|
40
|
+
graph: Graph,
|
|
41
|
+
asset_id: URIRef,
|
|
42
|
+
root_prop: URIRef,
|
|
43
|
+
parent_prop: URIRef,
|
|
44
|
+
) -> int | None:
|
|
45
|
+
"""Get asset depth in the asset hierarchy."""
|
|
46
|
+
|
|
47
|
+
# Handles non-root assets
|
|
48
|
+
if result := list(graph.query(cls._parent_template.format(asset_id=asset_id, parent_prop=parent_prop))):
|
|
49
|
+
return len(cast(list[tuple], result)) + 2 if cast(list[tuple], result)[0][1] else 2
|
|
50
|
+
|
|
51
|
+
# Handles root assets
|
|
52
|
+
elif (
|
|
53
|
+
(result := list(graph.query(cls._root_template.format(asset_id=asset_id, root_prop=root_prop))))
|
|
54
|
+
and len(cast(list[tuple], result)) == 1
|
|
55
|
+
and cast(list[tuple], result)[0][0] == asset_id
|
|
56
|
+
):
|
|
57
|
+
return 1
|
|
58
|
+
else:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class AssetTimeSeriesConnector(BaseTransformer):
|
|
63
|
+
description: str = "Connects assets to timeseries, thus forming bi-directional connection"
|
|
64
|
+
_use_only_once: bool = True
|
|
65
|
+
_need_changes = frozenset({str(extractors.AssetsExtractor.__name__), str(extractors.TimeSeriesExtractor.__name__)})
|
|
66
|
+
_asset_template: str = """SELECT ?asset_id WHERE {{
|
|
67
|
+
<{timeseries_id}> <{asset_prop}> ?asset_id .
|
|
68
|
+
?asset_id a <{asset_type}>}}"""
|
|
69
|
+
|
|
70
|
+
def __init__(
|
|
71
|
+
self,
|
|
72
|
+
asset_type: URIRef | None = None,
|
|
73
|
+
timeseries_type: URIRef | None = None,
|
|
74
|
+
asset_prop: URIRef | None = None,
|
|
75
|
+
):
|
|
76
|
+
self.asset_type = asset_type or DEFAULT_NAMESPACE.Asset
|
|
77
|
+
self.timeseries_type = timeseries_type or DEFAULT_NAMESPACE.TimeSeries
|
|
78
|
+
self.asset_prop = asset_prop or DEFAULT_NAMESPACE.asset
|
|
79
|
+
|
|
80
|
+
def transform(self, graph: Graph) -> None:
|
|
81
|
+
for ts_id_result in graph.query(
|
|
82
|
+
f"SELECT DISTINCT ?timeseries_id WHERE {{?timeseries_id a <{self.timeseries_type}>}}"
|
|
83
|
+
):
|
|
84
|
+
timeseries_id: URIRef = cast(tuple, ts_id_result)[0]
|
|
85
|
+
|
|
86
|
+
if asset_id_res := list(
|
|
87
|
+
graph.query(
|
|
88
|
+
self._asset_template.format(
|
|
89
|
+
timeseries_id=timeseries_id,
|
|
90
|
+
asset_prop=self.asset_prop,
|
|
91
|
+
asset_type=self.asset_type,
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
):
|
|
95
|
+
# timeseries can be connected to only one asset in the graph
|
|
96
|
+
asset_id = cast(list[tuple], asset_id_res)[0][0]
|
|
97
|
+
graph.add((asset_id, DEFAULT_NAMESPACE.timeSeries, timeseries_id))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class AssetSequenceConnector(BaseTransformer):
|
|
101
|
+
description: str = "Connects assets to sequences, thus forming bi-directional connection"
|
|
102
|
+
_use_only_once: bool = True
|
|
103
|
+
_need_changes = frozenset({str(extractors.AssetsExtractor.__name__), str(extractors.SequencesExtractor.__name__)})
|
|
104
|
+
_asset_template: str = """SELECT ?asset_id WHERE {{
|
|
105
|
+
<{sequence_id}> <{asset_prop}> ?asset_id .
|
|
106
|
+
?asset_id a <{asset_type}>}}"""
|
|
107
|
+
|
|
108
|
+
def __init__(
|
|
109
|
+
self,
|
|
110
|
+
asset_type: URIRef | None = None,
|
|
111
|
+
sequence_type: URIRef | None = None,
|
|
112
|
+
asset_prop: URIRef | None = None,
|
|
113
|
+
):
|
|
114
|
+
self.asset_type = asset_type or DEFAULT_NAMESPACE.Asset
|
|
115
|
+
self.sequence_type = sequence_type or DEFAULT_NAMESPACE.Sequence
|
|
116
|
+
self.asset_prop = asset_prop or DEFAULT_NAMESPACE.asset
|
|
117
|
+
|
|
118
|
+
def transform(self, graph: Graph) -> None:
|
|
119
|
+
for sequency_id_result in graph.query(
|
|
120
|
+
f"SELECT DISTINCT ?sequence_id WHERE {{?sequence_id a <{self.sequence_type}>}}"
|
|
121
|
+
):
|
|
122
|
+
sequence_id: URIRef = cast(tuple, sequency_id_result)[0]
|
|
123
|
+
|
|
124
|
+
if asset_id_res := list(
|
|
125
|
+
graph.query(
|
|
126
|
+
self._asset_template.format(
|
|
127
|
+
sequence_id=sequence_id,
|
|
128
|
+
asset_prop=self.asset_prop,
|
|
129
|
+
asset_type=self.asset_type,
|
|
130
|
+
)
|
|
131
|
+
)
|
|
132
|
+
):
|
|
133
|
+
# sequence can be connected to only one asset in the graph
|
|
134
|
+
asset_id = cast(list[tuple], asset_id_res)[0][0]
|
|
135
|
+
graph.add((asset_id, DEFAULT_NAMESPACE.sequence, sequence_id))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.81.6"
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
from typing import cast
|
|
2
|
-
|
|
3
|
-
from rdflib import Graph, Literal, URIRef
|
|
4
|
-
|
|
5
|
-
from cognite.neat.constants import DEFAULT_NAMESPACE
|
|
6
|
-
from cognite.neat.graph.extractors import AssetsExtractor
|
|
7
|
-
|
|
8
|
-
from ._base import BaseTransformer
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class AddAssetDepth(BaseTransformer):
|
|
12
|
-
description: str = "Adds depth of asset in the asset hierarchy to the graph"
|
|
13
|
-
_use_only_once: bool = True
|
|
14
|
-
_need_changes = frozenset({str(AssetsExtractor.__name__)})
|
|
15
|
-
|
|
16
|
-
_parent_template: str = """SELECT ?child ?parent WHERE {{
|
|
17
|
-
<{asset_id}> <{parent_prop}> ?child .
|
|
18
|
-
OPTIONAL{{?child <{parent_prop}>+ ?parent .}}}}"""
|
|
19
|
-
|
|
20
|
-
_root_template: str = """SELECT ?root WHERE {{
|
|
21
|
-
<{asset_id}> <{root_prop}> ?root .}}"""
|
|
22
|
-
|
|
23
|
-
def __init__(
|
|
24
|
-
self, asset_type: URIRef | None = None, root_prop: URIRef | None = None, parent_prop: URIRef | None = None
|
|
25
|
-
):
|
|
26
|
-
self.asset_type = asset_type or DEFAULT_NAMESPACE.Asset
|
|
27
|
-
self.root_prop = root_prop or DEFAULT_NAMESPACE.root
|
|
28
|
-
self.parent_prop = parent_prop or DEFAULT_NAMESPACE.parent
|
|
29
|
-
|
|
30
|
-
def transform(self, graph: Graph) -> None:
|
|
31
|
-
"""Adds depth of asset in the asset hierarchy to the graph."""
|
|
32
|
-
for result in graph.query(f"SELECT DISTINCT ?asset_id WHERE {{?asset_id a <{self.asset_type}>}}"):
|
|
33
|
-
asset_id = cast(tuple, result)[0]
|
|
34
|
-
if depth := self.get_depth(graph, asset_id, self.root_prop, self.parent_prop):
|
|
35
|
-
graph.add((asset_id, DEFAULT_NAMESPACE.depth, Literal(depth)))
|
|
36
|
-
|
|
37
|
-
@classmethod
|
|
38
|
-
def get_depth(
|
|
39
|
-
cls,
|
|
40
|
-
graph: Graph,
|
|
41
|
-
asset_id: URIRef,
|
|
42
|
-
root_prop: URIRef,
|
|
43
|
-
parent_prop: URIRef,
|
|
44
|
-
) -> int | None:
|
|
45
|
-
"""Get asset depth in the asset hierarchy."""
|
|
46
|
-
|
|
47
|
-
# Handles non-root assets
|
|
48
|
-
if res := list(graph.query(cls._parent_template.format(asset_id=asset_id, parent_prop=parent_prop))):
|
|
49
|
-
return len(cast(list[tuple], res)) + 2 if cast(list[tuple], res)[0][1] else 2
|
|
50
|
-
|
|
51
|
-
# Handles root assets
|
|
52
|
-
elif (
|
|
53
|
-
(res := list(graph.query(cls._root_template.format(asset_id=asset_id, root_prop=root_prop))))
|
|
54
|
-
and len(cast(list[tuple], res)) == 1
|
|
55
|
-
and cast(list[tuple], res)[0][0] == asset_id
|
|
56
|
-
):
|
|
57
|
-
return 1
|
|
58
|
-
else:
|
|
59
|
-
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/api/context_manager/__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
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/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.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/asset-manifest.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/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
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_assets.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_events.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_files.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_labels.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/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
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/extractors/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/_asset_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/_exceptions.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/labels.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/models.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.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.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_graphdb_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_memory_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_oxigraph_store.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/graph/transformations/transformer.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
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/power-grid-model.yaml
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/rules-template.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/skos-rules.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/examples/wind-energy.owl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2dms.py
RENAMED
|
File without changes
|
{cognite_neat-0.81.6 → cognite_neat-0.81.8}/cognite/neat/legacy/rules/exporters/_rules2excel.py
RENAMED
|
File without changes
|