diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9690ac78b9858aea5b88221812f63b7098ac8cb3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + # Using this mirror lets us use mypyc-compiled black, which is about 2x faster + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.10.0 + hooks: + - id: black + args: [--config=./pyproject.toml] + language_version: python3.10 \ No newline at end of file diff --git a/README.md b/README.md index 0e741bd942d4cbf3aeded76678a7f26d5692f020..d0b489850b6817d2e1a0dd9368fc823f9b728e18 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ # InSillyClo * dev https://insillyclo-main.dev.pasteur.cloud/ -* prod https://insillyclo-main.pasteur.cloud/ \ No newline at end of file +* prod https://insillyclo-main.pasteur.cloud/ + +# Contributing + +Install Black to format sources, use pre-commit to prevent unformatted commit (which will be rejected by ci anyway) +```shell +pip install -r requirements-dev.txt +pre-commit install +``` \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index e0cea116cc6299a1bc3fac6d4be62411e6bac7b9..93b46a0b81b7d11c69c97fa1c4872f045462ab49 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1,2 @@ black~=24.10.0 +pre-commit \ No newline at end of file