Closed kysrpex closed 2 years ago
Closes #660.
The feature is available via the functions below.
from osp.core.pico import install, namespaces, packages, uninstall
I get this error while trying to import install in jupyter notebook in DSMS : ImportError: cannot import name 'install' from 'osp.core.pico' . Does the class have dependencies?
Closes #660. The feature is available via the functions below.
from osp.core.pico import install, namespaces, packages, uninstall
I get this error while trying to import install in jupyter notebook in DSMS : ImportError: cannot import name 'install' from 'osp.core.pico' . Does the class have dependencies?
Please, double-check that you have installed a version of OSP-core that includes these changes. Remember that the target of this pull request is the branch called dev
rather than master
. This means that the change is not immediately published to master
, neither to PyPI or GitHub's releases section .
Having said that, I will answer your questions from this message.
and why do we need more than just 1 path?
You do not need more than just 1 path. You can use either 1 path install("/home/me/emmo-mechanical-testing.yml")
or more install("/home/me/emmo-mechanical-testing.yml", "/home/me/another-ontology.yml", "/home/me/third-ontology.yml")
. This is just like using pico install
from the command line.
is the path passed the yml file path?
Yes
Also:
yml
file. Again also multiple names can be used. This is just like in command-line pico.packages()
, you get the names of all the packages you have installed as strings. Those are the same strings you get when you call pico list
from the command line, under the section "Packages:".namespaces()
, you get OntologyNamespace
objects for all the installed namespaces. This is similar to the behavior in command line-pico, where you get the names of the namespaces instead, under the section "Namespaces:".In addition, I am adding this to the documentation, as @yoavnash suggested. Would you like to do the review of this addition? I think it makes sense since I thought @yoavnash was the one that needed this feature but it turns out that it is you, so nobody else will know better what is adequate.
osp.core.pico
How can I check if the version I have is the right one and which one it is?
pip freeze
- google is your friend :)
pip freeze
- google is your friend :)
I am afraid this will not help because the dev
version of OSP-core has the same version number as the master version, plus here we are speaking of the commit level.
osp.core.pico
How can I check if the version I have is the right one and which one it is?
Find out where Python is importing the package from. Example on my computer (on your computer the path may be different).
In [1]: import osp.core; print(osp.core.__path__)
['~/.local/lib/python3.10/site-packages/osp/core']
Then open ~/.local/lib/python3.10/site-packages/osp/core/pico.py
and compare it with the file on this PR. If there is any difference then you did not install a version with these changes.
Closes #660.
The feature is available via the functions below.