cognite-neat 0.118.0__tar.gz → 0.119.1__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.118.0 → cognite_neat-0.119.1}/PKG-INFO +1 -1
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/_contextmanagers.py +3 -1
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/_factory.py +3 -6
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/analysis/_base.py +5 -1
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_converters.py +204 -19
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_base.py +1 -1
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/text.py +24 -2
- cognite_neat-0.119.1/cognite/neat/_version.py +2 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/pyproject.toml +1 -1
- cognite_neat-0.118.0/cognite/neat/_version.py +0 -2
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/LICENSE +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/README.md +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_alpha.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api/data_modeling_loaders.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api/neat_instances.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api/schema.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api_client.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/data_modeling.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/neat_sequence.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/schema.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/testing.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_config.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_constants.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/_shared.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/_tracking/base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/_tracking/log.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/examples/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_classic.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_dict.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_dms.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_dms_graph.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_iodd.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_raw.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/loaders/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/loaders/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/queries/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/queries/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_iodd.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_prune_graph.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_rdfpath.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_value_type.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/_external.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/_general.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/_properties.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/_resources.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/errors/_wrapper.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/formatters.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/_external.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/_general.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/_models.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/_properties.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/_resources.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/user_modeling.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/_constants.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/_shared.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/analysis/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/classic_model.xlsx +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/hello_world_pump.xlsx +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/info-rules-imf.xlsx +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2instance_template.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_validation.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_imf2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_inference2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_owl2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_shared.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/_base_input.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/_base_rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/_types.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/data_types.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/_rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/_rules_input.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_constants.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_loaders.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_multi_value.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_single_value.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_types.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_wrapped.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_rules.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_rules_input.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_validation.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/_classic2core.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/_classic2core.yaml +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_mapping.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_verification.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_collector.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_drop.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_explore.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_fix.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_inspect.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_mapping.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_prepare.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_read.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_set.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_show.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_state.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_subset.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_template.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_to.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/_wizard.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/engine/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/engine/_import.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/engine/_interface.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/engine/_load.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_session/exceptions.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_shared.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_store/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_store/_graph_store.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_store/_provenance.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_store/_rules_store.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_store/exceptions.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/auth.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/auxiliary.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/collection_.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/graph_transformations_report.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/io_.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/rdf_.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/reader/__init__.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/reader/_base.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/spreadsheet.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/time_.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/upload.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/xml_.py +0 -0
- {cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/py.typed +0 -0
|
@@ -20,7 +20,9 @@ def catch_warnings() -> Iterator[IssueList]:
|
|
|
20
20
|
yield issues
|
|
21
21
|
finally:
|
|
22
22
|
if warning_logger:
|
|
23
|
-
issues.extend(
|
|
23
|
+
issues.extend(
|
|
24
|
+
[from_warning(warning) for warning in warning_logger if from_warning(warning) is not None]
|
|
25
|
+
)
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
@contextmanager
|
|
@@ -7,7 +7,6 @@ from cognite.neat._issues._base import NeatError, NeatWarning
|
|
|
7
7
|
from cognite.neat._utils.spreadsheet import SpreadsheetRead
|
|
8
8
|
|
|
9
9
|
from .errors import NeatValueError, SpreadsheetError
|
|
10
|
-
from .warnings import NeatValueWarning
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def from_pydantic_errors(
|
|
@@ -23,13 +22,11 @@ def from_pydantic_errors(
|
|
|
23
22
|
]
|
|
24
23
|
|
|
25
24
|
|
|
26
|
-
def from_warning(warning: WarningMessage) -> NeatWarning:
|
|
25
|
+
def from_warning(warning: WarningMessage) -> NeatWarning | None:
|
|
27
26
|
if isinstance(warning.message, NeatWarning):
|
|
28
27
|
return warning.message
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
message += f" Source: {warning.source}"
|
|
32
|
-
return NeatValueWarning(message)
|
|
28
|
+
|
|
29
|
+
return None
|
|
33
30
|
|
|
34
31
|
|
|
35
32
|
def _from_pydantic_error(error: ErrorDetails, read_info_by_sheet: dict[str, SpreadsheetRead]) -> NeatError:
|
|
@@ -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(
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_converters.py
RENAMED
|
@@ -9,6 +9,7 @@ from functools import cached_property
|
|
|
9
9
|
from graphlib import CycleError, TopologicalSorter
|
|
10
10
|
from typing import Any, ClassVar, Literal, TypeVar, cast, overload
|
|
11
11
|
|
|
12
|
+
from cognite.client import data_modeling as dm
|
|
12
13
|
from cognite.client.data_classes import data_modeling as dms
|
|
13
14
|
from cognite.client.data_classes.data_modeling import DataModelId, DataModelIdentifier, View, ViewId
|
|
14
15
|
from cognite.client.utils.useful_types import SequenceNotStr
|
|
@@ -28,8 +29,8 @@ from cognite.neat._constants import (
|
|
|
28
29
|
)
|
|
29
30
|
from cognite.neat._issues import IssueList
|
|
30
31
|
from cognite.neat._issues._factory import from_pydantic_errors
|
|
31
|
-
from cognite.neat._issues.errors import NeatValueError
|
|
32
|
-
from cognite.neat._issues.warnings import NeatValueWarning
|
|
32
|
+
from cognite.neat._issues.errors import CDFMissingClientError, NeatValueError
|
|
33
|
+
from cognite.neat._issues.warnings import NeatValueWarning, PropertyOverwritingWarning
|
|
33
34
|
from cognite.neat._issues.warnings._models import (
|
|
34
35
|
SolutionModelBuildOnTopOfCDMWarning,
|
|
35
36
|
)
|
|
@@ -72,7 +73,7 @@ from cognite.neat._rules.models.information import (
|
|
|
72
73
|
)
|
|
73
74
|
from cognite.neat._utils.rdf_ import get_inheritance_path
|
|
74
75
|
from cognite.neat._utils.spreadsheet import SpreadsheetRead
|
|
75
|
-
from cognite.neat._utils.text import NamingStandardization, title, to_camel_case, to_words
|
|
76
|
+
from cognite.neat._utils.text import NamingStandardization, humanize_collection, title, to_camel_case, to_words
|
|
76
77
|
|
|
77
78
|
from ._base import RulesTransformer, T_VerifiedIn, T_VerifiedOut, VerifiedRulesTransformer
|
|
78
79
|
from ._verification import VerifyDMSRules
|
|
@@ -532,13 +533,17 @@ class InformationToDMS(ConversionTransformer[InformationRules, DMSRules]):
|
|
|
532
533
|
"""Converts InformationRules to DMSRules."""
|
|
533
534
|
|
|
534
535
|
def __init__(
|
|
535
|
-
self,
|
|
536
|
+
self,
|
|
537
|
+
ignore_undefined_value_types: bool = False,
|
|
538
|
+
reserved_properties: Literal["error", "warning"] = "error",
|
|
539
|
+
client: NeatClient | None = None,
|
|
536
540
|
):
|
|
537
541
|
self.ignore_undefined_value_types = ignore_undefined_value_types
|
|
538
542
|
self.reserved_properties = reserved_properties
|
|
543
|
+
self.client = client
|
|
539
544
|
|
|
540
545
|
def transform(self, rules: InformationRules) -> DMSRules:
|
|
541
|
-
return _InformationRulesConverter(rules).as_dms_rules(
|
|
546
|
+
return _InformationRulesConverter(rules, self.client).as_dms_rules(
|
|
542
547
|
self.ignore_undefined_value_types, self.reserved_properties
|
|
543
548
|
)
|
|
544
549
|
|
|
@@ -1357,9 +1362,10 @@ class MergeInformationRules(VerifiedRulesTransformer[InformationRules, Informati
|
|
|
1357
1362
|
class _InformationRulesConverter:
|
|
1358
1363
|
_start_or_end_node: ClassVar[frozenset[str]] = frozenset({"endNode", "end_node", "startNode", "start_node"})
|
|
1359
1364
|
|
|
1360
|
-
def __init__(self, information: InformationRules):
|
|
1365
|
+
def __init__(self, information: InformationRules, client: NeatClient | None = None):
|
|
1361
1366
|
self.rules = information
|
|
1362
1367
|
self.property_count_by_container: dict[ContainerEntity, int] = defaultdict(int)
|
|
1368
|
+
self.client = client
|
|
1363
1369
|
|
|
1364
1370
|
def as_dms_rules(
|
|
1365
1371
|
self, ignore_undefined_value_types: bool = False, reserved_properties: Literal["error", "warning"] = "error"
|
|
@@ -1398,9 +1404,29 @@ class _InformationRulesConverter:
|
|
|
1398
1404
|
and (prop.property_ == "endNode" or prop.property_ == "end_node")
|
|
1399
1405
|
and isinstance(prop.value_type, ClassEntity)
|
|
1400
1406
|
}
|
|
1407
|
+
ancestors_by_view: dict[ViewEntity, set[ViewEntity]] = {}
|
|
1408
|
+
parents_by_class = RulesAnalysis(self.rules).parents_by_class(
|
|
1409
|
+
include_ancestors=True, include_different_space=True
|
|
1410
|
+
)
|
|
1411
|
+
for cls_, parents in parents_by_class.items():
|
|
1412
|
+
view_type = cls_.as_view_entity(default_space, default_version)
|
|
1413
|
+
parent_views = {parent.as_view_entity(default_space, default_version) for parent in parents}
|
|
1414
|
+
if view_type in ancestors_by_view:
|
|
1415
|
+
ancestors_by_view[view_type].update(parent_views)
|
|
1416
|
+
else:
|
|
1417
|
+
ancestors_by_view[view_type] = parent_views
|
|
1418
|
+
|
|
1419
|
+
cognite_properties, cognite_containers, cognite_views = self._get_cognite_components()
|
|
1420
|
+
for view in cognite_views:
|
|
1421
|
+
if view in ancestors_by_view:
|
|
1422
|
+
ancestors_by_view[view].update(cognite_views[view])
|
|
1423
|
+
else:
|
|
1424
|
+
ancestors_by_view[view] = cognite_views[view]
|
|
1401
1425
|
|
|
1402
1426
|
properties_by_class: dict[ClassEntity, list[DMSProperty]] = defaultdict(list)
|
|
1403
|
-
|
|
1427
|
+
used_containers: dict[ContainerEntity, Counter[ClassEntity]] = defaultdict(Counter)
|
|
1428
|
+
used_cognite_containers: dict[ContainerEntity, DMSContainer] = {}
|
|
1429
|
+
|
|
1404
1430
|
for prop in self.rules.properties:
|
|
1405
1431
|
if ignore_undefined_value_types and isinstance(prop.value_type, UnknownEntity):
|
|
1406
1432
|
continue
|
|
@@ -1413,17 +1439,34 @@ class _InformationRulesConverter:
|
|
|
1413
1439
|
warnings.warn(NeatValueWarning(f"{msg} Skipping..."), stacklevel=2)
|
|
1414
1440
|
continue
|
|
1415
1441
|
|
|
1416
|
-
|
|
1417
|
-
prop,
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1442
|
+
if cognite_property := self._find_cognite_property(
|
|
1443
|
+
prop.property_, parents_by_class[prop.class_], cognite_properties
|
|
1444
|
+
):
|
|
1445
|
+
dms_property = self._customize_cognite_property(
|
|
1446
|
+
prop,
|
|
1447
|
+
cognite_property,
|
|
1448
|
+
prop.class_,
|
|
1449
|
+
default_space,
|
|
1450
|
+
default_version,
|
|
1451
|
+
ancestors_by_view,
|
|
1452
|
+
)
|
|
1453
|
+
if dms_property.container:
|
|
1454
|
+
if dms_property.container not in used_cognite_containers:
|
|
1455
|
+
used_cognite_containers[dms_property.container] = cognite_containers[dms_property.container]
|
|
1456
|
+
else:
|
|
1457
|
+
# Not matching any parent.
|
|
1458
|
+
dms_property = self._as_dms_property(
|
|
1459
|
+
prop,
|
|
1460
|
+
default_space,
|
|
1461
|
+
default_version,
|
|
1462
|
+
edge_classes,
|
|
1463
|
+
edge_value_types_by_class_property_pair,
|
|
1464
|
+
end_node_by_edge,
|
|
1465
|
+
)
|
|
1466
|
+
if dms_property.container:
|
|
1467
|
+
used_containers[dms_property.container][prop.class_] += 1
|
|
1468
|
+
|
|
1424
1469
|
properties_by_class[prop.class_].append(dms_property)
|
|
1425
|
-
if dms_property.container:
|
|
1426
|
-
referenced_containers[dms_property.container][prop.class_] += 1
|
|
1427
1470
|
|
|
1428
1471
|
views: list[DMSView] = []
|
|
1429
1472
|
|
|
@@ -1443,11 +1486,11 @@ class _InformationRulesConverter:
|
|
|
1443
1486
|
existing_containers: set[ContainerEntity] = set()
|
|
1444
1487
|
|
|
1445
1488
|
containers: list[DMSContainer] = []
|
|
1446
|
-
for container_entity, class_entities in
|
|
1489
|
+
for container_entity, class_entities in used_containers.items():
|
|
1447
1490
|
if container_entity in existing_containers:
|
|
1448
1491
|
continue
|
|
1449
1492
|
constrains = self._create_container_constraint(
|
|
1450
|
-
class_entities, default_space, class_by_entity,
|
|
1493
|
+
class_entities, default_space, class_by_entity, used_containers
|
|
1451
1494
|
)
|
|
1452
1495
|
most_used_class_entity = class_entities.most_common(1)[0][0]
|
|
1453
1496
|
class_ = class_by_entity[most_used_class_entity]
|
|
@@ -1468,6 +1511,9 @@ class _InformationRulesConverter:
|
|
|
1468
1511
|
)
|
|
1469
1512
|
containers.append(container)
|
|
1470
1513
|
|
|
1514
|
+
if used_cognite_containers:
|
|
1515
|
+
containers.extend(used_cognite_containers.values())
|
|
1516
|
+
|
|
1471
1517
|
dms_rules = DMSRules(
|
|
1472
1518
|
metadata=dms_metadata,
|
|
1473
1519
|
properties=SheetList[DMSProperty]([prop for prop_set in properties_by_class.values() for prop in prop_set]),
|
|
@@ -1479,6 +1525,35 @@ class _InformationRulesConverter:
|
|
|
1479
1525
|
|
|
1480
1526
|
return dms_rules
|
|
1481
1527
|
|
|
1528
|
+
def _get_cognite_components(
|
|
1529
|
+
self,
|
|
1530
|
+
) -> tuple[
|
|
1531
|
+
dict[tuple[ClassEntity, str], DMSProperty],
|
|
1532
|
+
dict[ContainerEntity, DMSContainer],
|
|
1533
|
+
dict[ViewEntity, set[ViewEntity]],
|
|
1534
|
+
]:
|
|
1535
|
+
cognite_concepts = self._get_cognite_concepts()
|
|
1536
|
+
cognite_properties: dict[tuple[ClassEntity, str], DMSProperty] = {}
|
|
1537
|
+
cognite_containers: dict[ContainerEntity, DMSContainer] = {}
|
|
1538
|
+
cognite_views: dict[ViewEntity, set[ViewEntity]] = {}
|
|
1539
|
+
if cognite_concepts:
|
|
1540
|
+
if self.client is None:
|
|
1541
|
+
raise CDFMissingClientError(
|
|
1542
|
+
f"Cannot convert {self.rules.metadata.as_data_model_id()}. Missing Cognite Client."
|
|
1543
|
+
f"This is required as the data model is referencing cognite concepts in the implements"
|
|
1544
|
+
f"{humanize_collection(cognite_concepts)}"
|
|
1545
|
+
)
|
|
1546
|
+
cognite_rules = self._get_cognite_dms_rules(cognite_concepts, self.client)
|
|
1547
|
+
|
|
1548
|
+
cognite_properties = {
|
|
1549
|
+
(dms_prop.view.as_class(), dms_prop.view_property): dms_prop for dms_prop in cognite_rules.properties
|
|
1550
|
+
}
|
|
1551
|
+
cognite_containers = {container.container: container for container in cognite_rules.containers or []}
|
|
1552
|
+
cognite_views = RulesAnalysis(dms=cognite_rules).implements_by_view(
|
|
1553
|
+
include_ancestors=True, include_different_space=True
|
|
1554
|
+
)
|
|
1555
|
+
return cognite_properties, cognite_containers, cognite_views
|
|
1556
|
+
|
|
1482
1557
|
@staticmethod
|
|
1483
1558
|
def _create_container_constraint(
|
|
1484
1559
|
class_entities: Counter[ClassEntity],
|
|
@@ -1573,6 +1648,74 @@ class _InformationRulesConverter:
|
|
|
1573
1648
|
|
|
1574
1649
|
return dms_property
|
|
1575
1650
|
|
|
1651
|
+
@staticmethod
|
|
1652
|
+
def _customize_cognite_property(
|
|
1653
|
+
prop: InformationProperty,
|
|
1654
|
+
cognite_prop: DMSProperty,
|
|
1655
|
+
class_: ClassEntity,
|
|
1656
|
+
default_space: str,
|
|
1657
|
+
default_version: str,
|
|
1658
|
+
ancestors_by_view: dict[ViewEntity, set[ViewEntity]],
|
|
1659
|
+
) -> DMSProperty:
|
|
1660
|
+
"""Customize the cognite property to match the information property.
|
|
1661
|
+
This means updating the name and description of the cognite property with the information property.
|
|
1662
|
+
In addition, the value type can be updated given that the value type is matches the cognite property value
|
|
1663
|
+
type or in the case of a View Value type a derivative of the cognite property value type.
|
|
1664
|
+
|
|
1665
|
+
Args:
|
|
1666
|
+
prop: Information property
|
|
1667
|
+
cognite_prop: Cognite property
|
|
1668
|
+
class_: Class entity
|
|
1669
|
+
default_space: The default space
|
|
1670
|
+
default_version: The default version
|
|
1671
|
+
ancestors_by_view: Ancestors by view
|
|
1672
|
+
|
|
1673
|
+
Returns:
|
|
1674
|
+
DMSProperty: The customized cognite property
|
|
1675
|
+
|
|
1676
|
+
"""
|
|
1677
|
+
value_type: DataType | ViewEntity | DMSUnknownEntity = cognite_prop.value_type
|
|
1678
|
+
if isinstance(prop.value_type, DataType) and prop.value_type != value_type:
|
|
1679
|
+
warnings.warn(
|
|
1680
|
+
PropertyOverwritingWarning(prop.property_, "property", "value type", (str(prop.value_type),)),
|
|
1681
|
+
stacklevel=2,
|
|
1682
|
+
)
|
|
1683
|
+
elif isinstance(prop.value_type, DataType):
|
|
1684
|
+
# User set the same value type as core concept.
|
|
1685
|
+
pass
|
|
1686
|
+
elif isinstance(prop.value_type, ClassEntity) and isinstance(cognite_prop.value_type, ViewEntity):
|
|
1687
|
+
view_type = prop.value_type.as_view_entity(default_space, default_version)
|
|
1688
|
+
ancestors = ancestors_by_view.get(view_type, set())
|
|
1689
|
+
if view_type == cognite_prop.value_type or cognite_prop.value_type in ancestors:
|
|
1690
|
+
value_type = view_type
|
|
1691
|
+
else:
|
|
1692
|
+
warnings.warn(
|
|
1693
|
+
NeatValueWarning(
|
|
1694
|
+
f"Invalid Value Type. The view {view_type} must implement "
|
|
1695
|
+
f"{humanize_collection(ancestors, bind_word='or')} "
|
|
1696
|
+
f"to be used as the Value Type in the {prop.class_!s}.{prop.property_}. "
|
|
1697
|
+
f"Skipping..."
|
|
1698
|
+
),
|
|
1699
|
+
stacklevel=2,
|
|
1700
|
+
)
|
|
1701
|
+
else:
|
|
1702
|
+
warnings.warn(
|
|
1703
|
+
NeatValueWarning(
|
|
1704
|
+
f"Invalid Value Type. The {prop.value_type} is not supported as {prop.class_} implements"
|
|
1705
|
+
f"a cognite concepts. Will skip this, and use the {cognite_prop.value_type} instead."
|
|
1706
|
+
),
|
|
1707
|
+
stacklevel=2,
|
|
1708
|
+
)
|
|
1709
|
+
|
|
1710
|
+
return cognite_prop.model_copy(
|
|
1711
|
+
update={
|
|
1712
|
+
"view": class_.as_view_entity(default_space, default_version),
|
|
1713
|
+
"name": prop.name or cognite_prop.name,
|
|
1714
|
+
"description": prop.description or cognite_prop.description,
|
|
1715
|
+
"value_type": value_type,
|
|
1716
|
+
}
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1576
1719
|
@staticmethod
|
|
1577
1720
|
def _get_connection(
|
|
1578
1721
|
prop: InformationProperty,
|
|
@@ -1713,6 +1856,48 @@ class _InformationRulesConverter:
|
|
|
1713
1856
|
|
|
1714
1857
|
return data_types.String()
|
|
1715
1858
|
|
|
1859
|
+
def _get_cognite_concepts(self) -> set[ClassEntity]:
|
|
1860
|
+
return {cls_.class_ for cls_ in self.rules.classes if str(cls_.class_.prefix) in COGNITE_SPACES} | {
|
|
1861
|
+
parent
|
|
1862
|
+
for cls_ in self.rules.classes
|
|
1863
|
+
for parent in cls_.implements or []
|
|
1864
|
+
if str(parent.prefix) in COGNITE_SPACES
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
@staticmethod
|
|
1868
|
+
def _get_cognite_dms_rules(concepts: set[ClassEntity], client: NeatClient) -> DMSRules:
|
|
1869
|
+
view_ids = [dm.ViewId(str(cls_.prefix), cls_.suffix, cls_.version) for cls_ in concepts]
|
|
1870
|
+
views = client.loaders.views.retrieve(view_ids, format="read", include_connected=True, include_ancestor=True)
|
|
1871
|
+
spaces = Counter(view.space for view in views)
|
|
1872
|
+
space = spaces.most_common(1)[0][0]
|
|
1873
|
+
model: dm.DataModel[dm.View] = dm.DataModel(
|
|
1874
|
+
space=space,
|
|
1875
|
+
external_id="CognitePlaceholderModel",
|
|
1876
|
+
version="v1",
|
|
1877
|
+
is_global=False,
|
|
1878
|
+
last_updated_time=1,
|
|
1879
|
+
created_time=1,
|
|
1880
|
+
name=None,
|
|
1881
|
+
description="This model is constructed to hold all properties/views/containers that are referenced"
|
|
1882
|
+
"by the data model being converted to DMS. This model is not meant to be used for any other"
|
|
1883
|
+
"purpose.",
|
|
1884
|
+
views=list(views),
|
|
1885
|
+
)
|
|
1886
|
+
unverified = DMSImporter.from_data_model(client, model).to_rules()
|
|
1887
|
+
if unverified.rules is None:
|
|
1888
|
+
raise NeatValueError("Failed to create CogniteConcepts")
|
|
1889
|
+
return unverified.rules.as_verified_rules()
|
|
1890
|
+
|
|
1891
|
+
@staticmethod
|
|
1892
|
+
def _find_cognite_property(
|
|
1893
|
+
property_: str, parents: set[ClassEntity], cognite_properties: dict[tuple[ClassEntity, str], DMSProperty]
|
|
1894
|
+
) -> DMSProperty | None:
|
|
1895
|
+
"""Find the parent class that has the property in the cognite properties"""
|
|
1896
|
+
for parent in parents:
|
|
1897
|
+
if (parent, property_) in cognite_properties:
|
|
1898
|
+
return cognite_properties[(parent, property_)]
|
|
1899
|
+
return None
|
|
1900
|
+
|
|
1716
1901
|
|
|
1717
1902
|
class _DMSRulesConverter:
|
|
1718
1903
|
def __init__(self, dms: DMSRules, instance_namespace: Namespace | None = None) -> None:
|
|
@@ -168,7 +168,7 @@ class NeatSession:
|
|
|
168
168
|
self._state._raise_exception_if_condition_not_met(
|
|
169
169
|
"Convert to physical", has_dms_rules=False, has_information_rules=True
|
|
170
170
|
)
|
|
171
|
-
converter = InformationToDMS(reserved_properties=reserved_properties)
|
|
171
|
+
converter = InformationToDMS(reserved_properties=reserved_properties, client=self._state.client)
|
|
172
172
|
|
|
173
173
|
issues = self._state.rule_transform(converter)
|
|
174
174
|
|
|
@@ -192,7 +192,29 @@ def replace_non_alphanumeric_with_underscore(text: str) -> str:
|
|
|
192
192
|
return re.sub(r"\W+", "_", text)
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
def humanize_collection(collection: Collection[Any], /, *, sort: bool = True) -> str:
|
|
195
|
+
def humanize_collection(collection: Collection[Any], /, *, sort: bool = True, bind_word: str = "and") -> str:
|
|
196
|
+
"""Convert a collection of items to a human-readable string.
|
|
197
|
+
|
|
198
|
+
Args:
|
|
199
|
+
collection: The collection of items to convert.
|
|
200
|
+
sort: Whether to sort the collection before converting. Default is True.
|
|
201
|
+
bind_word: The word to use to bind the last two items. Default is "and".
|
|
202
|
+
|
|
203
|
+
Returns:
|
|
204
|
+
A human-readable string of the collection.
|
|
205
|
+
|
|
206
|
+
Examples:
|
|
207
|
+
>>> humanize_collection(["b", "c", "a"])
|
|
208
|
+
'a, b and c'
|
|
209
|
+
>>> humanize_collection(["b", "c", "a"], sort=False)
|
|
210
|
+
'b, c and a'
|
|
211
|
+
>>> humanize_collection(["a", "b"])
|
|
212
|
+
'a and b'
|
|
213
|
+
>>> humanize_collection(["a"])
|
|
214
|
+
'a'
|
|
215
|
+
>>> humanize_collection([])
|
|
216
|
+
|
|
217
|
+
"""
|
|
196
218
|
if not collection:
|
|
197
219
|
return ""
|
|
198
220
|
elif len(collection) == 1:
|
|
@@ -204,7 +226,7 @@ def humanize_collection(collection: Collection[Any], /, *, sort: bool = True) ->
|
|
|
204
226
|
else:
|
|
205
227
|
sequence = list(strings)
|
|
206
228
|
|
|
207
|
-
return f"{', '.join(sequence[:-1])}
|
|
229
|
+
return f"{', '.join(sequence[:-1])} {bind_word} {sequence[-1]}"
|
|
208
230
|
|
|
209
231
|
|
|
210
232
|
class NamingStandardization:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/_api/data_modeling_loaders.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/data_modeling.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_client/data_classes/neat_sequence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_events.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_files.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_classic_cdf.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_prune_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_graph/transformers/_value_type.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_issues/warnings/user_modeling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/classic_model.xlsx
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/hello_world_pump.xlsx
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/catalog/info-rules-imf.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/exporters/_rules2ontology.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_dtdl2rules/spec.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_imf2rules.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_inference2rules.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_rdf/_owl2rules.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/importers/_spreadsheet2rules.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/dms/_rules_input.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_constants.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_loaders.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_multi_value.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_single_value.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/entities/_wrapped.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_rules.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_rules_input.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/information/_validation.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/__init__.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/_classic2core.py
RENAMED
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/models/mapping/_classic2core.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_rules/transformers/_verification.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognite_neat-0.118.0 → cognite_neat-0.119.1}/cognite/neat/_utils/graph_transformations_report.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|