simphony/simphony-osp

Installing/importing ontologies from code

yoavnash opened this issue · 10 comments

[Update] In some situations, it could be useful to be able to install ontologies from the code itself, rather than installing them via pico.

@yoavnash You are referring to the editable ontology with this, right?

No, but rather being able to do something such as:

from osp.core.ontology import install_ontology

install_ontology('my_ontology.owl')

Is there a chance to support it before the next major version?

Is there a chance to support it before the next major version?

You are lucky today (see #761). Note that you need a yml configuration file to install the ontology. You can create it on the fly with the pyaml library. Avoiding that would mean solving #541.

Great! :)
What would be the command I should use?

@Ktoti For info

Great! :) What would be the command I should use?

It's on #761's description. Just pass paths separated by commas to install or package names separated by commas to uninstall. If you look at the commit there is an overwrite boolean argument for install just like in normal command-line pico. packages and namespaces do not take arguments (just like in normal command-line pico).

It's a bit hard to extract from the description. I would suggest adding a section about it somewhere in the docs.

Ktoti commented

Great! :) What would be the command I should use?

It's on #761's description. Just pass paths separated by commas to install or package names separated by commas to uninstall. If you look at the commit there is an overwrite boolean argument for install just like in normal command-line pico. packages and namespaces do not take arguments (just like in normal command-line pico).

I have some questions: Where is the description? and why do we need more than just 1 path? is the path passed the yml file path? Thanks :)

Great! :) What would be the command I should use?

It's on #761's description. Just pass paths separated by commas to install or package names separated by commas to uninstall. If you look at the commit there is an overwrite boolean argument for install just like in normal command-line pico. packages and namespaces do not take arguments (just like in normal command-line pico).

I have some questions: Where is the description? and why do we need more than just 1 path? is the path passed the yml file path? Thanks :)

With description I mean this specific message. I will answer the other questions together with the answer to this other message from you.