cognite-neat 0.81.0__tar.gz → 0.81.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.81.0 → cognite_neat-0.81.2}/PKG-INFO +1 -1
- cognite_neat-0.81.2/cognite/neat/_version.py +1 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +8 -9
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_events.py +8 -9
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_files.py +10 -11
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +4 -5
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +12 -13
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +10 -7
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +10 -7
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/dms.py +25 -0
- cognite_neat-0.81.2/cognite/neat/rules/models/_constants.py +1 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_validation.py +18 -4
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_converter.py +10 -3
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/pyproject.toml +1 -1
- cognite_neat-0.81.0/cognite/neat/_version.py +0 -1
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/LICENSE +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/README.md +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/configuration.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/explorer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/configuration.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/core.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/crud.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/data_exploration.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/metrics.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/routers/workflows.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/utils/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/utils/logging.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/main.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/monitoring/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/monitoring/metrics.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/index.html +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/config.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/constants.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/_shared.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/_tracking/base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/_tracking/log.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/examples/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/issues/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/issues/loader.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/loaders/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/models.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/stores/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/stores/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/stores/_provenance.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/issues.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/models.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/graph/transformations/transformer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/analysis.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-TNT.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_graph2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/tables.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/rules/models/value_types.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/py.typed +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/_shared.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/analysis/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/analysis/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/analysis/_information_rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/examples/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_inference2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/fileread.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/formatters.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/importing.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/spreadsheet.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/_types/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/_types/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/_types/_field.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/data_types.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_converter.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/dms/_serializer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/domain.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/entities.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_rules.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_serializer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_validation.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/wrapped_entities.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/auxiliary.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_classes.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_loaders/_base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_loaders/_data_modeling.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/spreadsheet.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/text.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/upload.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/utils.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/utils/xml.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/_exceptions.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/base.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/cdf_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/manager.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/migration/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/migration/steps.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/model.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps/step_model.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/steps_registry.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/tasks.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/triggers.py +0 -0
- {cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/workflows/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.81.2"
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_assets.py
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
from urllib.parse import quote
|
|
6
6
|
|
|
7
|
-
import pytz
|
|
8
7
|
from cognite.client import CogniteClient
|
|
9
8
|
from cognite.client.data_classes import Asset, AssetList
|
|
10
9
|
from rdflib import RDF, Literal, Namespace
|
|
@@ -49,7 +48,7 @@ class AssetsExtractor(BaseExtractor):
|
|
|
49
48
|
@classmethod
|
|
50
49
|
def _asset2triples(cls, asset: Asset, namespace: Namespace) -> list[Triple]:
|
|
51
50
|
"""Converts an asset to triples."""
|
|
52
|
-
id_ = namespace[
|
|
51
|
+
id_ = namespace[f"Asset_{asset.id}"]
|
|
53
52
|
|
|
54
53
|
# Set rdf type
|
|
55
54
|
triples: list[Triple] = [(id_, RDF.type, namespace["Asset"])]
|
|
@@ -72,14 +71,14 @@ class AssetsExtractor(BaseExtractor):
|
|
|
72
71
|
(
|
|
73
72
|
id_,
|
|
74
73
|
namespace.created_time,
|
|
75
|
-
Literal(datetime.fromtimestamp(asset.created_time / 1000,
|
|
74
|
+
Literal(datetime.fromtimestamp(asset.created_time / 1000, timezone.utc)),
|
|
76
75
|
)
|
|
77
76
|
)
|
|
78
77
|
triples.append(
|
|
79
78
|
(
|
|
80
79
|
id_,
|
|
81
80
|
namespace.last_updated_time,
|
|
82
|
-
Literal(datetime.fromtimestamp(asset.last_updated_time / 1000,
|
|
81
|
+
Literal(datetime.fromtimestamp(asset.last_updated_time / 1000, timezone.utc)),
|
|
83
82
|
)
|
|
84
83
|
)
|
|
85
84
|
|
|
@@ -87,7 +86,7 @@ class AssetsExtractor(BaseExtractor):
|
|
|
87
86
|
for label in asset.labels:
|
|
88
87
|
# external_id can create ill-formed URIs, so we create websafe URIs
|
|
89
88
|
# since labels do not have internal ids, we use the external_id as the id
|
|
90
|
-
triples.append((id_, namespace.label, namespace[quote(label.dump()[
|
|
89
|
+
triples.append((id_, namespace.label, namespace[f"Label_{quote(label.dump()['externalId'])}"]))
|
|
91
90
|
|
|
92
91
|
if asset.metadata:
|
|
93
92
|
for key, value in asset.metadata.items():
|
|
@@ -96,12 +95,12 @@ class AssetsExtractor(BaseExtractor):
|
|
|
96
95
|
|
|
97
96
|
# Create connections:
|
|
98
97
|
if asset.parent_id:
|
|
99
|
-
triples.append((id_, namespace.parent, namespace[
|
|
98
|
+
triples.append((id_, namespace.parent, namespace[f"Asset_{asset.parent_id}"]))
|
|
100
99
|
|
|
101
100
|
if asset.root_id:
|
|
102
|
-
triples.append((id_, namespace.root, namespace[
|
|
101
|
+
triples.append((id_, namespace.root, namespace[f"Asset_{asset.root_id}"]))
|
|
103
102
|
|
|
104
103
|
if asset.data_set_id:
|
|
105
|
-
triples.append((id_, namespace.dataset, namespace[
|
|
104
|
+
triples.append((id_, namespace.dataset, namespace[f"Dataset_{asset.data_set_id}"]))
|
|
106
105
|
|
|
107
106
|
return triples
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_events.py
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
|
|
6
|
-
import pytz
|
|
7
6
|
from cognite.client import CogniteClient
|
|
8
7
|
from cognite.client.data_classes import Event, EventList
|
|
9
8
|
from pydantic import AnyHttpUrl, ValidationError
|
|
@@ -44,7 +43,7 @@ class EventsExtractor(BaseExtractor):
|
|
|
44
43
|
|
|
45
44
|
@classmethod
|
|
46
45
|
def _event2triples(cls, event: Event, namespace: Namespace) -> list[Triple]:
|
|
47
|
-
id_ = namespace[
|
|
46
|
+
id_ = namespace[f"Event_{event.id}"]
|
|
48
47
|
|
|
49
48
|
# Set rdf type
|
|
50
49
|
triples: list[Triple] = [(id_, RDF.type, namespace.Event)]
|
|
@@ -77,7 +76,7 @@ class EventsExtractor(BaseExtractor):
|
|
|
77
76
|
|
|
78
77
|
if event.created_time:
|
|
79
78
|
triples.append(
|
|
80
|
-
(id_, namespace.created_time, Literal(datetime.fromtimestamp(event.created_time / 1000,
|
|
79
|
+
(id_, namespace.created_time, Literal(datetime.fromtimestamp(event.created_time / 1000, timezone.utc)))
|
|
81
80
|
)
|
|
82
81
|
|
|
83
82
|
if event.last_updated_time:
|
|
@@ -85,7 +84,7 @@ class EventsExtractor(BaseExtractor):
|
|
|
85
84
|
(
|
|
86
85
|
id_,
|
|
87
86
|
namespace.last_updated_time,
|
|
88
|
-
Literal(datetime.fromtimestamp(event.last_updated_time / 1000,
|
|
87
|
+
Literal(datetime.fromtimestamp(event.last_updated_time / 1000, timezone.utc)),
|
|
89
88
|
)
|
|
90
89
|
)
|
|
91
90
|
|
|
@@ -94,7 +93,7 @@ class EventsExtractor(BaseExtractor):
|
|
|
94
93
|
(
|
|
95
94
|
id_,
|
|
96
95
|
namespace.start_time,
|
|
97
|
-
Literal(datetime.fromtimestamp(event.start_time / 1000,
|
|
96
|
+
Literal(datetime.fromtimestamp(event.start_time / 1000, timezone.utc)),
|
|
98
97
|
)
|
|
99
98
|
)
|
|
100
99
|
|
|
@@ -103,15 +102,15 @@ class EventsExtractor(BaseExtractor):
|
|
|
103
102
|
(
|
|
104
103
|
id_,
|
|
105
104
|
namespace.end_time,
|
|
106
|
-
Literal(datetime.fromtimestamp(event.end_time / 1000,
|
|
105
|
+
Literal(datetime.fromtimestamp(event.end_time / 1000, timezone.utc)),
|
|
107
106
|
)
|
|
108
107
|
)
|
|
109
108
|
|
|
110
109
|
if event.data_set_id:
|
|
111
|
-
triples.append((id_, namespace.data_set_id, namespace[
|
|
110
|
+
triples.append((id_, namespace.data_set_id, namespace[f"Dataset_{event.data_set_id}"]))
|
|
112
111
|
|
|
113
112
|
if event.asset_ids:
|
|
114
113
|
for asset_id in event.asset_ids:
|
|
115
|
-
triples.append((id_, namespace.asset, namespace[
|
|
114
|
+
triples.append((id_, namespace.asset, namespace[f"Asset_{asset_id}"]))
|
|
116
115
|
|
|
117
116
|
return triples
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_files.py
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
from urllib.parse import quote
|
|
6
6
|
|
|
7
|
-
import pytz
|
|
8
7
|
from cognite.client import CogniteClient
|
|
9
8
|
from cognite.client.data_classes import FileMetadata, FileMetadataList
|
|
10
9
|
from pydantic import AnyHttpUrl, ValidationError
|
|
@@ -45,7 +44,7 @@ class FilesExtractor(BaseExtractor):
|
|
|
45
44
|
|
|
46
45
|
@classmethod
|
|
47
46
|
def _file2triples(cls, file: FileMetadata, namespace: Namespace) -> list[Triple]:
|
|
48
|
-
id_ = namespace[
|
|
47
|
+
id_ = namespace[f"File_{file.id}"]
|
|
49
48
|
|
|
50
49
|
# Set rdf type
|
|
51
50
|
triples: list[Triple] = [(id_, RDF.type, namespace.File)]
|
|
@@ -81,7 +80,7 @@ class FilesExtractor(BaseExtractor):
|
|
|
81
80
|
(
|
|
82
81
|
id_,
|
|
83
82
|
namespace.source_created_time,
|
|
84
|
-
Literal(datetime.fromtimestamp(file.source_created_time / 1000,
|
|
83
|
+
Literal(datetime.fromtimestamp(file.source_created_time / 1000, timezone.utc)),
|
|
85
84
|
)
|
|
86
85
|
)
|
|
87
86
|
if file.source_modified_time:
|
|
@@ -89,17 +88,17 @@ class FilesExtractor(BaseExtractor):
|
|
|
89
88
|
(
|
|
90
89
|
id_,
|
|
91
90
|
namespace.source_created_time,
|
|
92
|
-
Literal(datetime.fromtimestamp(file.source_modified_time / 1000,
|
|
91
|
+
Literal(datetime.fromtimestamp(file.source_modified_time / 1000, timezone.utc)),
|
|
93
92
|
)
|
|
94
93
|
)
|
|
95
94
|
if file.uploaded_time:
|
|
96
95
|
triples.append(
|
|
97
|
-
(id_, namespace.uploaded_time, Literal(datetime.fromtimestamp(file.uploaded_time / 1000,
|
|
96
|
+
(id_, namespace.uploaded_time, Literal(datetime.fromtimestamp(file.uploaded_time / 1000, timezone.utc)))
|
|
98
97
|
)
|
|
99
98
|
|
|
100
99
|
if file.created_time:
|
|
101
100
|
triples.append(
|
|
102
|
-
(id_, namespace.created_time, Literal(datetime.fromtimestamp(file.created_time / 1000,
|
|
101
|
+
(id_, namespace.created_time, Literal(datetime.fromtimestamp(file.created_time / 1000, timezone.utc)))
|
|
103
102
|
)
|
|
104
103
|
|
|
105
104
|
if file.last_updated_time:
|
|
@@ -107,7 +106,7 @@ class FilesExtractor(BaseExtractor):
|
|
|
107
106
|
(
|
|
108
107
|
id_,
|
|
109
108
|
namespace.last_updated_time,
|
|
110
|
-
Literal(datetime.fromtimestamp(file.last_updated_time / 1000,
|
|
109
|
+
Literal(datetime.fromtimestamp(file.last_updated_time / 1000, timezone.utc)),
|
|
111
110
|
)
|
|
112
111
|
)
|
|
113
112
|
|
|
@@ -115,17 +114,17 @@ class FilesExtractor(BaseExtractor):
|
|
|
115
114
|
for label in file.labels:
|
|
116
115
|
# external_id can create ill-formed URIs, so we create websafe URIs
|
|
117
116
|
# since labels do not have internal ids, we use the external_id as the id
|
|
118
|
-
triples.append((id_, namespace.label, namespace[quote(label.dump()[
|
|
117
|
+
triples.append((id_, namespace.label, namespace[f"Label_{quote(label.dump()['externalId'])}"]))
|
|
119
118
|
|
|
120
119
|
if file.security_categories:
|
|
121
120
|
for category in file.security_categories:
|
|
122
121
|
triples.append((id_, namespace.security_categories, Literal(category)))
|
|
123
122
|
|
|
124
123
|
if file.data_set_id:
|
|
125
|
-
triples.append((id_, namespace.data_set_id, namespace[
|
|
124
|
+
triples.append((id_, namespace.data_set_id, namespace[f"Dataset_{file.data_set_id}"]))
|
|
126
125
|
|
|
127
126
|
if file.asset_ids:
|
|
128
127
|
for asset_id in file.asset_ids:
|
|
129
|
-
triples.append((id_, namespace.asset, namespace[
|
|
128
|
+
triples.append((id_, namespace.asset, namespace[f"Asset_{asset_id}"]))
|
|
130
129
|
|
|
131
130
|
return triples
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_labels.py
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
from urllib.parse import quote
|
|
6
6
|
|
|
7
|
-
import pytz
|
|
8
7
|
from cognite.client import CogniteClient
|
|
9
8
|
from cognite.client.data_classes import LabelDefinition, LabelDefinitionList
|
|
10
9
|
from rdflib import RDF, Literal, Namespace
|
|
@@ -45,7 +44,7 @@ class LabelsExtractor(BaseExtractor):
|
|
|
45
44
|
|
|
46
45
|
@classmethod
|
|
47
46
|
def _labels2triples(cls, label: LabelDefinition, namespace: Namespace) -> list[Triple]:
|
|
48
|
-
id_ = namespace[quote(
|
|
47
|
+
id_ = namespace[f"Label_{quote(label.dump()['externalId'])}"]
|
|
49
48
|
|
|
50
49
|
# Set rdf type
|
|
51
50
|
triples: list[Triple] = [(id_, RDF.type, namespace.Label)]
|
|
@@ -63,10 +62,10 @@ class LabelsExtractor(BaseExtractor):
|
|
|
63
62
|
|
|
64
63
|
if label.created_time:
|
|
65
64
|
triples.append(
|
|
66
|
-
(id_, namespace.created_time, Literal(datetime.fromtimestamp(label.created_time / 1000,
|
|
65
|
+
(id_, namespace.created_time, Literal(datetime.fromtimestamp(label.created_time / 1000, timezone.utc)))
|
|
67
66
|
)
|
|
68
67
|
|
|
69
68
|
if label.data_set_id:
|
|
70
|
-
triples.append((id_, namespace.data_set_id, namespace[
|
|
69
|
+
triples.append((id_, namespace.data_set_id, namespace[f"Dataset_{label.data_set_id}"]))
|
|
71
70
|
|
|
72
71
|
return triples
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import uuid
|
|
2
2
|
from collections.abc import Iterable
|
|
3
|
-
from datetime import datetime
|
|
3
|
+
from datetime import datetime, timezone
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import cast
|
|
6
6
|
from urllib.parse import quote
|
|
7
7
|
|
|
8
|
-
import pytz
|
|
9
8
|
from cognite.client import CogniteClient
|
|
10
9
|
from cognite.client.data_classes import Relationship, RelationshipList
|
|
11
10
|
from rdflib import RDF, Literal, Namespace
|
|
@@ -49,27 +48,27 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
49
48
|
"""Converts an asset to triples."""
|
|
50
49
|
|
|
51
50
|
# relationships do not have an internal id, so we generate one
|
|
52
|
-
id_ = namespace[
|
|
51
|
+
id_ = namespace[f"Relationship_{uuid.uuid4()}"]
|
|
53
52
|
|
|
54
53
|
# Set rdf type
|
|
55
54
|
triples: list[Triple] = [(id_, RDF.type, namespace["Relationship"])]
|
|
56
55
|
|
|
57
56
|
# Set source and target types
|
|
58
|
-
if relationship.source_type:
|
|
57
|
+
if source_type := relationship.source_type:
|
|
59
58
|
triples.append(
|
|
60
59
|
(
|
|
61
60
|
id_,
|
|
62
61
|
namespace.source_type,
|
|
63
|
-
namespace[
|
|
62
|
+
namespace[source_type.title()],
|
|
64
63
|
)
|
|
65
64
|
)
|
|
66
65
|
|
|
67
|
-
if relationship.target_type:
|
|
66
|
+
if target_type := relationship.target_type:
|
|
68
67
|
triples.append(
|
|
69
68
|
(
|
|
70
69
|
id_,
|
|
71
70
|
namespace.target_type,
|
|
72
|
-
namespace[
|
|
71
|
+
namespace[target_type.title()],
|
|
73
72
|
)
|
|
74
73
|
)
|
|
75
74
|
|
|
@@ -100,7 +99,7 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
100
99
|
(
|
|
101
100
|
id_,
|
|
102
101
|
namespace.start_time,
|
|
103
|
-
Literal(datetime.fromtimestamp(relationship.start_time / 1000,
|
|
102
|
+
Literal(datetime.fromtimestamp(relationship.start_time / 1000, timezone.utc)),
|
|
104
103
|
)
|
|
105
104
|
)
|
|
106
105
|
|
|
@@ -109,7 +108,7 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
109
108
|
(
|
|
110
109
|
id_,
|
|
111
110
|
namespace.end_time,
|
|
112
|
-
Literal(datetime.fromtimestamp(relationship.end_time / 1000,
|
|
111
|
+
Literal(datetime.fromtimestamp(relationship.end_time / 1000, timezone.utc)),
|
|
113
112
|
)
|
|
114
113
|
)
|
|
115
114
|
|
|
@@ -118,7 +117,7 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
118
117
|
(
|
|
119
118
|
id_,
|
|
120
119
|
namespace.created_time,
|
|
121
|
-
Literal(datetime.fromtimestamp(relationship.created_time / 1000,
|
|
120
|
+
Literal(datetime.fromtimestamp(relationship.created_time / 1000, timezone.utc)),
|
|
122
121
|
)
|
|
123
122
|
)
|
|
124
123
|
|
|
@@ -127,7 +126,7 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
127
126
|
(
|
|
128
127
|
id_,
|
|
129
128
|
namespace.last_updated_time,
|
|
130
|
-
Literal(datetime.fromtimestamp(relationship.last_updated_time / 1000,
|
|
129
|
+
Literal(datetime.fromtimestamp(relationship.last_updated_time / 1000, timezone.utc)),
|
|
131
130
|
)
|
|
132
131
|
)
|
|
133
132
|
|
|
@@ -144,10 +143,10 @@ class RelationshipsExtractor(BaseExtractor):
|
|
|
144
143
|
for label in relationship.labels:
|
|
145
144
|
# external_id can create ill-formed URIs, so we create websafe URIs
|
|
146
145
|
# since labels do not have internal ids, we use the external_id as the id
|
|
147
|
-
triples.append((id_, namespace.label, namespace[quote(label.dump()[
|
|
146
|
+
triples.append((id_, namespace.label, namespace[f"Label_{quote(label.dump()['externalId'])}"]))
|
|
148
147
|
|
|
149
148
|
# Create connection
|
|
150
149
|
if relationship.data_set_id:
|
|
151
|
-
triples.append((id_, namespace.dataset, namespace[
|
|
150
|
+
triples.append((id_, namespace.dataset, namespace[f"Dataset_{relationship.data_set_id}"]))
|
|
152
151
|
|
|
153
152
|
return triples
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
|
|
6
|
-
import pytz
|
|
7
6
|
from cognite.client import CogniteClient
|
|
8
7
|
from cognite.client.data_classes import Sequence, SequenceList
|
|
9
8
|
from pydantic import AnyHttpUrl, ValidationError
|
|
@@ -44,7 +43,7 @@ class SequencesExtractor(BaseExtractor):
|
|
|
44
43
|
|
|
45
44
|
@classmethod
|
|
46
45
|
def _sequence2triples(cls, sequence: Sequence, namespace: Namespace) -> list[Triple]:
|
|
47
|
-
id_ = namespace[
|
|
46
|
+
id_ = namespace[f"Sequence_{sequence.id}"]
|
|
48
47
|
|
|
49
48
|
# Set rdf type
|
|
50
49
|
triples: list[Triple] = [(id_, RDF.type, namespace.Sequence)]
|
|
@@ -71,7 +70,11 @@ class SequencesExtractor(BaseExtractor):
|
|
|
71
70
|
|
|
72
71
|
if sequence.created_time:
|
|
73
72
|
triples.append(
|
|
74
|
-
(
|
|
73
|
+
(
|
|
74
|
+
id_,
|
|
75
|
+
namespace.created_time,
|
|
76
|
+
Literal(datetime.fromtimestamp(sequence.created_time / 1000, timezone.utc)),
|
|
77
|
+
)
|
|
75
78
|
)
|
|
76
79
|
|
|
77
80
|
if sequence.last_updated_time:
|
|
@@ -79,14 +82,14 @@ class SequencesExtractor(BaseExtractor):
|
|
|
79
82
|
(
|
|
80
83
|
id_,
|
|
81
84
|
namespace.last_updated_time,
|
|
82
|
-
Literal(datetime.fromtimestamp(sequence.last_updated_time / 1000,
|
|
85
|
+
Literal(datetime.fromtimestamp(sequence.last_updated_time / 1000, timezone.utc)),
|
|
83
86
|
)
|
|
84
87
|
)
|
|
85
88
|
|
|
86
89
|
if sequence.data_set_id:
|
|
87
|
-
triples.append((id_, namespace.data_set_id, namespace[
|
|
90
|
+
triples.append((id_, namespace.data_set_id, namespace[f"Dataset_{sequence.data_set_id}"]))
|
|
88
91
|
|
|
89
92
|
if sequence.asset_id:
|
|
90
|
-
triples.append((id_, namespace.asset, namespace[
|
|
93
|
+
triples.append((id_, namespace.asset, namespace[f"Asset_{sequence.asset_id}"]))
|
|
91
94
|
|
|
92
95
|
return triples
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
|
-
from datetime import datetime
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import cast
|
|
5
5
|
|
|
6
|
-
import pytz
|
|
7
6
|
from cognite.client import CogniteClient
|
|
8
7
|
from cognite.client.data_classes import TimeSeries, TimeSeriesList
|
|
9
8
|
from pydantic import AnyHttpUrl, ValidationError
|
|
@@ -46,7 +45,7 @@ class TimeSeriesExtractor(BaseExtractor):
|
|
|
46
45
|
|
|
47
46
|
@classmethod
|
|
48
47
|
def _timeseries2triples(cls, timeseries: TimeSeries, namespace: Namespace) -> list[Triple]:
|
|
49
|
-
id_ = namespace[
|
|
48
|
+
id_ = namespace[f"TimeSeries_{timeseries.id}"]
|
|
50
49
|
|
|
51
50
|
# Set rdf type
|
|
52
51
|
triples: list[Triple] = [(id_, RDF.type, namespace.TimeSeries)]
|
|
@@ -86,7 +85,11 @@ class TimeSeriesExtractor(BaseExtractor):
|
|
|
86
85
|
|
|
87
86
|
if timeseries.created_time:
|
|
88
87
|
triples.append(
|
|
89
|
-
(
|
|
88
|
+
(
|
|
89
|
+
id_,
|
|
90
|
+
namespace.created_time,
|
|
91
|
+
Literal(datetime.fromtimestamp(timeseries.created_time / 1000, timezone.utc)),
|
|
92
|
+
)
|
|
90
93
|
)
|
|
91
94
|
|
|
92
95
|
if timeseries.last_updated_time:
|
|
@@ -94,7 +97,7 @@ class TimeSeriesExtractor(BaseExtractor):
|
|
|
94
97
|
(
|
|
95
98
|
id_,
|
|
96
99
|
namespace.last_updated_time,
|
|
97
|
-
Literal(datetime.fromtimestamp(timeseries.last_updated_time / 1000,
|
|
100
|
+
Literal(datetime.fromtimestamp(timeseries.last_updated_time / 1000, timezone.utc)),
|
|
98
101
|
)
|
|
99
102
|
)
|
|
100
103
|
|
|
@@ -110,9 +113,9 @@ class TimeSeriesExtractor(BaseExtractor):
|
|
|
110
113
|
triples.append((id_, namespace.unit_external_id, Literal(timeseries.unit_external_id)))
|
|
111
114
|
|
|
112
115
|
if timeseries.data_set_id:
|
|
113
|
-
triples.append((id_, namespace.dataset, namespace[
|
|
116
|
+
triples.append((id_, namespace.dataset, namespace[f"Dataset_{timeseries.data_set_id}"]))
|
|
114
117
|
|
|
115
118
|
if timeseries.asset_id:
|
|
116
|
-
triples.append((id_, namespace.asset, namespace[
|
|
119
|
+
triples.append((id_, namespace.asset, namespace[f"Asset_{timeseries.asset_id}"]))
|
|
117
120
|
|
|
118
121
|
return triples
|
|
@@ -31,6 +31,7 @@ __all__ = [
|
|
|
31
31
|
"ReverseRelationMissingOtherSideWarning",
|
|
32
32
|
"NodeTypeFilterOnParentViewWarning",
|
|
33
33
|
"MissingViewInModelWarning",
|
|
34
|
+
"ViewSizeWarning",
|
|
34
35
|
"ChangingContainerError",
|
|
35
36
|
"ChangingViewError",
|
|
36
37
|
]
|
|
@@ -44,6 +45,30 @@ class DMSSchemaError(NeatValidationError, ABC): ...
|
|
|
44
45
|
class DMSSchemaWarning(ValidationWarning, ABC): ...
|
|
45
46
|
|
|
46
47
|
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class ViewSizeWarning(DMSSchemaWarning):
|
|
50
|
+
description = (
|
|
51
|
+
"The number of properties in the {view} view is {count} which is more than "
|
|
52
|
+
"the recommended limit of {limit} properties. This can lead to performance issues."
|
|
53
|
+
)
|
|
54
|
+
fix = "Reduce the size of the view"
|
|
55
|
+
error_name: ClassVar[str] = "ViewSizeWarning"
|
|
56
|
+
|
|
57
|
+
view_id: dm.ViewId
|
|
58
|
+
limit: int
|
|
59
|
+
count: int
|
|
60
|
+
|
|
61
|
+
def message(self) -> str:
|
|
62
|
+
return self.description.format(view=repr(self.view_id), count=self.count, limit=self.limit)
|
|
63
|
+
|
|
64
|
+
def dump(self) -> dict[str, Any]:
|
|
65
|
+
output = super().dump()
|
|
66
|
+
output["view_id"] = self.view_id.dump()
|
|
67
|
+
output["limit"] = self.limit
|
|
68
|
+
output["count"] = self.count
|
|
69
|
+
return output
|
|
70
|
+
|
|
71
|
+
|
|
47
72
|
@dataclass(frozen=True)
|
|
48
73
|
class IncompleteSchemaError(DMSSchemaError):
|
|
49
74
|
description = "This error is raised when the schema is claimed to be complete but missing some components"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DMS_CONTAINER_SIZE_LIMIT = 100
|
|
@@ -6,6 +6,7 @@ from cognite.client import data_modeling as dm
|
|
|
6
6
|
from cognite.neat.rules import issues
|
|
7
7
|
from cognite.neat.rules.issues import IssueList
|
|
8
8
|
from cognite.neat.rules.models._base import DataModelType, ExtensionCategory, SchemaCompleteness
|
|
9
|
+
from cognite.neat.rules.models._constants import DMS_CONTAINER_SIZE_LIMIT
|
|
9
10
|
from cognite.neat.rules.models.data_types import DataType
|
|
10
11
|
from cognite.neat.rules.models.entities import ContainerEntity
|
|
11
12
|
from cognite.neat.rules.models.wrapped_entities import RawFilter
|
|
@@ -34,7 +35,7 @@ class DMSPostValidation:
|
|
|
34
35
|
self._validate_raw_filter()
|
|
35
36
|
self._consistent_container_properties()
|
|
36
37
|
|
|
37
|
-
self.
|
|
38
|
+
self._referenced_views_and_containers_are_existing_and_proper_size()
|
|
38
39
|
if self.metadata.schema_ is SchemaCompleteness.extended:
|
|
39
40
|
self._validate_extension()
|
|
40
41
|
if self.metadata.schema_ is SchemaCompleteness.partial:
|
|
@@ -118,14 +119,16 @@ class DMSPostValidation:
|
|
|
118
119
|
prop.constraint = prop.constraint or constraint_definition
|
|
119
120
|
self.issue_list.extend(errors)
|
|
120
121
|
|
|
121
|
-
def
|
|
122
|
+
def _referenced_views_and_containers_are_existing_and_proper_size(self) -> None:
|
|
122
123
|
defined_views = {view.view.as_id() for view in self.views}
|
|
123
124
|
if self.metadata.schema_ is SchemaCompleteness.extended and self.rules.last:
|
|
124
125
|
defined_views |= {view.view.as_id() for view in self.rules.last.views}
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
property_count_by_view: dict[dm.ViewId, int] = defaultdict(int)
|
|
128
|
+
errors: list[issues.ValidationIssue] = []
|
|
127
129
|
for prop_no, prop in enumerate(self.properties):
|
|
128
|
-
|
|
130
|
+
view_id = prop.view.as_id()
|
|
131
|
+
if view_id not in defined_views:
|
|
129
132
|
errors.append(
|
|
130
133
|
issues.spreadsheet.NonExistingViewError(
|
|
131
134
|
column="View",
|
|
@@ -137,6 +140,17 @@ class DMSPostValidation:
|
|
|
137
140
|
url=None,
|
|
138
141
|
)
|
|
139
142
|
)
|
|
143
|
+
else:
|
|
144
|
+
property_count_by_view[view_id] += 1
|
|
145
|
+
for view_id, count in property_count_by_view.items():
|
|
146
|
+
if count > DMS_CONTAINER_SIZE_LIMIT:
|
|
147
|
+
errors.append(
|
|
148
|
+
issues.dms.ViewSizeWarning(
|
|
149
|
+
view_id=view_id,
|
|
150
|
+
limit=DMS_CONTAINER_SIZE_LIMIT,
|
|
151
|
+
count=count,
|
|
152
|
+
)
|
|
153
|
+
)
|
|
140
154
|
if self.metadata.schema_ is SchemaCompleteness.complete:
|
|
141
155
|
defined_containers = {container.container.as_id() for container in self.containers or []}
|
|
142
156
|
if self.metadata.data_model_type == DataModelType.solution and self.rules.reference:
|
{cognite_neat-0.81.0 → cognite_neat-0.81.2}/cognite/neat/rules/models/information/_converter.py
RENAMED
|
@@ -8,6 +8,7 @@ from cognite.neat.rules.models._base import (
|
|
|
8
8
|
SchemaCompleteness,
|
|
9
9
|
SheetList,
|
|
10
10
|
)
|
|
11
|
+
from cognite.neat.rules.models._constants import DMS_CONTAINER_SIZE_LIMIT
|
|
11
12
|
from cognite.neat.rules.models.data_types import DataType
|
|
12
13
|
from cognite.neat.rules.models.domain import DomainRules
|
|
13
14
|
from cognite.neat.rules.models.entities import (
|
|
@@ -41,6 +42,7 @@ class _InformationRulesConverter:
|
|
|
41
42
|
self.last_classes = {class_.class_: class_ for class_ in self.rules.last.classes}
|
|
42
43
|
else:
|
|
43
44
|
self.last_classes = {}
|
|
45
|
+
self.property_count_by_container: dict[ContainerEntity, int] = defaultdict(int)
|
|
44
46
|
|
|
45
47
|
def as_domain_rules(self) -> DomainRules:
|
|
46
48
|
raise NotImplementedError("DomainRules not implemented yet")
|
|
@@ -81,7 +83,6 @@ class _InformationRulesConverter:
|
|
|
81
83
|
last_dms_rules = self.rules.last.as_dms_architect_rules() if self.rules.last else None
|
|
82
84
|
ref_dms_rules = self.rules.reference.as_dms_architect_rules() if self.rules.reference else None
|
|
83
85
|
|
|
84
|
-
containers: list[DMSContainer] = []
|
|
85
86
|
class_by_entity = {cls_.class_: cls_ for cls_ in self.rules.classes}
|
|
86
87
|
if self.rules.last:
|
|
87
88
|
for cls_ in self.rules.last.classes:
|
|
@@ -93,6 +94,7 @@ class _InformationRulesConverter:
|
|
|
93
94
|
if rule_set:
|
|
94
95
|
existing_containers.update({c.container for c in rule_set.containers or []})
|
|
95
96
|
|
|
97
|
+
containers: list[DMSContainer] = []
|
|
96
98
|
for container_entity, class_entities in referenced_containers.items():
|
|
97
99
|
if container_entity in existing_containers:
|
|
98
100
|
continue
|
|
@@ -227,9 +229,14 @@ class _InformationRulesConverter:
|
|
|
227
229
|
# the existing container in the last schema
|
|
228
230
|
container_entity = prop.class_.as_container_entity(default_space)
|
|
229
231
|
container_entity.suffix = self._bump_suffix(container_entity.suffix)
|
|
230
|
-
return container_entity, prop.property_
|
|
231
232
|
else:
|
|
232
|
-
|
|
233
|
+
container_entity = prop.class_.as_container_entity(default_space)
|
|
234
|
+
|
|
235
|
+
while self.property_count_by_container[container_entity] >= DMS_CONTAINER_SIZE_LIMIT:
|
|
236
|
+
container_entity.suffix = self._bump_suffix(container_entity.suffix)
|
|
237
|
+
|
|
238
|
+
self.property_count_by_container[container_entity] += 1
|
|
239
|
+
return container_entity, prop.property_
|
|
233
240
|
|
|
234
241
|
def _get_view_implements(self, cls_: InformationClass, metadata: InformationMetadata) -> list[ViewEntity]:
|
|
235
242
|
if isinstance(cls_.reference, ReferenceEntity) and cls_.reference.prefix != metadata.prefix:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.81.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.81.0 → cognite_neat-0.81.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.81.0 → cognite_neat-0.81.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
|