Skip to content

Commit 4e3d093

Browse files
authored
Add pre-commit to our contributing guide (#1658)
1 parent 626b2bd commit 4e3d093

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,28 @@ The basic workflow for contributing is:
7171
pip install -r requirements.txt
7272
pip install -r requirements-dev.txt
7373
```
74-
6. Install Chrome, download [chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) and put it in the PATH.
75-
7. Make changes to your local copy of the folium repository
76-
8. Make sure the tests pass:
74+
6. In Python run `pre-commit install` to enable the commit hooks that run our linter.
75+
7. Install Chrome, download [chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) and put it in the PATH.
76+
8. Make changes to your local copy of the folium repository
77+
9. Make sure the tests pass:
7778
* in the repository folder do `pip install -e . --no-deps` (needed for notebook tests)
78-
* run `flake8 folium --max-line-length=120`
7979
* run `python -m pytest tests --ignore=tests/selenium`
8080
* run `python -m pytest tests/selenium`
8181
* resolve all errors
82-
9. Commit those changes
83-
```
84-
git add file1 file2 file3
85-
git commit -m 'a descriptive commit message'
86-
```
87-
10. Push your updated branch to your fork
82+
10. Commit those changes
83+
```
84+
git add file1 file2 file3
85+
git commit -m 'a descriptive commit message'
86+
```
87+
11. Push your updated branch to your fork
8888
```
8989
git push origin name-of-your-branch
9090
```
91-
11. [Open a pull request](https://help.github.com/articles/creating-a-pull-request/) to the python-visualization/folium
91+
12. [Open a pull request](https://help.github.com/articles/creating-a-pull-request/) to the python-visualization/folium
9292
9393
Since we're all volunteers please help us by making your PR easy to review. That means having a clear description and only touching code that's necessary for your change.
9494
95-
## Plugin acceptence criteria
95+
## Plugin acceptance criteria
9696
9797
If you have a Leaflet plugin you would like to include in folium's plugins, please
9898
check these criteria to see if it's a good candidate.

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ nbval
2121
owslib
2222
pandas
2323
pillow
24+
pre-commit
2425
pycodestyle
2526
pytest
2627
pytest-cov

0 commit comments

Comments
 (0)