cognite-neat 0.83.0__tar.gz → 0.84.0__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.83.0 → cognite_neat-0.84.0}/PKG-INFO +1 -1
- cognite_neat-0.84.0/cognite/neat/_shared.py +35 -0
- cognite_neat-0.84.0/cognite/neat/_version.py +1 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_base.py +7 -2
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_rules2dms.py +100 -92
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/_base.py +1 -9
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/_data_modeling.py +2 -1
- cognite_neat-0.84.0/cognite/neat/utils/upload.py +126 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +5 -5
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/pyproject.toml +1 -1
- cognite_neat-0.83.0/cognite/neat/_version.py +0 -1
- cognite_neat-0.83.0/cognite/neat/utils/upload.py +0 -86
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/LICENSE +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/README.md +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/configuration.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/explorer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/configuration.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/core.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/crud.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/data_exploration.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/metrics.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/routers/workflows.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/utils/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/utils/logging.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/main.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/monitoring/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/monitoring/metrics.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/index.html +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/config.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/constants.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/_shared.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/_tracking/base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/_tracking/log.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/examples/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/issues/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/issues/loader.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/loaders/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/models.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/queries/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/queries/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/queries/_construct.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/queries/_shared.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/stores/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/stores/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/stores/_provenance.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/transformers/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/transformers/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/issues.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/models.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/graph/transformations/transformer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/analysis.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-TNT.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_graph2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/tables.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/rules/models/value_types.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/py.typed +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/_shared.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/analysis/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/analysis/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/analysis/_information_rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/examples/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/examples/wind-energy.owl +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/exporters/_validation.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_inference2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/dms.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/fileread.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/formatters.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/importing.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/spreadsheet.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_constants.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_types/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_types/_base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/_types/_field.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/_converter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/_rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/_rules_input.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/_serializer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/asset/_validation.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/data_types.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_converter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_serializer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/domain.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/entities.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/_converter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/_rules.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/_serializer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/information/_validation.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/rules/models/wrapped_entities.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/auxiliary.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_classes.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/spreadsheet.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/text.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/utils.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/xml.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/_exceptions.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/base.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/cdf_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/manager.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/migration/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/migration/steps.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/model.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps/step_model.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/steps_registry.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/tasks.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/triggers.py +0 -0
- {cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/workflows/utils.py +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from abc import abstractmethod
|
|
2
|
+
from collections.abc import Hashable, Sequence
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
import pandas as pd
|
|
7
|
+
|
|
8
|
+
T_ID = TypeVar("T_ID", bound=Hashable)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass
|
|
12
|
+
class NeatObject:
|
|
13
|
+
"""A neat object can be dumped to a dictionary."""
|
|
14
|
+
|
|
15
|
+
@abstractmethod
|
|
16
|
+
def dump(self, aggregate: bool = True) -> dict[str, Any]:
|
|
17
|
+
"""Return a dictionary representation of the object."""
|
|
18
|
+
raise NotImplementedError()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T_NeatObject = TypeVar("T_NeatObject", bound=NeatObject)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class NeatList(list, Sequence[T_NeatObject]):
|
|
25
|
+
"""A list of neat objects."""
|
|
26
|
+
|
|
27
|
+
def dump(self) -> list[dict[str, Any]]:
|
|
28
|
+
"""Return a list of dictionary representations of the objects."""
|
|
29
|
+
return [obj.dump() for obj in self]
|
|
30
|
+
|
|
31
|
+
def to_pandas(self) -> pd.DataFrame:
|
|
32
|
+
return pd.DataFrame(self.dump())
|
|
33
|
+
|
|
34
|
+
def _repr_html_(self) -> str:
|
|
35
|
+
return self.to_pandas()._repr_html_() # type: ignore[operator]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.84.0"
|
|
@@ -7,7 +7,7 @@ from cognite.client import CogniteClient
|
|
|
7
7
|
|
|
8
8
|
from cognite.neat.rules._shared import Rules
|
|
9
9
|
from cognite.neat.rules.models import DMSRules, InformationRules, RoleTypes
|
|
10
|
-
from cognite.neat.utils.upload import
|
|
10
|
+
from cognite.neat.utils.upload import UploadResult, UploadResultList
|
|
11
11
|
|
|
12
12
|
T_Export = TypeVar("T_Export")
|
|
13
13
|
|
|
@@ -37,5 +37,10 @@ class BaseExporter(ABC, Generic[T_Export]):
|
|
|
37
37
|
|
|
38
38
|
class CDFExporter(BaseExporter[T_Export]):
|
|
39
39
|
@abstractmethod
|
|
40
|
-
def
|
|
40
|
+
def export_to_cdf_iterable(
|
|
41
|
+
self, rules: Rules, client: CogniteClient, dry_run: bool = False
|
|
42
|
+
) -> Iterable[UploadResult]:
|
|
41
43
|
raise NotImplementedError
|
|
44
|
+
|
|
45
|
+
def export_to_cdf(self, rules: Rules, client: CogniteClient, dry_run: bool = False) -> UploadResultList:
|
|
46
|
+
return UploadResultList(self.export_to_cdf_iterable(rules, client, dry_run))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import warnings
|
|
2
|
-
from collections.abc import Collection, Iterable
|
|
2
|
+
from collections.abc import Collection, Hashable, Iterable, Sequence
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Literal, TypeAlias, cast
|
|
5
5
|
|
|
@@ -31,7 +31,7 @@ from cognite.neat.utils.cdf_loaders import (
|
|
|
31
31
|
TransformationLoader,
|
|
32
32
|
ViewLoader,
|
|
33
33
|
)
|
|
34
|
-
from cognite.neat.utils.upload import
|
|
34
|
+
from cognite.neat.utils.upload import UploadResult
|
|
35
35
|
|
|
36
36
|
from ._base import CDFExporter
|
|
37
37
|
|
|
@@ -123,109 +123,84 @@ class DMSExporter(CDFExporter[DMSSchema]):
|
|
|
123
123
|
raise ValueError(f"{type(rules).__name__} cannot be exported to DMS")
|
|
124
124
|
return dms_rules.as_schema(include_pipeline=self.export_pipeline, instance_space=self.instance_space)
|
|
125
125
|
|
|
126
|
-
def delete_from_cdf(self, rules: Rules, client: CogniteClient, dry_run: bool = False) -> Iterable[
|
|
127
|
-
|
|
126
|
+
def delete_from_cdf(self, rules: Rules, client: CogniteClient, dry_run: bool = False) -> Iterable[UploadResult]:
|
|
127
|
+
to_export = self._prepare_exporters(rules, client)
|
|
128
128
|
|
|
129
129
|
# we need to reverse order in which we are picking up the items to delete
|
|
130
130
|
# as they are sorted in the order of creation and we need to delete them in reverse order
|
|
131
|
-
for
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
to_delete = []
|
|
138
|
-
|
|
139
|
-
for item in items:
|
|
131
|
+
for items, loader in reversed(to_export):
|
|
132
|
+
item_ids = loader.get_ids(items)
|
|
133
|
+
existing_items = loader.retrieve(item_ids)
|
|
134
|
+
existing_ids = loader.get_ids(existing_items)
|
|
135
|
+
to_delete: list[Hashable] = []
|
|
136
|
+
for item_id in item_ids:
|
|
140
137
|
if (
|
|
141
138
|
isinstance(loader, DataModelingLoader)
|
|
142
139
|
and self.include_space is not None
|
|
143
|
-
and not loader.in_space(
|
|
140
|
+
and not loader.in_space(item_id, self.include_space)
|
|
144
141
|
):
|
|
145
142
|
continue
|
|
146
143
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
to_delete.append(cdf_item)
|
|
150
|
-
|
|
151
|
-
deleted = len(to_delete)
|
|
152
|
-
failed_deleted = 0
|
|
144
|
+
if item_id in existing_ids:
|
|
145
|
+
to_delete.append(item_id)
|
|
153
146
|
|
|
147
|
+
deleted: set[Hashable] = set()
|
|
148
|
+
failed_deleted: set[Hashable] = set()
|
|
154
149
|
error_messages: list[str] = []
|
|
155
|
-
if
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
if dry_run:
|
|
151
|
+
deleted.update(to_delete)
|
|
152
|
+
elif to_delete:
|
|
153
|
+
try:
|
|
154
|
+
loader.delete(to_delete)
|
|
155
|
+
except CogniteAPIError as e:
|
|
156
|
+
failed_deleted.update(loader.get_id(item) for item in e.failed + e.unknown)
|
|
157
|
+
deleted.update(loader.get_id(item) for item in e.successful)
|
|
158
|
+
error_messages.append(f"Failed delete: {e.message}")
|
|
159
|
+
else:
|
|
160
|
+
deleted.update(to_delete)
|
|
163
161
|
|
|
164
|
-
yield
|
|
162
|
+
yield UploadResult(
|
|
165
163
|
name=loader.resource_name,
|
|
166
164
|
deleted=deleted,
|
|
167
|
-
skipped=0,
|
|
168
165
|
failed_deleted=failed_deleted,
|
|
169
166
|
error_messages=error_messages,
|
|
170
167
|
)
|
|
171
168
|
|
|
172
|
-
def
|
|
173
|
-
|
|
169
|
+
def export_to_cdf_iterable(
|
|
170
|
+
self, rules: Rules, client: CogniteClient, dry_run: bool = False
|
|
171
|
+
) -> Iterable[UploadResult]:
|
|
172
|
+
to_export = self._prepare_exporters(rules, client)
|
|
174
173
|
|
|
175
|
-
# The conversion from DMS to GraphQL does not seem to be triggered even if the views
|
|
176
|
-
# are changed. This is a workaround to force the conversion.
|
|
177
174
|
redeploy_data_model = False
|
|
175
|
+
for items, loader in to_export:
|
|
176
|
+
# The conversion from DMS to GraphQL does not seem to be triggered even if the views
|
|
177
|
+
# are changed. This is a workaround to force the conversion.
|
|
178
|
+
is_redeploying = loader is DataModelingLoader and redeploy_data_model
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
item_ids = [item_id for item_id in all_item_ids]
|
|
183
|
-
cdf_items = loader.retrieve(item_ids)
|
|
184
|
-
cdf_item_by_id = {loader.get_id(item): item for item in cdf_items}
|
|
185
|
-
items = [item for item in all_items if loader.get_id(item) in item_ids]
|
|
186
|
-
to_create, to_update, unchanged, to_delete = [], [], [], []
|
|
187
|
-
is_redeploying = loader.resource_name == "data_models" and redeploy_data_model
|
|
188
|
-
for item in items:
|
|
189
|
-
if (
|
|
190
|
-
isinstance(loader, DataModelingLoader)
|
|
191
|
-
and self.include_space is not None
|
|
192
|
-
and not loader.in_space(item, self.include_space)
|
|
193
|
-
):
|
|
194
|
-
continue
|
|
195
|
-
|
|
196
|
-
cdf_item = cdf_item_by_id.get(loader.get_id(item))
|
|
197
|
-
if cdf_item is None:
|
|
198
|
-
to_create.append(item)
|
|
199
|
-
elif is_redeploying:
|
|
200
|
-
to_update.append(item)
|
|
201
|
-
to_delete.append(cdf_item)
|
|
202
|
-
elif loader.are_equal(item, cdf_item):
|
|
203
|
-
unchanged.append(item)
|
|
204
|
-
else:
|
|
205
|
-
to_update.append(item)
|
|
206
|
-
|
|
207
|
-
created = len(to_create)
|
|
208
|
-
failed_created = 0
|
|
209
|
-
skipped = 0
|
|
210
|
-
|
|
211
|
-
if self.existing_handling in ["update", "force"]:
|
|
212
|
-
changed = len(to_update)
|
|
213
|
-
failed_changed = 0
|
|
214
|
-
elif self.existing_handling == "skip":
|
|
215
|
-
changed = 0
|
|
216
|
-
failed_changed = 0
|
|
217
|
-
skipped += len(to_update)
|
|
218
|
-
elif self.existing_handling == "fail":
|
|
219
|
-
failed_changed = len(to_update)
|
|
220
|
-
changed = 0
|
|
221
|
-
else:
|
|
222
|
-
raise ValueError(f"Unsupported existing_handling {self.existing_handling}")
|
|
180
|
+
to_create, to_delete, to_update, unchanged = self._categorize_items_for_upload(
|
|
181
|
+
loader, items, is_redeploying
|
|
182
|
+
)
|
|
223
183
|
|
|
184
|
+
issue_list = IssueList()
|
|
224
185
|
warning_list = self._validate(loader, items)
|
|
225
186
|
issue_list.extend(warning_list)
|
|
226
187
|
|
|
188
|
+
created: set[Hashable] = set()
|
|
189
|
+
skipped: set[Hashable] = set()
|
|
190
|
+
changed: set[Hashable] = set()
|
|
191
|
+
failed_created: set[Hashable] = set()
|
|
192
|
+
failed_changed: set[Hashable] = set()
|
|
227
193
|
error_messages: list[str] = []
|
|
228
|
-
if
|
|
194
|
+
if dry_run:
|
|
195
|
+
if self.existing_handling in ["update", "force"]:
|
|
196
|
+
changed.update(loader.get_id(item) for item in to_update)
|
|
197
|
+
elif self.existing_handling == "skip":
|
|
198
|
+
skipped.update(loader.get_id(item) for item in to_update)
|
|
199
|
+
elif self.existing_handling == "fail":
|
|
200
|
+
failed_changed.update(loader.get_id(item) for item in to_update)
|
|
201
|
+
else:
|
|
202
|
+
raise ValueError(f"Unsupported existing_handling {self.existing_handling}")
|
|
203
|
+
else:
|
|
229
204
|
if to_delete:
|
|
230
205
|
try:
|
|
231
206
|
loader.delete(to_delete)
|
|
@@ -238,23 +213,31 @@ class DMSExporter(CDFExporter[DMSSchema]):
|
|
|
238
213
|
try:
|
|
239
214
|
loader.create(to_create)
|
|
240
215
|
except CogniteAPIError as e:
|
|
241
|
-
failed_created
|
|
242
|
-
created
|
|
216
|
+
failed_created.update(loader.get_id(item) for item in e.failed + e.unknown)
|
|
217
|
+
created.update(loader.get_id(item) for item in e.successful)
|
|
243
218
|
error_messages.append(e.message)
|
|
219
|
+
else:
|
|
220
|
+
created.update(loader.get_id(item) for item in to_create)
|
|
244
221
|
|
|
245
222
|
if self.existing_handling in ["update", "force"]:
|
|
246
223
|
try:
|
|
247
224
|
loader.update(to_update)
|
|
248
225
|
except CogniteAPIError as e:
|
|
249
|
-
failed_changed
|
|
250
|
-
changed
|
|
226
|
+
failed_changed.update(loader.get_id(item) for item in e.failed + e.unknown)
|
|
227
|
+
changed.update(loader.get_id(item) for item in e.successful)
|
|
251
228
|
error_messages.append(e.message)
|
|
252
|
-
|
|
253
|
-
|
|
229
|
+
else:
|
|
230
|
+
changed.update(loader.get_id(item) for item in to_update)
|
|
231
|
+
elif self.existing_handling == "skip":
|
|
232
|
+
skipped.update(loader.get_id(item) for item in to_update)
|
|
233
|
+
elif self.existing_handling == "fail":
|
|
234
|
+
failed_changed.update(loader.get_id(item) for item in to_update)
|
|
235
|
+
|
|
236
|
+
yield UploadResult(
|
|
254
237
|
name=loader.resource_name,
|
|
255
238
|
created=created,
|
|
256
239
|
changed=changed,
|
|
257
|
-
unchanged=
|
|
240
|
+
unchanged={loader.get_id(item) for item in unchanged},
|
|
258
241
|
skipped=skipped,
|
|
259
242
|
failed_created=failed_created,
|
|
260
243
|
failed_changed=failed_changed,
|
|
@@ -262,12 +245,37 @@ class DMSExporter(CDFExporter[DMSSchema]):
|
|
|
262
245
|
issues=issue_list,
|
|
263
246
|
)
|
|
264
247
|
|
|
265
|
-
if loader
|
|
248
|
+
if loader is ViewLoader and (created or changed):
|
|
266
249
|
redeploy_data_model = True
|
|
267
250
|
|
|
268
|
-
def
|
|
269
|
-
self,
|
|
270
|
-
) -> tuple[
|
|
251
|
+
def _categorize_items_for_upload(
|
|
252
|
+
self, loader: ResourceLoader, items: Sequence[CogniteResource], is_redeploying
|
|
253
|
+
) -> tuple[list[CogniteResource], list[CogniteResource], list[CogniteResource], list[CogniteResource]]:
|
|
254
|
+
item_ids = loader.get_ids(items)
|
|
255
|
+
cdf_items = loader.retrieve(item_ids)
|
|
256
|
+
cdf_item_by_id = {loader.get_id(item): item for item in cdf_items}
|
|
257
|
+
to_create, to_update, unchanged, to_delete = [], [], [], []
|
|
258
|
+
for item in items:
|
|
259
|
+
if (
|
|
260
|
+
isinstance(loader, DataModelingLoader)
|
|
261
|
+
and self.include_space is not None
|
|
262
|
+
and not loader.in_space(item, self.include_space)
|
|
263
|
+
):
|
|
264
|
+
continue
|
|
265
|
+
|
|
266
|
+
cdf_item = cdf_item_by_id.get(loader.get_id(item))
|
|
267
|
+
if cdf_item is None:
|
|
268
|
+
to_create.append(item)
|
|
269
|
+
elif is_redeploying:
|
|
270
|
+
to_update.append(item)
|
|
271
|
+
to_delete.append(cdf_item)
|
|
272
|
+
elif loader.are_equal(item, cdf_item):
|
|
273
|
+
unchanged.append(item)
|
|
274
|
+
else:
|
|
275
|
+
to_update.append(item)
|
|
276
|
+
return to_create, to_delete, to_update, unchanged
|
|
277
|
+
|
|
278
|
+
def _prepare_exporters(self, rules, client) -> list[tuple[CogniteResourceList, ResourceLoader]]:
|
|
271
279
|
schema = self.export(rules)
|
|
272
280
|
to_export: list[tuple[CogniteResourceList, ResourceLoader]] = []
|
|
273
281
|
if self.export_components.intersection({"all", "spaces"}):
|
|
@@ -282,9 +290,9 @@ class DMSExporter(CDFExporter[DMSSchema]):
|
|
|
282
290
|
to_export.append((schema.databases, RawDatabaseLoader(client)))
|
|
283
291
|
to_export.append((schema.raw_tables, RawTableLoader(client)))
|
|
284
292
|
to_export.append((schema.transformations, TransformationLoader(client)))
|
|
285
|
-
return
|
|
293
|
+
return to_export
|
|
286
294
|
|
|
287
|
-
def _validate(self, loader: ResourceLoader, items:
|
|
295
|
+
def _validate(self, loader: ResourceLoader, items: CogniteResourceList) -> IssueList:
|
|
288
296
|
issue_list = IssueList()
|
|
289
297
|
if isinstance(loader, DataModelLoader):
|
|
290
298
|
models = cast(list[DataModelApply], items)
|
|
@@ -9,18 +9,10 @@ from cognite.client.data_classes._base import (
|
|
|
9
9
|
T_WriteClass,
|
|
10
10
|
WriteableCogniteResourceList,
|
|
11
11
|
)
|
|
12
|
-
from cognite.client.data_classes.data_modeling import (
|
|
13
|
-
DataModelingId,
|
|
14
|
-
)
|
|
15
|
-
from cognite.client.data_classes.data_modeling.ids import (
|
|
16
|
-
InstanceId,
|
|
17
|
-
VersionedDataModelingId,
|
|
18
|
-
)
|
|
19
12
|
from cognite.client.utils.useful_types import SequenceNotStr
|
|
20
13
|
|
|
21
|
-
from .
|
|
14
|
+
from cognite.neat._shared import T_ID
|
|
22
15
|
|
|
23
|
-
T_ID = TypeVar("T_ID", bound=str | int | DataModelingId | InstanceId | VersionedDataModelingId | RawTableID)
|
|
24
16
|
T_WritableCogniteResourceList = TypeVar("T_WritableCogniteResourceList", bound=WriteableCogniteResourceList)
|
|
25
17
|
|
|
26
18
|
|
{cognite_neat-0.83.0 → cognite_neat-0.84.0}/cognite/neat/utils/cdf_loaders/_data_modeling.py
RENAMED
|
@@ -41,7 +41,8 @@ from ._base import T_ID, ResourceLoader, T_WritableCogniteResourceList
|
|
|
41
41
|
class DataModelingLoader(
|
|
42
42
|
ResourceLoader[T_ID, T_WriteClass, T_WritableCogniteResource, T_CogniteResourceList, T_WritableCogniteResourceList]
|
|
43
43
|
):
|
|
44
|
-
|
|
44
|
+
@classmethod
|
|
45
|
+
def in_space(cls, item: T_WriteClass | T_WritableCogniteResource | T_ID, space: set[str]) -> bool:
|
|
45
46
|
if hasattr(item, "space"):
|
|
46
47
|
return item.space in space
|
|
47
48
|
raise ValueError(f"Item {item} does not have a space attribute")
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
from dataclasses import dataclass, field
|
|
3
|
+
from functools import total_ordering
|
|
4
|
+
from typing import Any, Generic
|
|
5
|
+
|
|
6
|
+
from cognite.neat._shared import T_ID, NeatList, NeatObject
|
|
7
|
+
from cognite.neat.issues import NeatIssueList
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@total_ordering
|
|
11
|
+
@dataclass
|
|
12
|
+
class UploadResultCore(NeatObject, ABC):
|
|
13
|
+
name: str
|
|
14
|
+
error_messages: list[str] = field(default_factory=list)
|
|
15
|
+
issues: NeatIssueList = field(default_factory=NeatIssueList)
|
|
16
|
+
|
|
17
|
+
def __lt__(self, other: object) -> bool:
|
|
18
|
+
if isinstance(other, UploadResultCore):
|
|
19
|
+
return self.name < other.name
|
|
20
|
+
else:
|
|
21
|
+
return NotImplemented
|
|
22
|
+
|
|
23
|
+
def __eq__(self, other: object) -> bool:
|
|
24
|
+
if isinstance(other, UploadResultCore):
|
|
25
|
+
return self.name == other.name
|
|
26
|
+
else:
|
|
27
|
+
return NotImplemented
|
|
28
|
+
|
|
29
|
+
def dump(self, aggregate: bool = True) -> dict[str, Any]:
|
|
30
|
+
return {"name": self.name}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class UploadResultList(NeatList[UploadResultCore]): ...
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@dataclass
|
|
37
|
+
class UploadResult(UploadResultCore, Generic[T_ID]):
|
|
38
|
+
created: set[T_ID] = field(default_factory=set)
|
|
39
|
+
deleted: set[T_ID] = field(default_factory=set)
|
|
40
|
+
changed: set[T_ID] = field(default_factory=set)
|
|
41
|
+
unchanged: set[T_ID] = field(default_factory=set)
|
|
42
|
+
skipped: set[T_ID] = field(default_factory=set)
|
|
43
|
+
failed_created: set[T_ID] = field(default_factory=set)
|
|
44
|
+
failed_changed: set[T_ID] = field(default_factory=set)
|
|
45
|
+
failed_deleted: set[T_ID] = field(default_factory=set)
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def failed(self) -> int:
|
|
49
|
+
return len(self.failed_created) + len(self.failed_changed) + len(self.failed_deleted)
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def total(self) -> int:
|
|
53
|
+
return len(self.created) + len(self.deleted) + len(self.changed) + len(self.unchanged) + len(self.skipped)
|
|
54
|
+
|
|
55
|
+
def dump(self, aggregate: bool = True) -> dict[str, Any]:
|
|
56
|
+
output = super().dump(aggregate)
|
|
57
|
+
if self.created:
|
|
58
|
+
output["created"] = len(self.created) if aggregate else list(self.created)
|
|
59
|
+
if self.deleted:
|
|
60
|
+
output["deleted"] = len(self.deleted) if aggregate else list(self.deleted)
|
|
61
|
+
if self.changed:
|
|
62
|
+
output["changed"] = len(self.changed) if aggregate else list(self.changed)
|
|
63
|
+
if self.unchanged:
|
|
64
|
+
output["unchanged"] = len(self.unchanged) if aggregate else list(self.unchanged)
|
|
65
|
+
if self.skipped:
|
|
66
|
+
output["skipped"] = len(self.skipped) if aggregate else list(self.skipped)
|
|
67
|
+
if self.failed_created:
|
|
68
|
+
output["failed_created"] = len(self.failed_created) if aggregate else list(self.failed_created)
|
|
69
|
+
if self.failed_changed:
|
|
70
|
+
output["failed_changed"] = len(self.failed_changed) if aggregate else list(self.failed_changed)
|
|
71
|
+
if self.failed_deleted:
|
|
72
|
+
output["failed_deleted"] = len(self.failed_deleted) if aggregate else list(self.failed_deleted)
|
|
73
|
+
if self.error_messages:
|
|
74
|
+
output["error_messages"] = len(self.error_messages) if aggregate else self.error_messages
|
|
75
|
+
if self.issues:
|
|
76
|
+
output["issues"] = len(self.issues) if aggregate else [issue.dump() for issue in self.issues]
|
|
77
|
+
return output
|
|
78
|
+
|
|
79
|
+
def __str__(self) -> str:
|
|
80
|
+
dumped = self.dump(aggregate=True)
|
|
81
|
+
lines: list[str] = []
|
|
82
|
+
for key, value in dumped.items():
|
|
83
|
+
if key in ["name", "error_messages", "issues"]:
|
|
84
|
+
continue
|
|
85
|
+
lines.append(f"{key}: {value}")
|
|
86
|
+
return f"{self.name.title()}: {', '.join(lines)}"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@dataclass
|
|
90
|
+
class UploadResultIDs(UploadResultCore):
|
|
91
|
+
success: list[str] = field(default_factory=list)
|
|
92
|
+
failed: list[str] = field(default_factory=list)
|
|
93
|
+
|
|
94
|
+
def dump(self, aggregate: bool = True) -> dict[str, Any]:
|
|
95
|
+
output = super().dump(aggregate)
|
|
96
|
+
if self.success:
|
|
97
|
+
output["success"] = len(self.success) if aggregate else self.success
|
|
98
|
+
if self.failed:
|
|
99
|
+
output["failed"] = len(self.failed) if aggregate else self.failed
|
|
100
|
+
return output
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
@dataclass
|
|
104
|
+
class UploadDiffsID(UploadResultCore):
|
|
105
|
+
created: list[str] = field(default_factory=list)
|
|
106
|
+
changed: list[str] = field(default_factory=list)
|
|
107
|
+
unchanged: list[str] = field(default_factory=list)
|
|
108
|
+
failed: list[str] = field(default_factory=list)
|
|
109
|
+
|
|
110
|
+
def as_upload_result_ids(self) -> UploadResultIDs:
|
|
111
|
+
result = UploadResultIDs(name=self.name, error_messages=self.error_messages, issues=self.issues)
|
|
112
|
+
result.success = self.created + self.changed + self.unchanged
|
|
113
|
+
result.failed = self.failed
|
|
114
|
+
return result
|
|
115
|
+
|
|
116
|
+
def dump(self, aggregate: bool = True) -> dict[str, Any]:
|
|
117
|
+
output = super().dump(aggregate)
|
|
118
|
+
if self.created:
|
|
119
|
+
output["created"] = len(self.created) if aggregate else self.created
|
|
120
|
+
if self.changed:
|
|
121
|
+
output["changed"] = len(self.changed) if aggregate else self.changed
|
|
122
|
+
if self.unchanged:
|
|
123
|
+
output["unchanged"] = len(self.unchanged) if aggregate else self.unchanged
|
|
124
|
+
if self.failed:
|
|
125
|
+
output["failed"] = len(self.failed) if aggregate else self.failed
|
|
126
|
+
return output
|
|
@@ -95,7 +95,7 @@ class DeleteDataModelFromCDF(Step):
|
|
|
95
95
|
report_lines = ["# Data Model Deletion from CDF\n\n"]
|
|
96
96
|
errors = []
|
|
97
97
|
for result in dms_exporter.delete_from_cdf(rules=input_rules, client=cdf_client, dry_run=dry_run):
|
|
98
|
-
report_lines.append(result
|
|
98
|
+
report_lines.append(str(result))
|
|
99
99
|
errors.extend(result.error_messages)
|
|
100
100
|
|
|
101
101
|
report_lines.append("\n\n# ERRORS\n\n")
|
|
@@ -216,8 +216,8 @@ class RulesToDMS(Step):
|
|
|
216
216
|
|
|
217
217
|
report_lines = ["# DMS Schema Export to CDF\n\n"]
|
|
218
218
|
errors = []
|
|
219
|
-
for result in dms_exporter.
|
|
220
|
-
report_lines.append(result
|
|
219
|
+
for result in dms_exporter.export_to_cdf_iterable(rules=input_rules, client=cdf_client, dry_run=dry_run):
|
|
220
|
+
report_lines.append(str(result))
|
|
221
221
|
errors.extend(result.error_messages)
|
|
222
222
|
|
|
223
223
|
report_lines.append("\n\n# ERRORS\n\n")
|
|
@@ -555,8 +555,8 @@ class RulesToCDFTransformations(Step):
|
|
|
555
555
|
|
|
556
556
|
report_lines = ["# DMS Schema Export to CDF\n\n"]
|
|
557
557
|
errors = []
|
|
558
|
-
for result in dms_exporter.
|
|
559
|
-
report_lines.append(result
|
|
558
|
+
for result in dms_exporter.export_to_cdf_iterable(rules=input_rules, client=cdf_client, dry_run=dry_run):
|
|
559
|
+
report_lines.append(str(result))
|
|
560
560
|
errors.extend(result.error_messages)
|
|
561
561
|
|
|
562
562
|
report_lines.append("\n\n# ERRORS\n\n")
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.83.0"
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
from abc import ABC
|
|
2
|
-
from dataclasses import dataclass, field
|
|
3
|
-
from functools import total_ordering
|
|
4
|
-
|
|
5
|
-
from cognite.neat.issues import NeatIssueList
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@total_ordering
|
|
9
|
-
@dataclass
|
|
10
|
-
class UploadResultCore(ABC):
|
|
11
|
-
name: str
|
|
12
|
-
error_messages: list[str] = field(default_factory=list)
|
|
13
|
-
issues: NeatIssueList = field(default_factory=NeatIssueList)
|
|
14
|
-
|
|
15
|
-
def __lt__(self, other: object) -> bool:
|
|
16
|
-
if isinstance(other, UploadDiffsCount):
|
|
17
|
-
return self.name < other.name
|
|
18
|
-
else:
|
|
19
|
-
return NotImplemented
|
|
20
|
-
|
|
21
|
-
def __eq__(self, other: object) -> bool:
|
|
22
|
-
if isinstance(other, UploadDiffsCount):
|
|
23
|
-
return self.name == other.name
|
|
24
|
-
else:
|
|
25
|
-
return NotImplemented
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@dataclass
|
|
29
|
-
class UploadDiffsCount(UploadResultCore):
|
|
30
|
-
created: int = 0
|
|
31
|
-
deleted: int = 0
|
|
32
|
-
changed: int = 0
|
|
33
|
-
unchanged: int = 0
|
|
34
|
-
skipped: int = 0
|
|
35
|
-
failed_created: int = 0
|
|
36
|
-
failed_changed: int = 0
|
|
37
|
-
failed_deleted: int = 0
|
|
38
|
-
|
|
39
|
-
@property
|
|
40
|
-
def total(self) -> int:
|
|
41
|
-
return self.created + self.deleted + self.changed + self.unchanged
|
|
42
|
-
|
|
43
|
-
@property
|
|
44
|
-
def failed(self) -> int:
|
|
45
|
-
return self.failed_created + self.failed_changed + self.failed_deleted
|
|
46
|
-
|
|
47
|
-
def as_report_str(self) -> str:
|
|
48
|
-
line = []
|
|
49
|
-
if self.created:
|
|
50
|
-
line.append(f"created {self.created}")
|
|
51
|
-
if self.changed:
|
|
52
|
-
line.append(f"updated {self.changed}")
|
|
53
|
-
if self.skipped:
|
|
54
|
-
line.append(f"skipped {self.skipped}")
|
|
55
|
-
if self.unchanged:
|
|
56
|
-
line.append(f"unchanged {self.unchanged}")
|
|
57
|
-
if self.deleted:
|
|
58
|
-
line.append(f"deleted {self.deleted}")
|
|
59
|
-
if self.failed_created:
|
|
60
|
-
line.append(f"failed to create {self.failed_created}")
|
|
61
|
-
if self.failed_changed:
|
|
62
|
-
line.append(f"failed to update {self.failed_changed}")
|
|
63
|
-
if self.failed_deleted:
|
|
64
|
-
line.append(f"failed to delete {self.failed_deleted}")
|
|
65
|
-
|
|
66
|
-
return f"{self.name.title()}: {', '.join(line)}"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@dataclass
|
|
70
|
-
class UploadResultIDs(UploadResultCore):
|
|
71
|
-
success: list[str] = field(default_factory=list)
|
|
72
|
-
failed: list[str] = field(default_factory=list)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
@dataclass
|
|
76
|
-
class UploadDiffsID(UploadResultCore):
|
|
77
|
-
created: list[str] = field(default_factory=list)
|
|
78
|
-
changed: list[str] = field(default_factory=list)
|
|
79
|
-
unchanged: list[str] = field(default_factory=list)
|
|
80
|
-
failed: list[str] = field(default_factory=list)
|
|
81
|
-
|
|
82
|
-
def as_upload_result_ids(self) -> UploadResultIDs:
|
|
83
|
-
result = UploadResultIDs(name=self.name, error_messages=self.error_messages, issues=self.issues)
|
|
84
|
-
result.success = self.created + self.changed + self.unchanged
|
|
85
|
-
result.failed = self.failed
|
|
86
|
-
return result
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.83.0 → cognite_neat-0.84.0}/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
|