Installation¶
Since OWL-APy is a Python library, you will need to have Python on your system. Python comes in various versions and with different, sometimes conflicting dependencies. Hence, most guides will recommend to set up a “virtual environment” to work in.
One such system for virtual python environments is Anaconda. You can download miniconda from https://docs.conda.io/en/latest/miniconda.html.
We have good experience with it and make use of conda in the Installation from source step.
Installation from source¶
To download the OWL-APy source code, you will also need to have a copy of the Git version control system.
Once you have conda
and git
installed, the following commands
should be typed in your shell in order to download the OWL-APy
development sources, install the dependencies listened in the
environment.yml
into a conda environment and create the necessary
installation links to get started with the library.
Download (clone) the source code
git clone https://github.com/AKSW/owlapy.git cd owlapy
Load the dependencies into a new conda environment called “temp” (you can name it however you like)
conda create --name temp python=3.8 conda activate temp conda env update --name temp
Install the development links so that Python will find the library
python -c 'from setuptools import setup; setup()' develop
Instead of the previous step there is also Possibility B, which is valid temporarily only in your current shell:
export PYTHONPATH=$PWD
Now you are ready to develop on OWL-APy or use the library!
Verify installation¶
To test if the installation was successful, you can try this command: It will only try to load the main library file into Python:
python -c "import owlapy"
Tests¶
In order to run our test suite, type:
tox
You can also run the tests directly using:
pytest
Installation via pip¶
Released versions of OWL-APy can also be installed using pip
, the
Package Installer for Python. It comes as part of Python. Please
research externally (or use above conda create
command) on how to
create virtual environments for Python programs.
pip install owlapy
This will download and install the latest release version of OWL-APy and all its dependencies from https://pypi.org/project/owlapy/.
Building (sdist and bdist_wheel)¶
In order to create a distribution of the OWL-APy source code,
typically when creating a new release, it is necessary to use the
build
tool. It can be invoked with:
tox -e build
from the main source code folder. Packages created by build
can then
be uploaded as releases to the Python Package Index
(PyPI) using
twine.
Building the docs¶
The documentation can be built with
tox -e docs
It is also possible to create a PDF manual, but that requires LaTeX to be installed:
tox -e docs latexpdf
Contribution¶
Feel free to create a pull request.
Questions¶
For any further questions, please open an issue on our GitHub issues page.