Skip to content

Commit 6306610

Browse files
committed
pre-commit installation in README
1 parent 64d8d52 commit 6306610

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,24 @@ rather than copied to a system directory, use ::
150150

151151
python -m pip install -e .
152152

153+
CONTRIBUTING
154+
------------------------------------------------------------------------
155+
We welcome contributors from the community. Please consider posting issues, and taking issues and posting PRs.
156+
157+
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
158+
hooks.
159+
160+
1. modify the permissions to executable on the bash script called ``prevent_commit_to_main.sh`` in this directory: ``chmod +x prevent_commit_to_main.sh``
161+
162+
2. install pre-commit in your working environment with ``conda install pre-commit``
163+
164+
3. initialize pre-commit (one time only) ``pre-commit install``
165+
166+
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
167+
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
168+
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
169+
trying to commit again
170+
153171

154172
CONTACTS
155173
------------------------------------------------------------------------

0 commit comments

Comments
 (0)