cognite-neat 0.78.0__tar.gz → 0.78.2__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.78.0 → cognite_neat-0.78.2}/PKG-INFO +1 -1
- cognite_neat-0.78.2/cognite/neat/_version.py +1 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_inference2rules.py +12 -1
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +3 -6
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +3 -8
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +2 -4
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +12 -17
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/entities.py +5 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/rules_importer.py +96 -11
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/pyproject.toml +1 -1
- cognite_neat-0.78.0/cognite/neat/_version.py +0 -1
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/LICENSE +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/README.md +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/configuration.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/explorer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/configuration.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/core.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/crud.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/data_exploration.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/metrics.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/routers/workflows.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/utils/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/utils/logging.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/main.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/monitoring/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/monitoring/metrics.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/index.html +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/config.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/constants.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/examples/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/extractors/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/models.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/models.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/transformer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/analysis.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-TNT.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_graph2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/tables.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/rules/models/value_types.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/py.typed +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/_shared.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/analysis/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/analysis/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/analysis/_information_rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/examples/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_models.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/dms.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/fileread.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/formatters.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/importing.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/spreadsheet.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/_types/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/_types/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/_types/_field.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/data_types.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_converter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_serializer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/domain.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/_converter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/_rules.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/_serializer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/information/_validation.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/models/wrapped_entities.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/auxiliary.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_classes.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_loaders/_base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_loaders/_data_modeling.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/spreadsheet.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/text.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/utils.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/utils/xml.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/_exceptions.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/base.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/cdf_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/manager.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/migration/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/migration/steps.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/model.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps/step_model.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/steps_registry.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/tasks.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/triggers.py +0 -0
- {cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/workflows/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.78.2"
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_inference2rules.py
RENAMED
|
@@ -7,6 +7,7 @@ from rdflib import Literal as RdfLiteral
|
|
|
7
7
|
|
|
8
8
|
import cognite.neat.rules.issues as issues
|
|
9
9
|
from cognite.neat.constants import PREFIXES
|
|
10
|
+
from cognite.neat.graph.stores import NeatGraphStoreBase
|
|
10
11
|
from cognite.neat.rules.importers._base import BaseImporter, Rules, _handle_issues
|
|
11
12
|
from cognite.neat.rules.issues import IssueList
|
|
12
13
|
from cognite.neat.rules.models import InformationRules, RoleTypes
|
|
@@ -42,13 +43,23 @@ class InferenceImporter(BaseImporter):
|
|
|
42
43
|
"""
|
|
43
44
|
|
|
44
45
|
def __init__(
|
|
45
|
-
self, issue_list: IssueList, graph: Graph,
|
|
46
|
+
self, issue_list: IssueList, graph: Graph, make_compliant: bool = False, max_number_of_instance: int = -1
|
|
46
47
|
):
|
|
47
48
|
self.issue_list = issue_list
|
|
48
49
|
self.graph = graph
|
|
49
50
|
self.max_number_of_instance = max_number_of_instance
|
|
50
51
|
self.make_compliant = make_compliant
|
|
51
52
|
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_graph_store(
|
|
55
|
+
cls, store: NeatGraphStoreBase, make_compliant: bool = False, max_number_of_instance: int = -1
|
|
56
|
+
):
|
|
57
|
+
issue_list = IssueList(title="Inferred from graph store")
|
|
58
|
+
|
|
59
|
+
return cls(
|
|
60
|
+
issue_list, store.graph, make_compliant=make_compliant, max_number_of_instance=max_number_of_instance
|
|
61
|
+
)
|
|
62
|
+
|
|
52
63
|
@classmethod
|
|
53
64
|
def from_rdf_file(cls, filepath: Path, make_compliant: bool = False, max_number_of_instance: int = -1):
|
|
54
65
|
issue_list = IssueList(title=f"'{filepath.name}'")
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py
RENAMED
|
@@ -8,19 +8,17 @@ from cognite.neat.rules.models._base import MatchType
|
|
|
8
8
|
from cognite.neat.utils.utils import remove_namespace
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def parse_owl_classes(graph: Graph,
|
|
11
|
+
def parse_owl_classes(graph: Graph, language: str = "en") -> list[dict]:
|
|
12
12
|
"""Parse owl classes from graph to pandas dataframe.
|
|
13
13
|
|
|
14
14
|
Args:
|
|
15
15
|
graph: Graph containing owl classes
|
|
16
|
-
make_compliant: Flag for generating compliant classes, by default False
|
|
17
16
|
language: Language to use for parsing, by default "en"
|
|
18
17
|
|
|
19
18
|
Returns:
|
|
20
19
|
Dataframe containing owl classes
|
|
21
20
|
|
|
22
|
-
!!! note "
|
|
23
|
-
If `make_compliant` is set to True, in presence of errors, default values will be used instead.
|
|
21
|
+
!!! note "Compliant OWL classes"
|
|
24
22
|
This makes the method very opinionated, but results in a compliant classes.
|
|
25
23
|
"""
|
|
26
24
|
|
|
@@ -48,8 +46,7 @@ def parse_owl_classes(graph: Graph, make_compliant: bool = False, language: str
|
|
|
48
46
|
processed_df = _clean_up_classes(raw_df)
|
|
49
47
|
|
|
50
48
|
# make compliant
|
|
51
|
-
|
|
52
|
-
processed_df = make_classes_compliant(processed_df)
|
|
49
|
+
processed_df = make_classes_compliant(processed_df)
|
|
53
50
|
|
|
54
51
|
# Make Parent Class list elements into string joined with comma
|
|
55
52
|
processed_df["Parent Class"] = processed_df["Parent Class"].apply(
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py
RENAMED
|
@@ -12,18 +12,16 @@ from cognite.neat.rules.models._types._base import (
|
|
|
12
12
|
from cognite.neat.utils.utils import convert_rdflib_content, remove_none_elements_from_set
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def parse_owl_metadata(graph: Graph
|
|
15
|
+
def parse_owl_metadata(graph: Graph) -> dict:
|
|
16
16
|
"""Parse owl metadata from graph to dict.
|
|
17
17
|
|
|
18
18
|
Args:
|
|
19
19
|
graph: Graph containing owl metadata
|
|
20
|
-
make_compliant: Flag for generating compliant metadata, by default False
|
|
21
20
|
|
|
22
21
|
Returns:
|
|
23
22
|
Dictionary containing owl metadata
|
|
24
23
|
|
|
25
|
-
!!! note "
|
|
26
|
-
If `make_compliant` is set to True, in presence of errors, default values will be used instead.
|
|
24
|
+
!!! note "Compliant OWL metadata"
|
|
27
25
|
This makes the method very opinionated, but results in a compliant metadata.
|
|
28
26
|
|
|
29
27
|
|
|
@@ -72,10 +70,7 @@ def parse_owl_metadata(graph: Graph, make_compliant: bool = False) -> dict:
|
|
|
72
70
|
}
|
|
73
71
|
)
|
|
74
72
|
|
|
75
|
-
|
|
76
|
-
return make_metadata_compliant(raw_metadata)
|
|
77
|
-
|
|
78
|
-
return raw_metadata
|
|
73
|
+
return make_metadata_compliant(raw_metadata)
|
|
79
74
|
|
|
80
75
|
|
|
81
76
|
def make_metadata_compliant(metadata: dict) -> dict:
|
|
@@ -10,12 +10,11 @@ from cognite.neat.utils.utils import remove_namespace
|
|
|
10
10
|
from ._owl2classes import _data_type_property_class, _object_property_class, _thing_class
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def parse_owl_properties(graph: Graph,
|
|
13
|
+
def parse_owl_properties(graph: Graph, language: str = "en") -> list[dict]:
|
|
14
14
|
"""Parse owl properties from graph to pandas dataframe.
|
|
15
15
|
|
|
16
16
|
Args:
|
|
17
17
|
graph: Graph containing owl properties
|
|
18
|
-
make_compliant: Flag for generating compliant properties, by default False
|
|
19
18
|
language: Language to use for parsing, by default "en"
|
|
20
19
|
|
|
21
20
|
Returns:
|
|
@@ -53,8 +52,7 @@ def parse_owl_properties(graph: Graph, make_compliant: bool = False, language: s
|
|
|
53
52
|
processed_df = _clean_up_properties(raw_df)
|
|
54
53
|
|
|
55
54
|
# make compliant
|
|
56
|
-
|
|
57
|
-
processed_df = make_properties_compliant(processed_df)
|
|
55
|
+
processed_df = make_properties_compliant(processed_df)
|
|
58
56
|
|
|
59
57
|
# drop column _property_type, which was a helper column:
|
|
60
58
|
processed_df.drop(columns=["_property_type"], inplace=True)
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py
RENAMED
|
@@ -21,25 +21,21 @@ class OWLImporter(BaseImporter):
|
|
|
21
21
|
|
|
22
22
|
Args:
|
|
23
23
|
filepath: Path to OWL ontology
|
|
24
|
-
make_compliant: If True, NEAT will attempt to make the imported rules compliant with CDF
|
|
25
24
|
|
|
26
25
|
!!! Note
|
|
27
|
-
OWL Ontologies
|
|
28
|
-
data model
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
OWL Ontologies are information models which completeness varies. As such, constructing functional
|
|
27
|
+
data model directly will often be impossible, therefore the produced Rules object will be ill formed.
|
|
28
|
+
To avoid this, neat will automatically attempt to make the imported rules compliant by adding default
|
|
29
|
+
values for missing information, attaching dangling properties to default containers based on the
|
|
30
|
+
property type, etc.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
properties to default containers based on the property type, etc. One has to be aware
|
|
35
|
-
that NEAT will be opinionated about how to make the ontology compliant, and that the resulting
|
|
36
|
-
rules may not be what you expect.
|
|
32
|
+
One has to be aware that NEAT will be opinionated about how to make the ontology
|
|
33
|
+
compliant, and that the resulting rules may not be what you expect.
|
|
37
34
|
|
|
38
35
|
"""
|
|
39
36
|
|
|
40
|
-
def __init__(self, filepath: Path
|
|
37
|
+
def __init__(self, filepath: Path):
|
|
41
38
|
self.owl_filepath = filepath
|
|
42
|
-
self.make_compliant = make_compliant
|
|
43
39
|
|
|
44
40
|
@overload
|
|
45
41
|
def to_rules(self, errors: Literal["raise"], role: RoleTypes | None = None) -> Rules: ...
|
|
@@ -67,13 +63,12 @@ class OWLImporter(BaseImporter):
|
|
|
67
63
|
graph.bind("skos", SKOS)
|
|
68
64
|
|
|
69
65
|
components = {
|
|
70
|
-
"Metadata": parse_owl_metadata(graph
|
|
71
|
-
"Classes": parse_owl_classes(graph
|
|
72
|
-
"Properties": parse_owl_properties(graph
|
|
66
|
+
"Metadata": parse_owl_metadata(graph),
|
|
67
|
+
"Classes": parse_owl_classes(graph),
|
|
68
|
+
"Properties": parse_owl_properties(graph),
|
|
73
69
|
}
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
components = make_components_compliant(components)
|
|
71
|
+
components = make_components_compliant(components)
|
|
77
72
|
|
|
78
73
|
rules = InformationRules.model_validate(components)
|
|
79
74
|
return self._to_output(rules, IssueList(), errors, role)
|
|
@@ -213,6 +213,11 @@ class Entity(BaseModel, extra="ignore"):
|
|
|
213
213
|
return f"{self.suffix!s}"
|
|
214
214
|
return f"{self.prefix}:{self.suffix!s}"
|
|
215
215
|
|
|
216
|
+
def as_dms_compliant_entity(self) -> "Self":
|
|
217
|
+
new_entity = self.model_copy(deep=True)
|
|
218
|
+
new_entity.suffix = replace_non_alphanumeric_with_underscore(new_entity.suffix)
|
|
219
|
+
return new_entity
|
|
220
|
+
|
|
216
221
|
|
|
217
222
|
T_Entity = TypeVar("T_Entity", bound=Entity)
|
|
218
223
|
|
|
@@ -20,6 +20,7 @@ __all__ = [
|
|
|
20
20
|
"ExcelToRules",
|
|
21
21
|
"OntologyToRules",
|
|
22
22
|
"DMSToRules",
|
|
23
|
+
"RulesInferenceFromRdfFile",
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
|
|
@@ -118,15 +119,6 @@ class OntologyToRules(Step):
|
|
|
118
119
|
label="For what role Rules are intended?",
|
|
119
120
|
options=["infer", *RoleTypes.__members__.keys()],
|
|
120
121
|
),
|
|
121
|
-
Configurable(
|
|
122
|
-
name="Make compliant",
|
|
123
|
-
value="True",
|
|
124
|
-
label=(
|
|
125
|
-
"Attempt to make the imported Rules compliant, by converting "
|
|
126
|
-
"the information model provided in the ontology to data model."
|
|
127
|
-
),
|
|
128
|
-
options=["True", "False"],
|
|
129
|
-
),
|
|
130
122
|
]
|
|
131
123
|
|
|
132
124
|
def run(self, flow_message: FlowMessage) -> (FlowMessage, MultiRuleData): # type: ignore[syntax, override]
|
|
@@ -135,7 +127,6 @@ class OntologyToRules(Step):
|
|
|
135
127
|
|
|
136
128
|
file_name = self.configs.get("File name", None)
|
|
137
129
|
full_path = flow_message.payload.get("full_path", None) if flow_message.payload else None
|
|
138
|
-
make_compliant = self.configs.get("Make compliant", "True") == "True"
|
|
139
130
|
|
|
140
131
|
if file_name:
|
|
141
132
|
rules_file_path = self.config.rules_store_path / file_name
|
|
@@ -151,7 +142,7 @@ class OntologyToRules(Step):
|
|
|
151
142
|
if role != "infer" and role is not None:
|
|
152
143
|
role_enum = RoleTypes[role]
|
|
153
144
|
|
|
154
|
-
ontology_importer = importers.OWLImporter(filepath=rules_file_path
|
|
145
|
+
ontology_importer = importers.OWLImporter(filepath=rules_file_path)
|
|
155
146
|
rules, issues = ontology_importer.to_rules(errors="continue", role=role_enum)
|
|
156
147
|
|
|
157
148
|
if rules is None:
|
|
@@ -259,3 +250,97 @@ class DMSToRules(Step):
|
|
|
259
250
|
output_text = "Rules import and validation passed successfully!"
|
|
260
251
|
|
|
261
252
|
return FlowMessage(output_text=output_text), MultiRuleData.from_rules(rules)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class RulesInferenceFromRdfFile(Step):
|
|
256
|
+
"""This step infers rules from the RDF file which contains knowledge graph."""
|
|
257
|
+
|
|
258
|
+
description = "This step infers rules from the RDF file which contains knowledge graph"
|
|
259
|
+
version = "private-beta"
|
|
260
|
+
category = CATEGORY
|
|
261
|
+
configurables: ClassVar[list[Configurable]] = [
|
|
262
|
+
Configurable(
|
|
263
|
+
name="File path",
|
|
264
|
+
value="staging/knowledge_graph.ttl",
|
|
265
|
+
label=("Relative path to the RDF file to be used for inference"),
|
|
266
|
+
),
|
|
267
|
+
Configurable(
|
|
268
|
+
name="Report formatter",
|
|
269
|
+
value=next(iter(FORMATTER_BY_NAME.keys())),
|
|
270
|
+
label="The format of the report for the validation of the rules",
|
|
271
|
+
options=list(FORMATTER_BY_NAME),
|
|
272
|
+
),
|
|
273
|
+
Configurable(
|
|
274
|
+
name="Role",
|
|
275
|
+
value="infer",
|
|
276
|
+
label="For what role Rules are intended?",
|
|
277
|
+
options=["infer", *RoleTypes.__members__.keys()],
|
|
278
|
+
),
|
|
279
|
+
Configurable(
|
|
280
|
+
name="Make compliant",
|
|
281
|
+
value="True",
|
|
282
|
+
label=(
|
|
283
|
+
"Attempt to make the imported Rules compliant, by fixing "
|
|
284
|
+
"redefinition of properties and by making ids of entities compliant with"
|
|
285
|
+
" CDF-allowed set of characters ."
|
|
286
|
+
),
|
|
287
|
+
options=["True", "False"],
|
|
288
|
+
),
|
|
289
|
+
Configurable(
|
|
290
|
+
name="Maximum number of instances to process",
|
|
291
|
+
value="-1",
|
|
292
|
+
label=(
|
|
293
|
+
"Maximum number of instances to process"
|
|
294
|
+
" to infer rules from the RDF file. Default -1 means all instances."
|
|
295
|
+
),
|
|
296
|
+
),
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
def run(self, flow_message: FlowMessage) -> (FlowMessage, MultiRuleData): # type: ignore[syntax, override]
|
|
300
|
+
if self.configs is None or self.data_store_path is None:
|
|
301
|
+
raise StepNotInitialized(type(self).__name__)
|
|
302
|
+
|
|
303
|
+
file_path = self.configs.get("File path", None)
|
|
304
|
+
full_path = flow_message.payload.get("full_path", None) if flow_message.payload else None
|
|
305
|
+
make_compliant = self.configs.get("Make compliant", "True") == "True"
|
|
306
|
+
|
|
307
|
+
try:
|
|
308
|
+
max_number_of_instance = int(self.configs.get("Maximum number of instances to process", -1))
|
|
309
|
+
except ValueError:
|
|
310
|
+
error_text = "Maximum number of instances to process should be an integer value"
|
|
311
|
+
return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
|
|
312
|
+
|
|
313
|
+
if file_path:
|
|
314
|
+
rdf_file_path = self.data_store_path / Path(file_path)
|
|
315
|
+
elif full_path:
|
|
316
|
+
rdf_file_path = full_path
|
|
317
|
+
else:
|
|
318
|
+
error_text = "Expected either 'File name' in the step config or 'File uploader' step uploading Excel Rules."
|
|
319
|
+
return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
|
|
320
|
+
|
|
321
|
+
# if role is None, it will be inferred from the rules file
|
|
322
|
+
role = self.configs.get("Role")
|
|
323
|
+
role_enum = None
|
|
324
|
+
if role != "infer" and role is not None:
|
|
325
|
+
role_enum = RoleTypes[role]
|
|
326
|
+
|
|
327
|
+
inference_importer = importers.InferenceImporter.from_rdf_file(
|
|
328
|
+
rdf_file_path, make_compliant=make_compliant, max_number_of_instance=max_number_of_instance
|
|
329
|
+
)
|
|
330
|
+
rules, issues = inference_importer.to_rules(errors="continue", role=role_enum)
|
|
331
|
+
|
|
332
|
+
if rules is None:
|
|
333
|
+
output_dir = self.config.staging_path
|
|
334
|
+
report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
|
|
335
|
+
report_writer.write_to_file(issues, file_or_dir_path=output_dir)
|
|
336
|
+
report_file = report_writer.default_file_name
|
|
337
|
+
error_text = (
|
|
338
|
+
"<p></p>"
|
|
339
|
+
f'<a href="/data/staging/{report_file}?{time.time()}" '
|
|
340
|
+
f'target="_blank">Failed to validate rules, click here for report</a>'
|
|
341
|
+
)
|
|
342
|
+
return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
|
|
343
|
+
|
|
344
|
+
output_text = "Rules validation passed successfully!"
|
|
345
|
+
|
|
346
|
+
return FlowMessage(output_text=output_text), MultiRuleData.from_rules(rules)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.78.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/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
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/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
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/_asset_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/_exceptions.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/labels.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/loaders/core/models.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/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.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_graphdb_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_memory_store.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_oxigraph_store.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py
RENAMED
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.78.0 → cognite_neat-0.78.2}/cognite/neat/legacy/graph/transformations/transformer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|