cognite-neat 0.117.12__tar.gz → 0.119.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.117.12 → cognite_neat-0.119.0}/PKG-INFO +1 -1
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_alpha.py +1 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/analysis/_base.py +5 -1
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dms2rules.py +148 -40
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/information/_rules_input.py +4 -1
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/transformers/__init__.py +2 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/transformers/_converters.py +344 -21
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_base.py +1 -1
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_template.py +59 -2
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/text.py +24 -2
- cognite_neat-0.119.0/cognite/neat/_version.py +2 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/pyproject.toml +1 -1
- cognite_neat-0.117.12/cognite/neat/_version.py +0 -2
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/LICENSE +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/README.md +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/_api/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/_api/data_modeling_loaders.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/_api/neat_instances.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/_api/schema.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/_api_client.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/data_classes/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/data_classes/data_modeling.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/data_classes/neat_sequence.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/data_classes/schema.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_client/testing.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_config.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_constants.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/_shared.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/_tracking/base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/_tracking/log.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/examples/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_classic.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_dict.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_dms.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_dms_graph.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_iodd.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_raw.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/loaders/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/loaders/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/queries/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/queries/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_iodd.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_prune_graph.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_rdfpath.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_graph/transformers/_value_type.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/_contextmanagers.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/_factory.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/_external.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/_general.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/_properties.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/_resources.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/errors/_wrapper.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/formatters.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/_external.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/_general.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/_models.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/_properties.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/_resources.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_issues/warnings/user_modeling.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/_constants.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/_shared.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/analysis/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/catalog/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/catalog/classic_model.xlsx +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/catalog/hello_world_pump.xlsx +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/catalog/info-rules-imf.xlsx +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_rules2instance_template.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/exporters/_validation.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/_imf2rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/_inference2rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/_owl2rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_rdf/_shared.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/_base_input.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/_base_rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/_types.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/data_types.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_constants.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_loaders.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_multi_value.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_single_value.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_types.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/entities/_wrapped.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/information/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/information/_rules.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/information/_validation.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/mapping/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/mapping/_classic2core.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/models/mapping/_classic2core.yaml +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/transformers/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/transformers/_mapping.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_rules/transformers/_verification.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_collector.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_drop.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_explore.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_fix.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_inspect.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_mapping.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_prepare.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_read.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_set.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_show.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_state.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_subset.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_to.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/_wizard.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/engine/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/engine/_import.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/engine/_interface.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/engine/_load.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_session/exceptions.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_shared.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_store/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_store/_graph_store.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_store/_provenance.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_store/_rules_store.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_store/exceptions.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/auth.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/auxiliary.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/collection_.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/graph_transformations_report.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/io_.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/rdf_.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/reader/__init__.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/reader/_base.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/spreadsheet.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/time_.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/upload.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/_utils/xml_.py +0 -0
- {cognite_neat-0.117.12 → cognite_neat-0.119.0}/cognite/neat/py.typed +0 -0
|
@@ -154,8 +154,12 @@ class RulesAnalysis:
|
|
|
154
154
|
def _include_ancestors(parents_by_class: dict[T_Hashable, set[T_Hashable]]) -> None:
|
|
155
155
|
# Topological sort to ensure that classes include all ancestors
|
|
156
156
|
for class_entity in list(TopologicalSorter(parents_by_class).static_order()):
|
|
157
|
+
if class_entity not in parents_by_class:
|
|
158
|
+
continue
|
|
157
159
|
parents_by_class[class_entity] |= {
|
|
158
|
-
grand_parent
|
|
160
|
+
grand_parent
|
|
161
|
+
for parent in parents_by_class[class_entity]
|
|
162
|
+
for grand_parent in parents_by_class.get(parent, set())
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
def properties_by_class(
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from collections import defaultdict
|
|
2
3
|
from collections.abc import Collection, Iterable, Sequence
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
from pathlib import Path
|
|
5
|
-
from typing import Literal
|
|
6
|
+
from typing import Literal
|
|
6
7
|
|
|
7
8
|
from cognite.client import data_modeling as dm
|
|
8
9
|
from cognite.client.data_classes.data_modeling import DataModelId, DataModelIdentifier
|
|
@@ -16,8 +17,13 @@ from cognite.client.data_classes.data_modeling.data_types import Enum as DMSEnum
|
|
|
16
17
|
from cognite.client.data_classes.data_modeling.views import (
|
|
17
18
|
MultiEdgeConnectionApply,
|
|
18
19
|
MultiReverseDirectRelationApply,
|
|
20
|
+
ReverseDirectRelation,
|
|
21
|
+
SingleEdgeConnection,
|
|
19
22
|
SingleEdgeConnectionApply,
|
|
23
|
+
SingleReverseDirectRelation,
|
|
20
24
|
SingleReverseDirectRelationApply,
|
|
25
|
+
View,
|
|
26
|
+
ViewProperty,
|
|
21
27
|
ViewPropertyApply,
|
|
22
28
|
)
|
|
23
29
|
from cognite.client.utils import ms_to_datetime
|
|
@@ -28,11 +34,13 @@ from cognite.neat._issues import IssueList, MultiValueError, NeatIssue, catch_is
|
|
|
28
34
|
from cognite.neat._issues.errors import (
|
|
29
35
|
FileTypeUnexpectedError,
|
|
30
36
|
NeatValueError,
|
|
37
|
+
PropertyTypeNotSupportedError,
|
|
31
38
|
ResourceMissingIdentifierError,
|
|
32
39
|
ResourceRetrievalError,
|
|
33
40
|
)
|
|
34
41
|
from cognite.neat._issues.warnings import (
|
|
35
42
|
MissingCogniteClientWarning,
|
|
43
|
+
NeatValueWarning,
|
|
36
44
|
PropertyNotFoundWarning,
|
|
37
45
|
PropertyTypeNotSupportedWarning,
|
|
38
46
|
ResourceNotFoundWarning,
|
|
@@ -45,7 +53,7 @@ from cognite.neat._rules.models import (
|
|
|
45
53
|
DMSInputRules,
|
|
46
54
|
DMSSchema,
|
|
47
55
|
)
|
|
48
|
-
from cognite.neat._rules.models.data_types import DataType, Enum
|
|
56
|
+
from cognite.neat._rules.models.data_types import DataType, Enum, String
|
|
49
57
|
from cognite.neat._rules.models.dms import (
|
|
50
58
|
DMSInputContainer,
|
|
51
59
|
DMSInputEnum,
|
|
@@ -63,6 +71,10 @@ from cognite.neat._rules.models.entities import (
|
|
|
63
71
|
ReverseConnectionEntity,
|
|
64
72
|
ViewEntity,
|
|
65
73
|
)
|
|
74
|
+
from cognite.neat._rules.models.information import (
|
|
75
|
+
InformationInputClass,
|
|
76
|
+
InformationInputProperty,
|
|
77
|
+
)
|
|
66
78
|
|
|
67
79
|
|
|
68
80
|
class DMSImporter(BaseImporter[DMSInputRules]):
|
|
@@ -332,19 +344,27 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
332
344
|
)
|
|
333
345
|
return None
|
|
334
346
|
|
|
335
|
-
|
|
347
|
+
container_property = (
|
|
348
|
+
self._get_container_property_definition(prop) if isinstance(prop, dm.MappedPropertyApply) else None
|
|
349
|
+
)
|
|
350
|
+
value_type = self._get_value_type(prop, container_property, enum_collection_by_container_property)
|
|
336
351
|
if value_type is None:
|
|
352
|
+
self.issue_list.append(
|
|
353
|
+
PropertyTypeNotSupportedWarning(view_entity.as_id(), "view", prop_id, type(prop).__name__)
|
|
354
|
+
)
|
|
337
355
|
return None
|
|
356
|
+
if isinstance(value_type, ViewEntity) and value_type.as_id() not in self._all_views_by_id:
|
|
357
|
+
self.issue_list.append(ResourceUnknownWarning(prop.source, "view", view_entity.as_id(), "view"))
|
|
338
358
|
|
|
339
359
|
return DMSInputProperty(
|
|
340
360
|
description=prop.description,
|
|
341
361
|
name=prop.name,
|
|
342
362
|
connection=self._get_connection_type(prop),
|
|
343
363
|
value_type=str(value_type),
|
|
344
|
-
min_count=self._get_min_count(prop),
|
|
345
|
-
max_count=self._get_max_count(prop),
|
|
364
|
+
min_count=self._get_min_count(prop, container_property),
|
|
365
|
+
max_count=self._get_max_count(prop, container_property),
|
|
346
366
|
immutable=self._get_immutable(prop),
|
|
347
|
-
default=self._get_default(prop),
|
|
367
|
+
default=self._get_default(prop, container_property),
|
|
348
368
|
container=(
|
|
349
369
|
str(ContainerEntity.from_id(prop.container)) if isinstance(prop, dm.MappedPropertyApply) else None
|
|
350
370
|
),
|
|
@@ -357,7 +377,7 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
357
377
|
constraint=self._get_constraint(prop, prop_id),
|
|
358
378
|
)
|
|
359
379
|
|
|
360
|
-
def
|
|
380
|
+
def _get_container_property_definition(self, prop: dm.MappedPropertyApply) -> dm.ContainerProperty:
|
|
361
381
|
"""This method assumes you have already checked that the container with property exists."""
|
|
362
382
|
return self._all_containers_by_id[prop.container].properties[prop.container_property_identifier]
|
|
363
383
|
|
|
@@ -372,40 +392,48 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
372
392
|
elif isinstance(prop, SingleReverseDirectRelationApply | MultiReverseDirectRelationApply):
|
|
373
393
|
return ReverseConnectionEntity(property=prop.through.property)
|
|
374
394
|
elif isinstance(prop, dm.MappedPropertyApply) and isinstance(
|
|
375
|
-
self.
|
|
395
|
+
self._get_container_property_definition(prop).type, dm.DirectRelation
|
|
376
396
|
):
|
|
377
397
|
return "direct"
|
|
378
398
|
else:
|
|
379
399
|
return None
|
|
380
400
|
|
|
401
|
+
@classmethod
|
|
381
402
|
def _get_value_type(
|
|
382
|
-
|
|
383
|
-
prop: ViewPropertyApply,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
enum_collection_by_container_property: dict[tuple[dm.ContainerId, str], str],
|
|
403
|
+
cls,
|
|
404
|
+
prop: ViewPropertyApply | ViewProperty,
|
|
405
|
+
container_property: dm.ContainerProperty | None = None,
|
|
406
|
+
enum_collection_by_container_property: dict[tuple[dm.ContainerId, str], str] | None = None,
|
|
387
407
|
) -> DataType | ViewEntity | DMSUnknownEntity | None:
|
|
388
408
|
if isinstance(
|
|
389
409
|
prop,
|
|
390
410
|
SingleEdgeConnectionApply
|
|
391
411
|
| MultiEdgeConnectionApply
|
|
392
412
|
| SingleReverseDirectRelationApply
|
|
393
|
-
| MultiReverseDirectRelationApply
|
|
413
|
+
| MultiReverseDirectRelationApply
|
|
414
|
+
| SingleEdgeConnection
|
|
415
|
+
| dm.MultiEdgeConnection
|
|
416
|
+
| SingleReverseDirectRelation
|
|
417
|
+
| dm.MultiReverseDirectRelation,
|
|
394
418
|
):
|
|
395
419
|
return ViewEntity.from_id(prop.source)
|
|
396
|
-
elif isinstance(prop, dm.MappedPropertyApply):
|
|
397
|
-
|
|
398
|
-
|
|
420
|
+
elif isinstance(prop, dm.MappedPropertyApply | dm.MappedProperty):
|
|
421
|
+
if isinstance(prop, dm.MappedPropertyApply):
|
|
422
|
+
if container_property is None:
|
|
423
|
+
raise ValueError("container property must be provided when prop is a MappedProperty")
|
|
424
|
+
prop_type = container_property.type
|
|
425
|
+
else:
|
|
426
|
+
prop_type = prop.type
|
|
427
|
+
if isinstance(prop_type, dm.DirectRelation):
|
|
399
428
|
if prop.source is None:
|
|
400
429
|
return DMSUnknownEntity()
|
|
401
|
-
elif prop.source not in self._all_views_by_id:
|
|
402
|
-
self.issue_list.append(ResourceUnknownWarning(prop.source, "view", view_entity.as_id(), "view"))
|
|
403
|
-
return ViewEntity.from_id(prop.source)
|
|
404
430
|
else:
|
|
405
431
|
return ViewEntity.from_id(prop.source)
|
|
406
|
-
elif isinstance(
|
|
407
|
-
return DataType.load(f"{
|
|
408
|
-
elif isinstance(
|
|
432
|
+
elif isinstance(prop_type, PropertyTypeWithUnit) and prop_type.unit:
|
|
433
|
+
return DataType.load(f"{prop_type._type}(unit={prop_type.unit.external_id})")
|
|
434
|
+
elif isinstance(prop_type, DMSEnum):
|
|
435
|
+
if enum_collection_by_container_property is None:
|
|
436
|
+
return String()
|
|
409
437
|
collection = enum_collection_by_container_property.get(
|
|
410
438
|
(prop.container, prop.container_property_identifier)
|
|
411
439
|
)
|
|
@@ -415,30 +443,46 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
415
443
|
f"BUG in Neat: Enum for {prop.container}.{prop.container_property_identifier} not found."
|
|
416
444
|
)
|
|
417
445
|
|
|
418
|
-
return Enum(collection=ClassEntity(suffix=collection), unknownValue=
|
|
446
|
+
return Enum(collection=ClassEntity(suffix=collection), unknownValue=prop_type.unknown_value)
|
|
419
447
|
else:
|
|
420
|
-
return DataType.load(
|
|
448
|
+
return DataType.load(prop_type._type)
|
|
421
449
|
else:
|
|
422
|
-
self.issue_list.append(
|
|
423
|
-
PropertyTypeNotSupportedWarning[dm.ViewId](view_entity.as_id(), "view", prop_id, type(prop).__name__)
|
|
424
|
-
)
|
|
425
450
|
return None
|
|
426
451
|
|
|
427
|
-
|
|
452
|
+
@classmethod
|
|
453
|
+
def _get_min_count(
|
|
454
|
+
cls,
|
|
455
|
+
prop: ViewPropertyApply | ViewProperty,
|
|
456
|
+
container_property: dm.ContainerProperty | None = None,
|
|
457
|
+
) -> int | None:
|
|
428
458
|
if isinstance(prop, dm.MappedPropertyApply):
|
|
429
|
-
|
|
459
|
+
if container_property is None:
|
|
460
|
+
raise ValueError("container_property must be provided when prop is a MappedPropertyApply")
|
|
461
|
+
return int(not container_property.nullable)
|
|
462
|
+
elif isinstance(prop, dm.MappedProperty):
|
|
463
|
+
return int(not prop.nullable)
|
|
430
464
|
else:
|
|
431
465
|
return None
|
|
432
466
|
|
|
433
467
|
def _get_immutable(self, prop: ViewPropertyApply) -> bool | None:
|
|
434
468
|
if isinstance(prop, dm.MappedPropertyApply):
|
|
435
|
-
return self.
|
|
469
|
+
return self._get_container_property_definition(prop).immutable
|
|
436
470
|
else:
|
|
437
471
|
return None
|
|
438
472
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
473
|
+
@classmethod
|
|
474
|
+
def _get_max_count(
|
|
475
|
+
cls,
|
|
476
|
+
prop: ViewPropertyApply | ViewProperty,
|
|
477
|
+
container_property: dm.ContainerProperty | None = None,
|
|
478
|
+
) -> int | float | None:
|
|
479
|
+
if isinstance(prop, dm.MappedPropertyApply | dm.MappedProperty):
|
|
480
|
+
if isinstance(prop, dm.MappedPropertyApply):
|
|
481
|
+
if container_property is None:
|
|
482
|
+
raise ValueError("get_container must be provided when prop is a MappedPropertyApply")
|
|
483
|
+
prop_type = container_property.type
|
|
484
|
+
else:
|
|
485
|
+
prop_type = prop.type
|
|
442
486
|
if isinstance(prop_type, ListablePropertyType):
|
|
443
487
|
if prop_type.is_list is False:
|
|
444
488
|
return 1
|
|
@@ -450,17 +494,41 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
450
494
|
return DMS_PRIMITIVE_LIST_DEFAULT_LIMIT
|
|
451
495
|
else:
|
|
452
496
|
return 1
|
|
453
|
-
elif isinstance(
|
|
497
|
+
elif isinstance(
|
|
498
|
+
prop,
|
|
499
|
+
MultiEdgeConnectionApply
|
|
500
|
+
| MultiReverseDirectRelationApply
|
|
501
|
+
| dm.MultiEdgeConnection
|
|
502
|
+
| dm.MultiReverseDirectRelation,
|
|
503
|
+
):
|
|
454
504
|
return float("inf")
|
|
455
|
-
elif isinstance(
|
|
505
|
+
elif isinstance(
|
|
506
|
+
prop,
|
|
507
|
+
SingleEdgeConnectionApply
|
|
508
|
+
| SingleReverseDirectRelationApply
|
|
509
|
+
| SingleEdgeConnection
|
|
510
|
+
| SingleReverseDirectRelation,
|
|
511
|
+
):
|
|
456
512
|
return 1
|
|
457
513
|
else:
|
|
458
|
-
|
|
514
|
+
warnings.warn(
|
|
515
|
+
NeatValueWarning(f"Unknown property type {type(prop)}. Assuming max count is inf"), stacklevel=2
|
|
516
|
+
)
|
|
459
517
|
return None
|
|
460
518
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
519
|
+
@classmethod
|
|
520
|
+
def _get_default(
|
|
521
|
+
cls,
|
|
522
|
+
prop: ViewPropertyApply | ViewProperty,
|
|
523
|
+
container_property: dm.ContainerProperty | None = None,
|
|
524
|
+
) -> str | None:
|
|
525
|
+
if isinstance(prop, dm.MappedPropertyApply | dm.MappedProperty):
|
|
526
|
+
if isinstance(prop, dm.MappedPropertyApply):
|
|
527
|
+
if container_property is None:
|
|
528
|
+
raise ValueError("container_property must be provided when prop is a MappedPropertyApply")
|
|
529
|
+
default = container_property.default_value
|
|
530
|
+
else:
|
|
531
|
+
default = prop.default_value
|
|
464
532
|
if default is not None:
|
|
465
533
|
return str(default)
|
|
466
534
|
return None
|
|
@@ -559,3 +627,43 @@ class DMSImporter(BaseImporter[DMSInputRules]):
|
|
|
559
627
|
)
|
|
560
628
|
)
|
|
561
629
|
return enum_by_container_property
|
|
630
|
+
|
|
631
|
+
@classmethod
|
|
632
|
+
def as_information_input_property(
|
|
633
|
+
cls, entity: ClassEntity, prop_id: str, view_property: ViewProperty
|
|
634
|
+
) -> InformationInputProperty:
|
|
635
|
+
if not isinstance(view_property, dm.MappedProperty | dm.EdgeConnection | ReverseDirectRelation):
|
|
636
|
+
raise PropertyTypeNotSupportedError(
|
|
637
|
+
dm.ViewId(str(entity.prefix), str(entity.suffix), entity.version),
|
|
638
|
+
"view",
|
|
639
|
+
prop_id,
|
|
640
|
+
type(view_property).__name__,
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
value_type = cls._get_value_type(view_property)
|
|
644
|
+
if value_type is None:
|
|
645
|
+
raise NeatValueError(f"Failed to get value type for {entity} property {prop_id}")
|
|
646
|
+
|
|
647
|
+
return InformationInputProperty(
|
|
648
|
+
class_=entity,
|
|
649
|
+
property_=prop_id,
|
|
650
|
+
value_type=str(value_type),
|
|
651
|
+
name=view_property.name,
|
|
652
|
+
description=view_property.description,
|
|
653
|
+
min_count=cls._get_min_count(view_property),
|
|
654
|
+
max_count=cls._get_max_count(view_property),
|
|
655
|
+
default=cls._get_default(view_property),
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
@classmethod
|
|
659
|
+
def as_information_input_class(cls, view: View) -> InformationInputClass:
|
|
660
|
+
return InformationInputClass(
|
|
661
|
+
class_=ClassEntity(prefix=view.space, suffix=view.external_id, version=view.version),
|
|
662
|
+
name=view.name,
|
|
663
|
+
description=view.description,
|
|
664
|
+
implements=[
|
|
665
|
+
ClassEntity(prefix=parent.space, suffix=parent.external_id, version=parent.version)
|
|
666
|
+
for parent in view.implements or []
|
|
667
|
+
]
|
|
668
|
+
or None,
|
|
669
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any, cast
|
|
4
4
|
|
|
5
5
|
import pandas as pd
|
|
6
6
|
from cognite.client import data_modeling as dm
|
|
@@ -103,6 +103,9 @@ class InformationInputProperty(InputComponent[InformationProperty]):
|
|
|
103
103
|
output["Value Type"] = load_value_type(self.value_type, default_prefix)
|
|
104
104
|
return output
|
|
105
105
|
|
|
106
|
+
def copy(self, update: dict[str, Any], default_prefix: str) -> "InformationInputProperty":
|
|
107
|
+
return cast(InformationInputProperty, type(self)._load({**self.dump(default_prefix), **update}))
|
|
108
|
+
|
|
106
109
|
|
|
107
110
|
@dataclass
|
|
108
111
|
class InformationInputClass(InputComponent[InformationClass]):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from ._base import RulesTransformer, VerifiedRulesTransformer
|
|
2
2
|
from ._converters import (
|
|
3
3
|
AddClassImplements,
|
|
4
|
+
AddCogniteProperties,
|
|
4
5
|
ChangeViewPrefix,
|
|
5
6
|
ClassicPrepareCore,
|
|
6
7
|
ConversionTransformer,
|
|
@@ -29,6 +30,7 @@ from ._verification import VerifyAnyRules, VerifyDMSRules, VerifyInformationRule
|
|
|
29
30
|
|
|
30
31
|
__all__ = [
|
|
31
32
|
"AddClassImplements",
|
|
33
|
+
"AddCogniteProperties",
|
|
32
34
|
"AsParentPropertyId",
|
|
33
35
|
"ChangeViewPrefix",
|
|
34
36
|
"ClassicPrepareCore",
|