Contributions - Kozea/Radicale GitHub Wiki

Code Contributions

Feel free to contribute fixes/extensions by PR, the are welcome!

In case of bigger changes, please start a discussion first.

In any case, before submitting a PR, please run test locally to validate your PR

Syntax/Code Test

Preparation

Install required packages, e.g. on Fedora Linux

yum install python3-flake8 python3-isort python3-mypy python3-pytest python3-pytest-isort python3-typeguard

Tests

Run "flake8"

flake8
...

No error should be reported!

Run "isort"

isort --check --diff .
...

No error should be reported!

Run "mypy"

python -c 'import importlib.util, subprocess, sys; importlib.util.find_spec("mypy") and sys.exit(subprocess.run(["mypy", "."]).returncode)'
...

No error should be reported!

Run "pytest"

python3 setup.py build || exit 1
python3 setup.py install --root dist || exit 1
pytest
...

The output should only show "passed" and "warnings"