Skip to content
Snippets Groups Projects

Add pre-commit hooks

Merged Ashwin Kumar Karnad requested to merge add-pre-commit-hook into main
development.rst 0 → 100644
+ 19
0
Developers Setup
    • This is an RST file (not markdown).

      • I didnt want to add an md file when the readme is in rst. Is there a reason why you chose to work on rst ( given that it has a strange syntax for a markup language)

      • RST is different from markdown, and you have learned markdown first, so perhaps that is why you consider it strange ;-). I agree the links are more intuitive in markdown.

        RST is more powerful, and the language used in sphinx and (often?) python docstrings.

        One feature I like in particular for README.rst files is that you can have a table of content created (which is not supported by markdown).

        I am all in favour of sticking to RST. I think I have fixed most of this file already?

      • Please register or sign in to reply
Please register or sign in to reply
================
This section is for developers wanting to contribute to the project.
Setup pre-commit hooks
----------------------
The project uses `pre-commit <https://pre-commit.com/>`__ to run some checks before committing code.
Install pre-commit by running the following command::
pip install pre-commit
To setup the pre-commit hooks, run the following command from the root of the project::
pre-commit install
Then every time you commit, pre-commit will run all checks defined in `.pre-commit-config.yaml`.
you can run the pre-commit checks manually by running::
pre-commit run --all-files
Loading