How-to Guides

  • Installation the library from provided source code

    1. Installing and initializing poetry through pipx

    Installing pipx
        > python -m pip install --user pipx
        > python -m pipx ensurepath
    
    Installing poetry
        > pipx install poetry
    
    1. Check if poetry is successfully installed

    Check poetry version
        > poetry --version
    
    1. Install project’s packets and documentation builder packets with poetry

    Specify that poetry will work with python version 3.11
        > poetry env use 3.11
    

    The previous command will create virtual environment based on python3.11 in subdirectory /.venv

    Install dependencies (and documentation dependencies) with poetry
        > poetry install --with docs
    
  • Running of all the unit tests within developed applications

    • Execute command for running tests from directory /

    Run all unit tests within project
        > python -m unittest
    
    • Execute command for obtaining coverage analysis from directory /

    Obtain coverage analysis of tests within project
        > python -m coverage run -m unittest
        > python -m coverage report
    
  • Building documentation for the library

    1. Build documentation sources into /documentation/source folder from python source files

    Build documentation sources
        > sphinx-apidoc -o documentation/source/ uo
        > sphinx-apidoc -o documentation/source/ opt
    
    1. Change current directory to /documentation

    Change directory
        > cd documentation
    
    1. Clean previously builded HTML documentation

    Clean HTML documentation
        /documentation> ./make clean html
    
    1. Build HTML documentation from /documentation/source directory. Created documentation is within /documentation/build/html directory.

    Build HTML documentation
        /documentation> ./make html
    
    1. Generated documentation, that is in folder /documentation/build/html should be then copied into folder /docs.

    Copy generated HTML documentation
        /documentation> cp build/html/*.* ../docs