Docraise is a Python project that checks whether the docstrings in your Python code contain valid "Raises" sections. It ensures that every exception your code raises is documented in the docstrings, and vice versa - that every exception documented in the docstrings is actually raised by the code.
Install the project dependencies:
pip install -r requirements-dev.txt
Docraise uses pre-commit to manage git hooks. This helps to ensure that code style, tests, and other checks are run before each commit.
We use the following pre-commit plugins:
- black: Ensures our Python code adheres to the Black code style.
- flake8: Lints our Python code to catch potential bugs.
- isort: Sorts our Python imports.
- mypy: Checks our Python code for type errors.
- pydocstyle: Checks our Python docstrings to ensure they adhere to the docstring conventions.
- conventional commit: Ensures all commit messages adhere to the Conventional Commits style.
In the project directory, install the pre-commit hooks:
pre-commit install
pre-commit install --hook-type commit-msg
TODO
TODO
pytest tests/