cognite-neat 0.109.0__tar.gz → 0.109.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.109.0 → cognite_neat-0.109.2}/PKG-INFO +1 -1
- cognite_neat-0.109.2/cognite/neat/_alpha.py +14 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_rules2excel.py +31 -1
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_wrapped.py +3 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_collector.py +4 -1
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_inspect.py +1 -1
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_read.py +14 -2
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_state.py +6 -2
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_to.py +20 -5
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/exceptions.py +16 -6
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_store/_provenance.py +1 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_store/_rules_store.py +192 -127
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/spreadsheet.py +10 -1
- cognite_neat-0.109.2/cognite/neat/_version.py +2 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/pyproject.toml +1 -1
- cognite_neat-0.109.0/cognite/neat/_version.py +0 -2
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/LICENSE +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/README.md +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/_api/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/_api/data_modeling_loaders.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/_api/schema.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/_api_client.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/data_classes/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/data_classes/data_modeling.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/data_classes/neat_sequence.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/data_classes/schema.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_client/testing.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_config.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_constants.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/_shared.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/_tracking/base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/_tracking/log.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/examples/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_classic.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_dms.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_dms_graph.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_iodd.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/loaders/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/loaders/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/queries/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/queries/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/queries/_construct.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/queries/_shared.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_iodd.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_prune_graph.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_rdfpath.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_graph/transformers/_value_type.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/_external.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/_general.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/_properties.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/_resources.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/errors/_workflow.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/formatters.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/_external.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/_general.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/_models.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/_properties.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/_resources.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_issues/warnings/user_modeling.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/_constants.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/_shared.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/analysis/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/analysis/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/analysis/_dms.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/analysis/_information.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/catalog/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/catalog/classic_model.xlsx +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/catalog/hello_world_pump.xlsx +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/catalog/info-rules-imf.xlsx +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_rules2instance_template.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/exporters/_validation.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/_imf2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/_inference2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/_owl2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_rdf/_shared.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/_base_input.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/_base_rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/_types.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/data_types.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_constants.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_loaders.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_multi_value.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_single_value.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/entities/_types.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/information/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/information/_rules.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/information/_validation.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/mapping/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/mapping/_classic2core.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/models/mapping/_classic2core.yaml +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/transformers/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/transformers/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/transformers/_converters.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/transformers/_mapping.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_rules/transformers/_verification.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_create.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_drop.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_fix.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_mapping.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_prepare.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_set.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_show.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/_wizard.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/engine/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/engine/_import.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/engine/_interface.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_session/engine/_load.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_shared.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_store/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_store/_graph_store.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_store/exceptions.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/auth.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/auxiliary.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/collection_.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/graph_transformations_report.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/io_.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/rdf_.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/reader/__init__.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/reader/_base.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/text.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/time_.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/upload.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/_utils/xml_.py +0 -0
- {cognite_neat-0.109.0 → cognite_neat-0.109.2}/cognite/neat/py.typed +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AlphaWarning(UserWarning):
|
|
5
|
+
def __init__(self, feature_name: str):
|
|
6
|
+
super().__init__(f"Alpha feature '{feature_name}' is subject to change without notice")
|
|
7
|
+
|
|
8
|
+
def warn(self) -> None:
|
|
9
|
+
warnings.warn(self, stacklevel=2)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AlphaFlags:
|
|
13
|
+
manual_rules_edit = AlphaWarning("enable_manual_edit")
|
|
14
|
+
same_space_properties_only_export = AlphaWarning("same-space-properties-only")
|
|
@@ -22,6 +22,7 @@ from cognite.neat._rules.models import (
|
|
|
22
22
|
from cognite.neat._rules.models.dms import DMSMetadata
|
|
23
23
|
from cognite.neat._rules.models.information import InformationMetadata
|
|
24
24
|
from cognite.neat._rules.models.information._rules import InformationRules
|
|
25
|
+
from cognite.neat._utils.spreadsheet import find_column_with_value
|
|
25
26
|
|
|
26
27
|
from ._base import BaseExporter
|
|
27
28
|
|
|
@@ -63,12 +64,22 @@ class ExcelExporter(BaseExporter[VerifiedRules, Workbook]):
|
|
|
63
64
|
style_options = get_args(Style)
|
|
64
65
|
dump_options = get_args(DumpOptions)
|
|
65
66
|
|
|
67
|
+
_internal_columns: ClassVar[list[str]] = [
|
|
68
|
+
"physical",
|
|
69
|
+
"logical",
|
|
70
|
+
"conceptual",
|
|
71
|
+
"Neat ID",
|
|
72
|
+
]
|
|
73
|
+
|
|
66
74
|
def __init__(
|
|
67
75
|
self,
|
|
68
76
|
styling: Style = "default",
|
|
69
77
|
new_model_id: tuple[str, str] | None = None,
|
|
70
78
|
sheet_prefix: str | None = None,
|
|
71
79
|
reference_rules_with_prefix: tuple[VerifiedRules, str] | None = None,
|
|
80
|
+
add_empty_rows: bool = False,
|
|
81
|
+
hide_internal_columns: bool = True,
|
|
82
|
+
include_properties: Literal["same-space", "all"] = "all",
|
|
72
83
|
):
|
|
73
84
|
self.sheet_prefix = sheet_prefix or ""
|
|
74
85
|
if styling not in self.style_options:
|
|
@@ -77,6 +88,9 @@ class ExcelExporter(BaseExporter[VerifiedRules, Workbook]):
|
|
|
77
88
|
self._styling_level = self.style_options.index(styling)
|
|
78
89
|
self.new_model_id = new_model_id
|
|
79
90
|
self.reference_rules_with_prefix = reference_rules_with_prefix
|
|
91
|
+
self.add_empty_rows = add_empty_rows
|
|
92
|
+
self.hide_internal_columns = hide_internal_columns
|
|
93
|
+
self.include_properties = include_properties
|
|
80
94
|
|
|
81
95
|
@property
|
|
82
96
|
def description(self) -> str:
|
|
@@ -112,6 +126,16 @@ class ExcelExporter(BaseExporter[VerifiedRules, Workbook]):
|
|
|
112
126
|
if self._styling_level > 0:
|
|
113
127
|
self._adjust_column_widths(workbook)
|
|
114
128
|
|
|
129
|
+
if self.hide_internal_columns:
|
|
130
|
+
for sheet in workbook.sheetnames:
|
|
131
|
+
if sheet.lower() == "metadata":
|
|
132
|
+
continue
|
|
133
|
+
ws = workbook[sheet]
|
|
134
|
+
for col in self._internal_columns:
|
|
135
|
+
column_letter = find_column_with_value(ws, col)
|
|
136
|
+
if column_letter:
|
|
137
|
+
ws.column_dimensions[column_letter].hidden = True
|
|
138
|
+
|
|
115
139
|
return workbook
|
|
116
140
|
|
|
117
141
|
def _write_sheets(
|
|
@@ -149,13 +173,19 @@ class ExcelExporter(BaseExporter[VerifiedRules, Workbook]):
|
|
|
149
173
|
is_properties = sheet_name == "Properties"
|
|
150
174
|
is_new_class = class_ != last_class and last_class is not None
|
|
151
175
|
if self._styling_level > 2 and is_new_class and is_properties:
|
|
152
|
-
|
|
176
|
+
if self.add_empty_rows:
|
|
177
|
+
sheet.append([""] * len(headers))
|
|
153
178
|
for cell in sheet[sheet.max_row]:
|
|
154
179
|
cell.fill = PatternFill(fgColor=fill_color, patternType="solid")
|
|
155
180
|
side = Side(style="thin", color="000000")
|
|
156
181
|
cell.border = Border(left=side, right=side, top=side, bottom=side)
|
|
157
182
|
fill_color = next(fill_colors)
|
|
158
183
|
|
|
184
|
+
if is_properties and self.include_properties == "same-space":
|
|
185
|
+
space = class_.split(":")[0] if ":" in class_ else rules.metadata.space
|
|
186
|
+
if space != rules.metadata.space:
|
|
187
|
+
continue
|
|
188
|
+
|
|
159
189
|
sheet.append(row)
|
|
160
190
|
if self._styling_level > 2 and is_properties:
|
|
161
191
|
for cell in sheet[sheet.max_row]:
|
|
@@ -65,7 +65,10 @@ class Collector:
|
|
|
65
65
|
if kwargs:
|
|
66
66
|
for key, value in kwargs.items():
|
|
67
67
|
event_information[key] = self._serialize_value(value)[:500]
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
with suppress(RuntimeError):
|
|
70
|
+
# In case any thread issues, the tracking should not crash the program
|
|
71
|
+
self._track(command, event_information)
|
|
69
72
|
|
|
70
73
|
@staticmethod
|
|
71
74
|
def _serialize_value(value: Any) -> str:
|
|
@@ -110,7 +110,7 @@ class InspectIssues:
|
|
|
110
110
|
if issues is None and self._state.instances.store.provenance:
|
|
111
111
|
last_change = self._state.instances.store.provenance[-1]
|
|
112
112
|
issues = last_change.target_entity.issues
|
|
113
|
-
|
|
113
|
+
elif issues is None:
|
|
114
114
|
self._print("No issues found.")
|
|
115
115
|
return pd.DataFrame() if return_dataframe else None
|
|
116
116
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from typing import Any, Literal, cast
|
|
2
3
|
|
|
3
4
|
from cognite.client.data_classes.data_modeling import DataModelId, DataModelIdentifier
|
|
4
5
|
from cognite.client.utils.useful_types import SequenceNotStr
|
|
5
6
|
|
|
7
|
+
from cognite.neat._alpha import AlphaFlags
|
|
6
8
|
from cognite.neat._client import NeatClient
|
|
7
9
|
from cognite.neat._constants import (
|
|
8
10
|
CLASSIC_CDF_NAMESPACE,
|
|
@@ -286,16 +288,26 @@ class ExcelReadAPI(BaseReadAPI):
|
|
|
286
288
|
super().__init__(state, verbose)
|
|
287
289
|
self.examples = ExcelExampleAPI(state, verbose)
|
|
288
290
|
|
|
289
|
-
def __call__(self, io: Any) -> IssueList:
|
|
291
|
+
def __call__(self, io: Any, enable_manual_edit: bool = False) -> IssueList:
|
|
290
292
|
"""Reads a Neat Excel Rules sheet to the graph store. The rules sheet may stem from an Information architect,
|
|
291
293
|
or a DMS Architect.
|
|
292
294
|
|
|
293
295
|
Args:
|
|
294
296
|
io: file path to the Excel sheet
|
|
297
|
+
enable_manual_edit: If True, the user will be able to re-import rules which where edit outside NeatSession
|
|
298
|
+
|
|
299
|
+
!!! note "Manual Edit Warning"
|
|
300
|
+
This is an alpha feature and is subject to change without notice.
|
|
301
|
+
It is expected to have some limitations and may not work as expected in all cases.
|
|
295
302
|
"""
|
|
296
303
|
reader = NeatReader.create(io)
|
|
297
304
|
path = reader.materialize_path()
|
|
298
|
-
|
|
305
|
+
|
|
306
|
+
if enable_manual_edit:
|
|
307
|
+
warnings.filterwarnings("default")
|
|
308
|
+
AlphaFlags.manual_rules_edit.warn()
|
|
309
|
+
|
|
310
|
+
return self._state.rule_import(importers.ExcelImporter(path), enable_manual_edit)
|
|
299
311
|
|
|
300
312
|
|
|
301
313
|
@session_class_wrapper
|
|
@@ -40,8 +40,12 @@ class SessionState:
|
|
|
40
40
|
self.instances.store.add_rules(last_entity.information)
|
|
41
41
|
return issues
|
|
42
42
|
|
|
43
|
-
def rule_import(self, importer: BaseImporter) -> IssueList:
|
|
44
|
-
issues = self.rule_store.import_rules(
|
|
43
|
+
def rule_import(self, importer: BaseImporter, enable_manual_edit: bool = False) -> IssueList:
|
|
44
|
+
issues = self.rule_store.import_rules(
|
|
45
|
+
importer,
|
|
46
|
+
client=self.client,
|
|
47
|
+
enable_manual_edit=enable_manual_edit,
|
|
48
|
+
)
|
|
45
49
|
if self.rule_store.empty:
|
|
46
50
|
result = "failed"
|
|
47
51
|
else:
|
|
@@ -6,6 +6,7 @@ from typing import Any, Literal, overload
|
|
|
6
6
|
|
|
7
7
|
from cognite.client import data_modeling as dm
|
|
8
8
|
|
|
9
|
+
from cognite.neat._alpha import AlphaFlags
|
|
9
10
|
from cognite.neat._constants import COGNITE_MODELS
|
|
10
11
|
from cognite.neat._graph import loaders
|
|
11
12
|
from cognite.neat._rules import exporters
|
|
@@ -35,6 +36,8 @@ class ToAPI:
|
|
|
35
36
|
self,
|
|
36
37
|
io: Any,
|
|
37
38
|
include_reference: bool = True,
|
|
39
|
+
include_properties: Literal["same-space", "all"] = "all",
|
|
40
|
+
add_empty_rows: bool = False,
|
|
38
41
|
) -> None:
|
|
39
42
|
"""Export the verified data model to Excel.
|
|
40
43
|
|
|
@@ -42,7 +45,10 @@ class ToAPI:
|
|
|
42
45
|
io: The file path or file-like object to write the Excel file to.
|
|
43
46
|
include_reference: If True, the reference data model will be included. Defaults to True.
|
|
44
47
|
Note that this only applies if you have created the data model using the
|
|
45
|
-
.
|
|
48
|
+
create.enterprise_model(...), create.solution_model(), or create.data_product_model() methods.
|
|
49
|
+
include_properties: The properties to include in the Excel file. Defaults to "all".
|
|
50
|
+
- "same-space": Only properties that are in the same space as the data model will be included.
|
|
51
|
+
add_empty_rows: If True, empty rows will be added between each component. Defaults to False.
|
|
46
52
|
|
|
47
53
|
Example:
|
|
48
54
|
Export information model to excel rules sheet
|
|
@@ -58,17 +64,17 @@ class ToAPI:
|
|
|
58
64
|
neat = NeatSession(client)
|
|
59
65
|
|
|
60
66
|
neat.read.cdf(("cdf_cdm", "CogniteCore", "v1"))
|
|
61
|
-
neat.
|
|
62
|
-
neat.prepare.data_model.to_enterprise(
|
|
67
|
+
neat.create.enterprise_model(
|
|
63
68
|
data_model_id=("sp_doctrino_space", "ExtensionCore", "v1"),
|
|
64
69
|
org_name="MyOrg",
|
|
65
|
-
move_connections=True
|
|
66
70
|
)
|
|
67
71
|
dms_rules_file_name = "dms_rules.xlsx"
|
|
68
72
|
neat.to.excel(dms_rules_file_name, include_reference=True)
|
|
69
73
|
```
|
|
70
74
|
"""
|
|
71
75
|
reference_rules_with_prefix: tuple[VerifiedRules, str] | None = None
|
|
76
|
+
include_properties = include_properties.strip().lower()
|
|
77
|
+
|
|
72
78
|
if include_reference and self._state.last_reference:
|
|
73
79
|
if (
|
|
74
80
|
isinstance(self._state.last_reference.metadata, DMSMetadata)
|
|
@@ -79,7 +85,16 @@ class ToAPI:
|
|
|
79
85
|
prefix = "Ref"
|
|
80
86
|
reference_rules_with_prefix = self._state.last_reference, prefix
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
if include_properties == "same-space":
|
|
89
|
+
warnings.filterwarnings("default")
|
|
90
|
+
AlphaFlags.same_space_properties_only_export.warn()
|
|
91
|
+
|
|
92
|
+
exporter = exporters.ExcelExporter(
|
|
93
|
+
styling="maximal",
|
|
94
|
+
reference_rules_with_prefix=reference_rules_with_prefix,
|
|
95
|
+
add_empty_rows=add_empty_rows,
|
|
96
|
+
include_properties=include_properties, # type: ignore
|
|
97
|
+
)
|
|
83
98
|
return self._state.rule_store.export_to_file(exporter, Path(io))
|
|
84
99
|
|
|
85
100
|
def session(self, io: Any) -> None:
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import functools
|
|
2
|
+
import warnings
|
|
2
3
|
from collections.abc import Callable
|
|
3
4
|
from typing import Any
|
|
4
5
|
|
|
6
|
+
from cognite.neat._alpha import AlphaWarning
|
|
5
7
|
from cognite.neat._issues.errors import CDFMissingClientError, NeatImportError
|
|
6
8
|
from cognite.neat._issues.errors._external import OxigraphStorageLockedError
|
|
7
9
|
from cognite.neat._issues.errors._general import NeatValueError
|
|
@@ -12,9 +14,11 @@ try:
|
|
|
12
14
|
from rich import print
|
|
13
15
|
from rich.markup import escape
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
_ERROR_PREFIX = "[bold red][ERROR][/bold red]"
|
|
18
|
+
_WARNING_PREFIX = "[bold bright_magenta][WARNING][/bold bright_magenta]"
|
|
16
19
|
except ImportError:
|
|
17
|
-
|
|
20
|
+
_ERROR_PREFIX = "[ERROR]"
|
|
21
|
+
_WARNING_PREFIX = "[WARNING]"
|
|
18
22
|
|
|
19
23
|
def escape(x: Any, *_: Any, **__: Any) -> Any: # type: ignore[misc]
|
|
20
24
|
return x
|
|
@@ -31,21 +35,27 @@ def _session_method_wrapper(func: Callable, cls_name: str):
|
|
|
31
35
|
def wrapper(*args: Any, **kwargs: Any):
|
|
32
36
|
_COLLECTOR.track_session_command(f"{cls_name}.{func.__name__}", *args, **kwargs)
|
|
33
37
|
try:
|
|
34
|
-
|
|
38
|
+
with warnings.catch_warnings(record=True) as w:
|
|
39
|
+
result = func(*args, **kwargs)
|
|
40
|
+
for warning in w:
|
|
41
|
+
if isinstance(warning.message, AlphaWarning):
|
|
42
|
+
print(f"{_WARNING_PREFIX} {warning.message}")
|
|
43
|
+
|
|
44
|
+
return result
|
|
35
45
|
except NeatSessionError as e:
|
|
36
46
|
action = _get_action()
|
|
37
|
-
print(f"{
|
|
47
|
+
print(f"{_ERROR_PREFIX} Cannot {action}: {e}")
|
|
38
48
|
except (
|
|
39
49
|
CDFMissingClientError,
|
|
40
50
|
NeatImportError,
|
|
41
51
|
NeatValueError,
|
|
42
52
|
OxigraphStorageLockedError,
|
|
43
53
|
) as e:
|
|
44
|
-
print(f"{
|
|
54
|
+
print(f"{_ERROR_PREFIX} {escape(e.as_message())}")
|
|
45
55
|
except ModuleNotFoundError as e:
|
|
46
56
|
if e.name == "neatengine":
|
|
47
57
|
action = _get_action()
|
|
48
|
-
print(f"{
|
|
58
|
+
print(f"{_ERROR_PREFIX} The functionality {action} requires the NeatEngine.")
|
|
49
59
|
else:
|
|
50
60
|
raise e
|
|
51
61
|
|
|
@@ -44,6 +44,7 @@ class Agent:
|
|
|
44
44
|
CDF_AGENT = Agent(acted_on_behalf_of="UNKNOWN", id_=CDF_NAMESPACE["agent"])
|
|
45
45
|
NEAT_AGENT = Agent(acted_on_behalf_of="UNKNOWN", id_=DEFAULT_NAMESPACE["agent"])
|
|
46
46
|
UNKNOWN_AGENT = Agent(acted_on_behalf_of="UNKNOWN", id_=DEFAULT_NAMESPACE["unknown-agent"])
|
|
47
|
+
EXTERNAL_AGENT = Agent(acted_on_behalf_of="HUMAN", id_=DEFAULT_NAMESPACE["external-agent"])
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
@dataclass(frozen=True)
|