Skip to content

Commit

Permalink
Add flake8 and pydocstyle to precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
mirand863 committed Nov 25, 2024
1 parent 83ee6e8 commit ad5972d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Test with pytest
run: |
flake8
pydocstyle
pydocstyle hiclass tests
pytest -v --cov=hiclass --cov-fail-under=90 --cov-report html
coverage xml
- name: Upload Coverage to Codecov
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ repos:
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^hiclass/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pip install -e ".[dev]"
To run the tests simply execute:

```
pytest -v --flake8 --pydocstyle --cov=hiclass --cov-fail-under=90 --cov-report html
pytest -v --cov=hiclass --cov-fail-under=90 --cov-report html
```

Lastly, you can set up the git hooks scripts to fix formatting errors locally during commits:
Expand Down

0 comments on commit ad5972d

Please sign in to comment.