To make changes to srai's code base, you need to fork and then clone the GitHub repository.
For first setup of the project locally, the following commands have to be executed.
-
Make sure you have installed at least version 3.9+ of Python.
-
Install PDM (only if not already installed)
pip install pdm
-
Install package locally (will download all dev packages and create a local venv)
# Optional if you want to create venv in a specific version. More info: https://pdm.fming.dev/latest/usage/venv/#create-a-virtualenv-yourself pdm venv create 3.9 # or any higher version of Python pdm install -G:all
-
Activate pdm venv
eval $(pdm venv activate) # or source ./venv/bin/activate
-
Activate pre-commit hooks
pre-commit install && pre-commit install -t commit-msg
For testing, tox is used to allow testing on multiple Python versions.
To test code locally before committing, run:
tox -e python3.9 # put your python version here
This repository uses MkDocs as a documentation generator. To build and serve the documentation locally, run:
mkdocs serve
Docstrings should be written following the google convention. To ease development one can use autoDocstring extension to generate the docstrings.
All Python code must be written compatible with Python 3.9+.
To release a new version:
bumpver update --patch
This command will update the version strings across the project, commit and tag the commit with the new version. All you need to do is to push the changes.