1.1. Usage#

1.1.1. Installation#

I will give some hints on how to use this project here…

First, create a virtual environment for Python 3.9.

(base) $ python3 -m venv venv

Activate the environment with

(base) $ source venv/bin/activate

(.venv is the name of the virtual environment that has been initialized before.) Now, clone the repository from GitLab:

(venv) $ git clone 'https://your-repo.git'

Load all dependencies from requirements.txt:

(venv) $ pip install -r requirements.txt

You’re set and ready to go. If you add new dependencies remeber to update the requirements file via

(venv) $ pip freeze -> requirements.txt

1.1.2. Comitting and Testing#

We want to avoid commits that corrupt the repository. Pre-commit hooks allow to test for well-formatted code and faults. Make sure pre-commit hooks are working. Install via

(venv) $ pre-commit install

Check if its working:

(venv) $ pre-commit run --all-files

Now, if you commit, these hooks should automatically run on the code and point out any errors. Additionally, you should check if the code passess all specified tests. This will be done automatically on each merge request. By making sure your code passes the unit tests you can avoid unnecessary work.

1.1.3. Local Build#

Of course you can also build the documentation locally via

(venv) $ sphinx-build -b html ./docs/ ./docs/build

or parallelize the build with:

(venv) $ sphinx-build -j 4 -b html ./docs/ ./docs/build

use a Live-Server tool to view index.html in the build directory.

1.2. Configuration#

Make sure to configure the lib.config module to access the root directory of the repository and the needed datasets by specifying the paths there.