cognite-neat 0.93.0__tar.gz → 0.95.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.
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/PKG-INFO +2 -2
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/_rules.py +16 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/_rules_input.py +16 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/_rules.py +14 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/_rules_input.py +14 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_base.py +2 -7
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_prepare.py +3 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_read.py +6 -0
- cognite_neat-0.95.0/cognite/neat/_session/_show.py +278 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_to.py +3 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/exceptions.py +9 -6
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_store/_base.py +2 -2
- cognite_neat-0.95.0/cognite/neat/_version.py +1 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/pyproject.toml +2 -2
- cognite_neat-0.93.0/cognite/neat/_session/_show.py +0 -96
- cognite_neat-0.93.0/cognite/neat/_version.py +0 -1
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/LICENSE +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/README.md +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/asgi/metrics.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/configuration.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/context_manager/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/context_manager/manager.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/data_classes/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/data_classes/rest.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/explorer.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/routers/configuration.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/routers/crud.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/routers/metrics.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/routers/workflows.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/utils/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/utils/data_mapping.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/utils/logging.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/api/utils/query_templates.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/main.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/monitoring/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/monitoring/metrics.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/index.html +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/.gitignore +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/README.md +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/asset-manifest.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/favicon.ico +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/img/architect-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/img/developer-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/img/sme-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/index.html +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/logo192.png +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/manifest.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/robots.txt +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/css/main.72e3d92e.css +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/css/main.72e3d92e.css.map +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js.map +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/package-lock.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/package.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/favicon.ico +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/img/architect-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/img/developer-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/img/sme-icon.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/index.html +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/logo192.png +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/manifest.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/public/robots.txt +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/App.css +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/App.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/App.test.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/MainContainer.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/JsonViewer.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/LocalUploader.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/OverviewComponentEditorDialog.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/StepEditorDialog.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/TabPanel.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/Utils.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowDeleteDialog.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowExecutionReport.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowImportExportDialog.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowMetadataDialog.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/index.css +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/index.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/logo.svg +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/reportWebVitals.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/setupTests.js +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/types/WorkflowTypes.ts +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/views/AboutView.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/views/ConfigView.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/views/GlobalConfigView.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/src/views/WorkflowView.tsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_app/ui/neat-app/tsconfig.json +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_config.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_constants.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/_shared.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/_tracking/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/_tracking/base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/_tracking/log.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/examples/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_classic.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_events.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_files.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_dexpi.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_dms.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_iodd.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_mock_graph_generator.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/extractors/_rdf_file.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/loaders/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/loaders/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/loaders/_rdf2asset.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/loaders/_rdf2dms.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/models.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/queries/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/queries/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/queries/_construct.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/queries/_shared.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_classic_cdf.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_iodd.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_prune_graph.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_rdfpath.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_graph/transformers/_value_type.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/_external.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/_general.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/_properties.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/_resources.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/errors/_workflow.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/formatters.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/_external.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/_general.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/_models.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/_properties.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/_resources.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_issues/warnings/user_modeling.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/_constants.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/_shared.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/analysis/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/analysis/_asset.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/analysis/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/analysis/_dms.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/analysis/_information.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/catalog/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/catalog/info-rules-imf.xlsx +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_rules2dms.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_rules2excel.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_rules2instance_template.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_rules2ontology.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_rules2yaml.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/exporters/_validation.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dms2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_dtdl2rules/spec.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_imf2rules/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_imf2rules/_imf2classes.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_imf2rules/_imf2metadata.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_imf2rules/_imf2properties.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_imf2rules/_imf2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_inference2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_owl2rules/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_owl2rules/_owl2classes.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_owl2rules/_owl2metadata.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_owl2rules/_owl2properties.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_owl2rules/_owl2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_rdf/_shared.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_spreadsheet2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/importers/_yaml2rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/_base_input.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/_base_rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/_rdfpath.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/_types.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/asset/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/asset/_rules.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/asset/_rules_input.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/asset/_validation.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/data_types.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/_exporter.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/_schema.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/dms/_validation.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/domain.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_constants.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_loaders.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_multi_value.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_single_value.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_types.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/entities/_wrapped.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/_validation.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/mapping/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/mapping/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/mapping/_classic2core.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/_converters.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/_mapping.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/_pipelines.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/transformers/_verification.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_state.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_session/_wizard.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_shared.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_store/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_store/_provenance.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/auth.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/auxiliary.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/data_classes.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/loaders/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/loaders/_base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/loaders/_data_modeling.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/cdf/loaders/_ingestion.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/collection_.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/rdf_.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/spreadsheet.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/text.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/time_.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/upload.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_utils/xml_.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/base.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/cdf_store.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/examples/Export_DMS/workflow.yaml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/examples/Export_Semantic_Data_Model/workflow.yaml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/examples/Import_DMS/workflow.yaml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/examples/Validate_Rules/workflow.yaml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/manager.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/model.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/data_contracts.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/graph_extractor.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/graph_loader.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/graph_store.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/rules_exporter.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/rules_importer.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/current/rules_validator.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/io/__init__.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/lib/io/io_steps.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps/step_model.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/steps_registry.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/tasks.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/triggers.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_workflows/utils.py +0 -0
- {cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cognite-neat
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.95.0
|
|
4
4
|
Summary: Knowledge graph transformation
|
|
5
5
|
Home-page: https://cognite-neat.readthedocs-hosted.com/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -30,7 +30,7 @@ Requires-Dist: google-auth-oauthlib ; extra == "google"
|
|
|
30
30
|
Requires-Dist: gspread ; extra == "google"
|
|
31
31
|
Requires-Dist: ipycytoscape (>=1.3.3,<2.0.0)
|
|
32
32
|
Requires-Dist: jinja2 (>=3.1.2,<4.0.0) ; extra == "graphql" or extra == "all"
|
|
33
|
-
Requires-Dist: matplotlib (
|
|
33
|
+
Requires-Dist: matplotlib (==3.5.2)
|
|
34
34
|
Requires-Dist: mkdocs ; extra == "docs"
|
|
35
35
|
Requires-Dist: mkdocs-autorefs (>=0.5.0,<0.6.0) ; extra == "docs"
|
|
36
36
|
Requires-Dist: mkdocs-git-authors-plugin ; extra == "docs"
|
|
@@ -5,6 +5,7 @@ from collections.abc import Hashable
|
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from typing import TYPE_CHECKING, Any, ClassVar, Literal
|
|
7
7
|
|
|
8
|
+
import pandas as pd
|
|
8
9
|
from cognite.client import data_modeling as dm
|
|
9
10
|
from pydantic import Field, field_serializer, field_validator, model_validator
|
|
10
11
|
from pydantic_core.core_schema import SerializationInfo, ValidationInfo
|
|
@@ -451,3 +452,18 @@ class DMSRules(BaseRules):
|
|
|
451
452
|
from ._exporter import _DMSExporter
|
|
452
453
|
|
|
453
454
|
return _DMSExporter(self, include_pipeline, instance_space).to_schema()
|
|
455
|
+
|
|
456
|
+
def _repr_html_(self) -> str:
|
|
457
|
+
summary = {
|
|
458
|
+
"type": "Physical Data Model",
|
|
459
|
+
"intended for": "DMS Architect",
|
|
460
|
+
"name": self.metadata.name,
|
|
461
|
+
"space": self.metadata.space,
|
|
462
|
+
"external_id": self.metadata.external_id,
|
|
463
|
+
"version": self.metadata.version,
|
|
464
|
+
"views": len(self.views),
|
|
465
|
+
"containers": len(self.containers) if self.containers else 0,
|
|
466
|
+
"properties": len(self.properties),
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return pd.DataFrame([summary]).T.rename(columns={0: ""})._repr_html_() # type: ignore
|
|
@@ -3,6 +3,7 @@ from dataclasses import dataclass
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import Any, Literal
|
|
5
5
|
|
|
6
|
+
import pandas as pd
|
|
6
7
|
from cognite.client import data_modeling as dm
|
|
7
8
|
|
|
8
9
|
from cognite.neat._rules.models._base_input import InputComponent, InputRules
|
|
@@ -291,3 +292,18 @@ class DMSInputRules(InputRules[DMSRules]):
|
|
|
291
292
|
"Last": last,
|
|
292
293
|
"Reference": reference,
|
|
293
294
|
}
|
|
295
|
+
|
|
296
|
+
def _repr_html_(self) -> str:
|
|
297
|
+
summary = {
|
|
298
|
+
"type": "Physical Data Model",
|
|
299
|
+
"intended for": "DMS Architect",
|
|
300
|
+
"name": self.metadata.name,
|
|
301
|
+
"space": self.metadata.space,
|
|
302
|
+
"external_id": self.metadata.external_id,
|
|
303
|
+
"version": self.metadata.version,
|
|
304
|
+
"views": len(self.views),
|
|
305
|
+
"containers": len(self.containers) if self.containers else 0,
|
|
306
|
+
"properties": len(self.properties),
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return pd.DataFrame([summary]).T.rename(columns={0: ""})._repr_html_() # type: ignore
|
{cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/_rules.py
RENAMED
|
@@ -4,6 +4,7 @@ from collections.abc import Hashable
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from typing import TYPE_CHECKING, Any, ClassVar
|
|
6
6
|
|
|
7
|
+
import pandas as pd
|
|
7
8
|
from pydantic import Field, field_serializer, field_validator, model_validator
|
|
8
9
|
from pydantic_core.core_schema import SerializationInfo
|
|
9
10
|
from rdflib import Namespace
|
|
@@ -380,3 +381,16 @@ class InformationRules(BaseRules):
|
|
|
380
381
|
from cognite.neat._rules.transformers._converters import _InformationRulesConverter
|
|
381
382
|
|
|
382
383
|
return _InformationRulesConverter(self).as_dms_rules()
|
|
384
|
+
|
|
385
|
+
def _repr_html_(self) -> str:
|
|
386
|
+
summary = {
|
|
387
|
+
"type": "Logical Data Model",
|
|
388
|
+
"intended for": "Information Architect",
|
|
389
|
+
"name": self.metadata.name,
|
|
390
|
+
"external_id": self.metadata.prefix,
|
|
391
|
+
"version": self.metadata.version,
|
|
392
|
+
"classes": len(self.classes),
|
|
393
|
+
"properties": len(self.properties),
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
return pd.DataFrame([summary]).T.rename(columns={0: ""})._repr_html_() # type: ignore
|
{cognite_neat-0.93.0 → cognite_neat-0.95.0}/cognite/neat/_rules/models/information/_rules_input.py
RENAMED
|
@@ -2,6 +2,7 @@ from dataclasses import dataclass, field
|
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
from typing import Any, Literal
|
|
4
4
|
|
|
5
|
+
import pandas as pd
|
|
5
6
|
from rdflib import Namespace
|
|
6
7
|
|
|
7
8
|
from cognite.neat._rules.models._base_input import InputComponent, InputRules
|
|
@@ -144,3 +145,16 @@ class InformationInputRules(InputRules[InformationRules]):
|
|
|
144
145
|
Last=last,
|
|
145
146
|
Reference=reference,
|
|
146
147
|
)
|
|
148
|
+
|
|
149
|
+
def _repr_html_(self) -> str:
|
|
150
|
+
summary = {
|
|
151
|
+
"type": "Logical Data Model",
|
|
152
|
+
"intended for": "Information Architect",
|
|
153
|
+
"name": self.metadata.name,
|
|
154
|
+
"external_id": self.metadata.prefix,
|
|
155
|
+
"version": self.metadata.version,
|
|
156
|
+
"classes": len(self.classes),
|
|
157
|
+
"properties": len(self.properties),
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return pd.DataFrame([summary]).T.rename(columns={0: ""})._repr_html_() # type: ignore
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
from typing import Literal, cast
|
|
2
2
|
|
|
3
|
-
import pandas as pd
|
|
4
3
|
from cognite.client import CogniteClient
|
|
5
4
|
|
|
6
5
|
from cognite.neat._issues import IssueList
|
|
7
6
|
from cognite.neat._rules import importers
|
|
8
7
|
from cognite.neat._rules._shared import ReadRules
|
|
9
8
|
from cognite.neat._rules.models import DMSRules
|
|
10
|
-
from cognite.neat._rules.models._base_input import InputComponent
|
|
11
9
|
from cognite.neat._rules.models.information._rules import InformationRules
|
|
12
10
|
from cognite.neat._rules.models.information._rules_input import InformationInputRules
|
|
13
11
|
from cognite.neat._rules.transformers import ConvertToRules, VerifyAnyRules
|
|
@@ -72,13 +70,10 @@ class NeatSession:
|
|
|
72
70
|
|
|
73
71
|
output = []
|
|
74
72
|
if state.input_rules and not state.verified_rules:
|
|
75
|
-
|
|
76
|
-
table = pd.DataFrame([metadata.dump()]).T._repr_html_() # type: ignore[operator]
|
|
77
|
-
output.append(f"<H2>Raw Data Model</H2><br />{table}")
|
|
73
|
+
output.append(f"<H2>Raw Data Model</H2><br />{state.input_rule.rules._repr_html_()}") # type: ignore
|
|
78
74
|
|
|
79
75
|
if state.verified_rules:
|
|
80
|
-
|
|
81
|
-
output.append(f"<H2>Data Model</H2><br />{table}")
|
|
76
|
+
output.append(f"<H2>Data Model</H2><br />{state.last_verified_rule._repr_html_()}") # type: ignore
|
|
82
77
|
|
|
83
78
|
if state.has_store:
|
|
84
79
|
output.append(f"<H2>Instances</H2> {state.store._repr_html_()}")
|
|
@@ -9,8 +9,10 @@ from cognite.neat._rules.models.information._rules_input import InformationInput
|
|
|
9
9
|
from cognite.neat._rules.transformers import ReduceCogniteModel, ToCompliantEntities, ToExtension
|
|
10
10
|
|
|
11
11
|
from ._state import SessionState
|
|
12
|
+
from .exceptions import intercept_session_exceptions
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
@intercept_session_exceptions
|
|
14
16
|
class PrepareAPI:
|
|
15
17
|
def __init__(self, state: SessionState, verbose: bool) -> None:
|
|
16
18
|
self._state = state
|
|
@@ -18,6 +20,7 @@ class PrepareAPI:
|
|
|
18
20
|
self.data_model = DataModelPrepareAPI(state, verbose)
|
|
19
21
|
|
|
20
22
|
|
|
23
|
+
@intercept_session_exceptions
|
|
21
24
|
class DataModelPrepareAPI:
|
|
22
25
|
def __init__(self, state: SessionState, verbose: bool) -> None:
|
|
23
26
|
self._state = state
|
|
@@ -12,8 +12,10 @@ from cognite.neat._rules._shared import ReadRules
|
|
|
12
12
|
|
|
13
13
|
from ._state import SessionState
|
|
14
14
|
from ._wizard import NeatObjectType, RDFFileType, object_wizard, rdf_dm_wizard
|
|
15
|
+
from .exceptions import intercept_session_exceptions
|
|
15
16
|
|
|
16
17
|
|
|
18
|
+
@intercept_session_exceptions
|
|
17
19
|
class ReadAPI:
|
|
18
20
|
def __init__(self, state: SessionState, client: CogniteClient | None, verbose: bool) -> None:
|
|
19
21
|
self._state = state
|
|
@@ -23,6 +25,7 @@ class ReadAPI:
|
|
|
23
25
|
self.excel = ExcelReadAPI(state, client, verbose)
|
|
24
26
|
|
|
25
27
|
|
|
28
|
+
@intercept_session_exceptions
|
|
26
29
|
class BaseReadAPI:
|
|
27
30
|
def __init__(self, state: SessionState, client: CogniteClient | None, verbose: bool) -> None:
|
|
28
31
|
self._state = state
|
|
@@ -47,6 +50,7 @@ class BaseReadAPI:
|
|
|
47
50
|
raise ValueError(f"Expected str or Path, got {type(io)}")
|
|
48
51
|
|
|
49
52
|
|
|
53
|
+
@intercept_session_exceptions
|
|
50
54
|
class CDFReadAPI(BaseReadAPI):
|
|
51
55
|
def data_model(self, data_model_id: DataModelIdentifier) -> IssueList:
|
|
52
56
|
if self._client is None:
|
|
@@ -58,6 +62,7 @@ class CDFReadAPI(BaseReadAPI):
|
|
|
58
62
|
return input_rules.issues
|
|
59
63
|
|
|
60
64
|
|
|
65
|
+
@intercept_session_exceptions
|
|
61
66
|
class ExcelReadAPI(BaseReadAPI):
|
|
62
67
|
def __call__(self, io: Any) -> IssueList:
|
|
63
68
|
filepath = self._return_filepath(io)
|
|
@@ -66,6 +71,7 @@ class ExcelReadAPI(BaseReadAPI):
|
|
|
66
71
|
return input_rules.issues
|
|
67
72
|
|
|
68
73
|
|
|
74
|
+
@intercept_session_exceptions
|
|
69
75
|
class RDFReadAPI(BaseReadAPI):
|
|
70
76
|
def __init__(self, state: SessionState, client: CogniteClient | None, verbose: bool) -> None:
|
|
71
77
|
super().__init__(state, client, verbose)
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import random
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
|
|
4
|
+
import networkx as nx
|
|
5
|
+
from ipycytoscape import CytoscapeWidget # type: ignore
|
|
6
|
+
from IPython.display import display
|
|
7
|
+
|
|
8
|
+
from cognite.neat._rules._constants import EntityTypes
|
|
9
|
+
from cognite.neat._rules.models.dms._rules import DMSRules
|
|
10
|
+
from cognite.neat._rules.models.entities._single_value import ClassEntity, ViewEntity
|
|
11
|
+
from cognite.neat._rules.models.information._rules import InformationRules
|
|
12
|
+
from cognite.neat._session.exceptions import NeatSessionError
|
|
13
|
+
from cognite.neat._utils.rdf_ import remove_namespace_from_uri
|
|
14
|
+
|
|
15
|
+
from ._state import SessionState
|
|
16
|
+
from .exceptions import intercept_session_exceptions
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@intercept_session_exceptions
|
|
20
|
+
class ShowAPI:
|
|
21
|
+
def __init__(self, state: SessionState) -> None:
|
|
22
|
+
self._state = state
|
|
23
|
+
self.data_model = ShowDataModelAPI(self._state)
|
|
24
|
+
self.instances = ShowInstanceAPI(self._state)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@intercept_session_exceptions
|
|
28
|
+
class ShowInstanceAPI:
|
|
29
|
+
def __init__(self, state: SessionState) -> None:
|
|
30
|
+
self._state = state
|
|
31
|
+
|
|
32
|
+
def __call__(self) -> Any:
|
|
33
|
+
if not self._state.store.graph:
|
|
34
|
+
raise NeatSessionError("No instances available. Try using [bold].read[/bold] to load instances.")
|
|
35
|
+
|
|
36
|
+
widget = CytoscapeWidget()
|
|
37
|
+
widget.layout.height = "700px"
|
|
38
|
+
|
|
39
|
+
NxGraph, types = self._generate_instance_di_graph_and_types()
|
|
40
|
+
widget_style = self._generate_cytoscape_widget_style(types)
|
|
41
|
+
widget.set_style(widget_style)
|
|
42
|
+
|
|
43
|
+
widget.graph.add_graph_from_networkx(NxGraph)
|
|
44
|
+
print("Max of 100 nodes and edges are displayed, which are randomly selected.")
|
|
45
|
+
|
|
46
|
+
return display(widget)
|
|
47
|
+
|
|
48
|
+
def _generate_instance_di_graph_and_types(self) -> tuple[nx.DiGraph, set[str]]:
|
|
49
|
+
query = """
|
|
50
|
+
SELECT ?s ?p ?o ?ts ?to WHERE {
|
|
51
|
+
?s ?p ?o .
|
|
52
|
+
FILTER(isIRI(?o)) # Example filter to check if ?o is an IRI (object type)
|
|
53
|
+
FILTER(BOUND(?o))
|
|
54
|
+
FILTER(?p != rdf:type)
|
|
55
|
+
|
|
56
|
+
?s a ?ts .
|
|
57
|
+
?o a ?to .
|
|
58
|
+
}
|
|
59
|
+
LIMIT 100
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
NxGraph = nx.DiGraph()
|
|
63
|
+
|
|
64
|
+
types = set()
|
|
65
|
+
|
|
66
|
+
for ( # type: ignore
|
|
67
|
+
subject,
|
|
68
|
+
property_,
|
|
69
|
+
object,
|
|
70
|
+
subject_type,
|
|
71
|
+
object_type,
|
|
72
|
+
) in self._state.store.graph.query(query):
|
|
73
|
+
subject = remove_namespace_from_uri(subject)
|
|
74
|
+
property_ = remove_namespace_from_uri(property_)
|
|
75
|
+
object = remove_namespace_from_uri(object)
|
|
76
|
+
subject_type = remove_namespace_from_uri(subject_type)
|
|
77
|
+
object_type = remove_namespace_from_uri(object_type)
|
|
78
|
+
|
|
79
|
+
NxGraph.add_node(subject, label=subject, type=subject_type)
|
|
80
|
+
NxGraph.add_node(object, label=object, type=object_type)
|
|
81
|
+
NxGraph.add_edge(subject, object, label=property_)
|
|
82
|
+
|
|
83
|
+
types.add(subject_type)
|
|
84
|
+
types.add(object_type)
|
|
85
|
+
|
|
86
|
+
return NxGraph, types
|
|
87
|
+
|
|
88
|
+
def _generate_cytoscape_widget_style(self, types: set[str]) -> list[dict]:
|
|
89
|
+
widget_style = [
|
|
90
|
+
{
|
|
91
|
+
"selector": "edge",
|
|
92
|
+
"style": {
|
|
93
|
+
"width": 1,
|
|
94
|
+
"target-arrow-shape": "triangle",
|
|
95
|
+
"curve-style": "bezier",
|
|
96
|
+
"label": "data(label)",
|
|
97
|
+
"font-size": "8px",
|
|
98
|
+
"line-color": "black",
|
|
99
|
+
"target-arrow-color": "black",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
colors = self._generate_hex_colors(len(types))
|
|
105
|
+
|
|
106
|
+
for i, type_ in enumerate(types):
|
|
107
|
+
widget_style.append(self._generate_node_cytoscape_style(type_, colors[i]))
|
|
108
|
+
|
|
109
|
+
return widget_style
|
|
110
|
+
|
|
111
|
+
@staticmethod
|
|
112
|
+
def _generate_hex_colors(n: int) -> list[str]:
|
|
113
|
+
"""Generate a list of N random HEX color codes."""
|
|
114
|
+
random.seed(42) # Set a seed for deterministic behavior
|
|
115
|
+
hex_colors = []
|
|
116
|
+
for _ in range(n):
|
|
117
|
+
color = f"#{random.randint(0, 0xFFFFFF):06x}"
|
|
118
|
+
hex_colors.append(color)
|
|
119
|
+
return hex_colors
|
|
120
|
+
|
|
121
|
+
@staticmethod
|
|
122
|
+
def _generate_node_cytoscape_style(type_: str, color: str) -> dict:
|
|
123
|
+
template = {
|
|
124
|
+
"css": {
|
|
125
|
+
"content": "data(label)",
|
|
126
|
+
"text-valign": "center",
|
|
127
|
+
"color": "black",
|
|
128
|
+
"font-size": "10px",
|
|
129
|
+
"width": "mapData(score, 0, 1, 10, 50)",
|
|
130
|
+
"height": "mapData(score, 0, 1, 10, 50)",
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
template["selector"] = f'node[type = "{type_}"]' # type: ignore
|
|
135
|
+
template["css"]["background-color"] = color
|
|
136
|
+
|
|
137
|
+
return template
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@intercept_session_exceptions
|
|
141
|
+
class ShowDataModelAPI:
|
|
142
|
+
def __init__(self, state: SessionState) -> None:
|
|
143
|
+
self._state = state
|
|
144
|
+
|
|
145
|
+
def __call__(self) -> Any:
|
|
146
|
+
if not self._state.last_verified_dms_rules and not self._state.last_verified_information_rules:
|
|
147
|
+
raise NeatSessionError(
|
|
148
|
+
"No verified data model available. Try using [bold].verify()[/bold] to verify data model."
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
if self._state.last_verified_dms_rules:
|
|
152
|
+
NxGraph = self._generate_dms_di_graph()
|
|
153
|
+
elif self._state.last_verified_information_rules:
|
|
154
|
+
NxGraph = self._generate_info_di_graph()
|
|
155
|
+
|
|
156
|
+
widget = self._generate_widget()
|
|
157
|
+
widget.graph.add_graph_from_networkx(NxGraph)
|
|
158
|
+
return display(widget)
|
|
159
|
+
|
|
160
|
+
def _generate_dms_di_graph(self) -> nx.DiGraph:
|
|
161
|
+
"""Generate a DiGraph from the last verified DMS rules."""
|
|
162
|
+
NxGraph = nx.DiGraph()
|
|
163
|
+
|
|
164
|
+
# Add nodes and edges from Views sheet
|
|
165
|
+
for view in cast(DMSRules, self._state.last_verified_dms_rules).views:
|
|
166
|
+
# if possible use human readable label coming from the view name
|
|
167
|
+
if not NxGraph.has_node(view.view.suffix):
|
|
168
|
+
NxGraph.add_node(view.view.suffix, label=view.name or view.view.suffix)
|
|
169
|
+
|
|
170
|
+
# add implements as edges
|
|
171
|
+
if view.implements:
|
|
172
|
+
for implement in view.implements:
|
|
173
|
+
if not NxGraph.has_node(implement.suffix):
|
|
174
|
+
NxGraph.add_node(implement.suffix, label=implement.suffix)
|
|
175
|
+
|
|
176
|
+
NxGraph.add_edge(view.view.suffix, implement.suffix, label="implements")
|
|
177
|
+
|
|
178
|
+
# Add nodes and edges from Properties sheet
|
|
179
|
+
for prop_ in cast(DMSRules, self._state.last_verified_dms_rules).properties:
|
|
180
|
+
if prop_.connection and isinstance(prop_.value_type, ViewEntity):
|
|
181
|
+
if not NxGraph.has_node(prop_.view.suffix):
|
|
182
|
+
NxGraph.add_node(prop_.view.suffix, label=prop_.view.suffix)
|
|
183
|
+
|
|
184
|
+
label = f"{prop_.property_} [{0 if prop_.nullable else 1}..{ '' if prop_.is_list else 1}]"
|
|
185
|
+
NxGraph.add_edge(prop_.view.suffix, prop_.value_type.suffix, label=label)
|
|
186
|
+
|
|
187
|
+
return NxGraph
|
|
188
|
+
|
|
189
|
+
def _generate_info_di_graph(self) -> nx.DiGraph:
|
|
190
|
+
"""Generate nodes and edges for the last verified Information rules for DiGraph."""
|
|
191
|
+
|
|
192
|
+
NxGraph = nx.DiGraph()
|
|
193
|
+
|
|
194
|
+
# Add nodes and edges from Views sheet
|
|
195
|
+
for class_ in cast(InformationRules, self._state.last_verified_information_rules).classes:
|
|
196
|
+
# if possible use human readable label coming from the view name
|
|
197
|
+
if not NxGraph.has_node(class_.class_.suffix):
|
|
198
|
+
NxGraph.add_node(
|
|
199
|
+
class_.class_.suffix,
|
|
200
|
+
label=class_.name or class_.class_.suffix,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
# add implements as edges
|
|
204
|
+
if class_.parent:
|
|
205
|
+
for parent in class_.parent:
|
|
206
|
+
if not NxGraph.has_node(parent.suffix):
|
|
207
|
+
NxGraph.add_node(parent.suffix, label=parent.suffix)
|
|
208
|
+
|
|
209
|
+
NxGraph.add_edge(class_.class_.suffix, parent.suffix, label="subClassOf")
|
|
210
|
+
|
|
211
|
+
# Add nodes and edges from Properties sheet
|
|
212
|
+
for prop_ in cast(InformationRules, self._state.last_verified_information_rules).properties:
|
|
213
|
+
if prop_.type_ == EntityTypes.object_property:
|
|
214
|
+
if not NxGraph.has_node(prop_.class_.suffix):
|
|
215
|
+
NxGraph.add_node(prop_.class_.suffix, label=prop_.class_.suffix)
|
|
216
|
+
|
|
217
|
+
label = f"{prop_.property_} [{1 if prop_.is_mandatory else 0}..{ '' if prop_.is_list else 1}]"
|
|
218
|
+
NxGraph.add_edge(
|
|
219
|
+
prop_.class_.suffix,
|
|
220
|
+
cast(ClassEntity, prop_.value_type).suffix,
|
|
221
|
+
label=label,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
return NxGraph
|
|
225
|
+
|
|
226
|
+
def _generate_widget(self):
|
|
227
|
+
"""Generates an empty a CytoscapeWidget."""
|
|
228
|
+
widget = CytoscapeWidget()
|
|
229
|
+
widget.layout.height = "700px"
|
|
230
|
+
|
|
231
|
+
widget.set_style(
|
|
232
|
+
[
|
|
233
|
+
{
|
|
234
|
+
"selector": "node",
|
|
235
|
+
"css": {
|
|
236
|
+
"content": "data(label)",
|
|
237
|
+
"text-valign": "center",
|
|
238
|
+
"color": "black",
|
|
239
|
+
"background-color": "#33C4FF",
|
|
240
|
+
"font-size": "10px",
|
|
241
|
+
"width": "mapData(score, 0, 1, 10, 50)",
|
|
242
|
+
"height": "mapData(score, 0, 1, 10, 50)",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"selector": "edge",
|
|
247
|
+
"style": {
|
|
248
|
+
"width": 1,
|
|
249
|
+
"target-arrow-shape": "triangle",
|
|
250
|
+
"curve-style": "bezier",
|
|
251
|
+
"label": "data(label)",
|
|
252
|
+
"font-size": "8px",
|
|
253
|
+
"line-color": "black",
|
|
254
|
+
"target-arrow-color": "black",
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"selector": 'edge[label = "subClassOf"]',
|
|
259
|
+
"style": {
|
|
260
|
+
"line-color": "grey",
|
|
261
|
+
"target-arrow-color": "grey",
|
|
262
|
+
"line-style": "dashed",
|
|
263
|
+
"font-size": "8px",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"selector": 'edge[label = "implements"]',
|
|
268
|
+
"style": {
|
|
269
|
+
"line-color": "grey",
|
|
270
|
+
"target-arrow-color": "grey",
|
|
271
|
+
"line-style": "dashed",
|
|
272
|
+
"font-size": "8px",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
]
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
return widget
|
|
@@ -8,8 +8,10 @@ from cognite.neat._rules import exporters
|
|
|
8
8
|
from cognite.neat._session._wizard import space_wizard
|
|
9
9
|
|
|
10
10
|
from ._state import SessionState
|
|
11
|
+
from .exceptions import intercept_session_exceptions
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
@intercept_session_exceptions
|
|
13
15
|
class ToAPI:
|
|
14
16
|
def __init__(self, state: SessionState, client: CogniteClient | None, verbose: bool) -> None:
|
|
15
17
|
self._state = state
|
|
@@ -39,6 +41,7 @@ class ToAPI:
|
|
|
39
41
|
return None
|
|
40
42
|
|
|
41
43
|
|
|
44
|
+
@intercept_session_exceptions
|
|
42
45
|
class CDFToAPI:
|
|
43
46
|
def __init__(self, state: SessionState, client: CogniteClient | None, verbose: bool) -> None:
|
|
44
47
|
self._client = client
|
|
@@ -23,6 +23,8 @@ def _intercept_session_exceptions(func: Callable):
|
|
|
23
23
|
return func(*args, **kwargs)
|
|
24
24
|
except NeatSessionError as e:
|
|
25
25
|
action = func.__name__
|
|
26
|
+
if action == "__call__":
|
|
27
|
+
action = func.__qualname__.removesuffix(".__call__").removesuffix("API")
|
|
26
28
|
print(f"{_PREFIX} Cannot {action}: {e}")
|
|
27
29
|
|
|
28
30
|
return wrapper
|
|
@@ -33,10 +35,11 @@ def intercept_session_exceptions(cls: type):
|
|
|
33
35
|
while to_check:
|
|
34
36
|
cls = to_check.pop()
|
|
35
37
|
for attr_name in dir(cls):
|
|
36
|
-
if
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
if attr_name.startswith("_") and not attr_name == "__call__":
|
|
39
|
+
continue
|
|
40
|
+
attr = getattr(cls, attr_name)
|
|
41
|
+
if callable(attr):
|
|
42
|
+
setattr(cls, attr_name, _intercept_session_exceptions(attr))
|
|
43
|
+
elif isinstance(attr, type):
|
|
44
|
+
to_check.append(attr)
|
|
42
45
|
return cls
|
|
@@ -3,7 +3,7 @@ import warnings
|
|
|
3
3
|
from collections.abc import Iterable
|
|
4
4
|
from datetime import datetime, timezone
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import cast
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
9
|
from pandas import Index
|
|
@@ -383,6 +383,6 @@ class NeatGraphStore:
|
|
|
383
383
|
],
|
|
384
384
|
ignore_index=True,
|
|
385
385
|
)
|
|
386
|
-
shorter_summary.index = cast(Index
|
|
386
|
+
shorter_summary.index = cast(Index, indexes)
|
|
387
387
|
|
|
388
388
|
return shorter_summary
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.95.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cognite-neat"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.95.0"
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
description = "Knowledge graph transformation"
|
|
6
6
|
authors = [
|
|
@@ -62,7 +62,7 @@ urllib3 = "^2"
|
|
|
62
62
|
openpyxl = "*"
|
|
63
63
|
networkx = "^3.4.2"
|
|
64
64
|
ipycytoscape = "^1.3.3"
|
|
65
|
-
matplotlib = "
|
|
65
|
+
matplotlib = "=3.5.2"
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
# Notebook
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
from typing import Any, cast
|
|
2
|
-
|
|
3
|
-
import networkx as nx
|
|
4
|
-
from ipycytoscape import CytoscapeWidget # type: ignore
|
|
5
|
-
from IPython.display import display
|
|
6
|
-
|
|
7
|
-
from cognite.neat._rules.models.dms._rules import DMSRules
|
|
8
|
-
from cognite.neat._rules.models.entities._single_value import ViewEntity
|
|
9
|
-
|
|
10
|
-
from ._state import SessionState
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class ShowAPI:
|
|
14
|
-
def __init__(self, state: SessionState) -> None:
|
|
15
|
-
self._state = state
|
|
16
|
-
self.data_model = ShowDataModelAPI(self._state)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ShowDataModelAPI:
|
|
20
|
-
def __init__(self, state: SessionState) -> None:
|
|
21
|
-
self._state = state
|
|
22
|
-
|
|
23
|
-
def __call__(self) -> Any:
|
|
24
|
-
if self._state.last_verified_dms_rules:
|
|
25
|
-
digraph = self._generate_dms_di_graph()
|
|
26
|
-
widget = self._generate_widget()
|
|
27
|
-
widget.graph.add_graph_from_networkx(digraph)
|
|
28
|
-
return display(widget)
|
|
29
|
-
|
|
30
|
-
def _generate_dms_di_graph(self) -> nx.DiGraph:
|
|
31
|
-
"""Generate a DiGraph from the last verified DMS rules."""
|
|
32
|
-
G = nx.DiGraph()
|
|
33
|
-
|
|
34
|
-
nodes, edges = self._generate_dms_rules_nodes_and_edges()
|
|
35
|
-
G.add_nodes_from(nodes)
|
|
36
|
-
G.add_edges_from(edges)
|
|
37
|
-
for node in G.nodes:
|
|
38
|
-
G.nodes[node]["label"] = node
|
|
39
|
-
|
|
40
|
-
return G
|
|
41
|
-
|
|
42
|
-
def _generate_dms_rules_nodes_and_edges(self) -> tuple[list[str], list[tuple[str, str, dict]]]:
|
|
43
|
-
"""Generate nodes and edges for the last verified DMS rules for DiGraph."""
|
|
44
|
-
|
|
45
|
-
nodes = []
|
|
46
|
-
edges = []
|
|
47
|
-
|
|
48
|
-
for prop_ in cast(DMSRules, self._state.last_verified_dms_rules).properties:
|
|
49
|
-
nodes.append(prop_.view.suffix)
|
|
50
|
-
|
|
51
|
-
if prop_.connection and isinstance(prop_.value_type, ViewEntity):
|
|
52
|
-
label = f"{prop_.property_} [{0 if prop_.nullable else 1}..{ '' if prop_.is_list else 1}]"
|
|
53
|
-
edges.append((prop_.view.suffix, prop_.value_type.suffix, {"label": label}))
|
|
54
|
-
|
|
55
|
-
for view in cast(DMSRules, self._state.last_verified_dms_rules).views:
|
|
56
|
-
nodes.append(view.view.suffix)
|
|
57
|
-
|
|
58
|
-
if view.implements:
|
|
59
|
-
for implement in view.implements:
|
|
60
|
-
edges.append((view.view.suffix, implement.suffix, {"label": "implements"}))
|
|
61
|
-
|
|
62
|
-
return nodes, edges
|
|
63
|
-
|
|
64
|
-
def _generate_widget(self):
|
|
65
|
-
"""Generates an empty a CytoscapeWidget."""
|
|
66
|
-
widget = CytoscapeWidget()
|
|
67
|
-
widget.layout.height = "500px"
|
|
68
|
-
|
|
69
|
-
widget.set_style(
|
|
70
|
-
[
|
|
71
|
-
{
|
|
72
|
-
"selector": "node",
|
|
73
|
-
"css": {
|
|
74
|
-
"content": "data(label)",
|
|
75
|
-
"text-valign": "center",
|
|
76
|
-
"color": "black",
|
|
77
|
-
"background-color": "#33C4FF",
|
|
78
|
-
"font-size": "10px",
|
|
79
|
-
"width": "mapData(score, 0, 1, 10, 50)",
|
|
80
|
-
"height": "mapData(score, 0, 1, 10, 50)",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"selector": "edge",
|
|
85
|
-
"style": {
|
|
86
|
-
"width": 1,
|
|
87
|
-
"target-arrow-shape": "triangle",
|
|
88
|
-
"curve-style": "bezier",
|
|
89
|
-
"label": "data(label)",
|
|
90
|
-
"font-size": "8px",
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
]
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
return widget
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.93.0"
|
|
File without changes
|