force-h2020 / force-bdss

Business Decision System general interface
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

How to maintain installed ontologies #347

Open flongford opened 4 years ago

flongford commented 4 years ago

The osp-core package provides a way to install custom OntologyNamespace objects from YML files, using the pico command line tool:

pico install <my_ontology>.yml

which are then imported into python scripts using:

from osp.core import <my_ontology>

For convenience, we could provide a force_core.yml file in our repository that is installed using pico during our CI install (but after the osp-core package has been installed). This may contain basic physical unit type, and could be expanded upon if common unit types come up. However, we also expect plugins to contribute additional ontologies if needed by their BDSS objects.

Since these YML files are not centrally registered, it is possible that multiple ontologies could possess the same name, though this namespace clash should ultimately be handled by pico. Maintenance and compatibility checking of BDSS plugins that add new ontologies may then remain fragile for the time being.