How-to Guides
Installing the library
There are multiple ways of installing the library. The recommended way is to use poetry package manager, which will create virtual environment for the project and install all required dependencies.
Alternative way is to install the library using pip package manager within already existing virtual environment.
Installation the library with poetry from provided source code
Installing and initializing poetry through pipx
> python -m pip install --user pipx
> python -m pipx ensurepath
> pipx install poetry
Check if poetry is successfully installed
> poetry --version
Install project’s packets and documentation builder packets with poetry
> poetry env use 3.13
The previous command will create virtual environment based on `python3.11` in subdirectory `/.venv`
> poetry install --with docs
Installation the library with pip from provided source code
Create and activate virtual environment
> python -m venv venv
> source venv/bin/activate # On Linux
> .\venv\Scripts\activate # On Windows
Install required dependencies from requirements.txt file
> pip install -r requirements.txt
> pip install -r requirements-docs.txt
Running of all the unit tests within developed library
Unit tests are located within tests subdirectory of each application. To run all the unit tests, the following commands can be used.
> python -m unittest
Obtaining coverage analysis of all unit tests within library can be done with coverage package. The following commands can be used depending on the way how the library was installed.
> python -m coverage run -m unittest
> python -m coverage report
Building documentation for the library
Build documentation sources into /documentation/source folder from python source files
> sphinx-apidoc -o documentation/source/ uo
> sphinx-apidoc -o documentation/source/ opt
Change current directory to /documentation
> cd documentation
Clean previously builded HTML documentation
/documentation> ./make clean html
Build HTML documentation from /documentation/source directory. Created documentation is within /documentation/build/html directory.
/documentation> ./make html
Generated documentation, that is in folder /documentation/build/html should be then copied into folder /docs.
/documentation> cp build/html/*.* ../docs