Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pre-commit #628

Merged
merged 12 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignore:
- "setup.py"
- "src/qibo/tests/test_custom_functions.py"
- "src/qibo/tests/test_custom_functions.py"
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/general-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ labels: ''
assignees: ''

---


2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/general-purprose-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ labels: ''
assignees: ''

---


5 changes: 3 additions & 2 deletions .github/workflows/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
pip install tensorflow
- name: Test with pylint
run: |
pip install pylint==2.13 # 2.14 does not disable E1120/1123, TODO check future releases.
pylint src -E -d E1123,E1120
pip install pylint
pylint src/**/*.py -E -f colorized
pylint src/**/*.py --exit-zero -f colorized
- name: Test with pytest core
run: |
pytest src/qibo/tests/ --cov=qibo --cov-report=xml --pyargs qibo --durations=60
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ci:
autofix_prs: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: fix-encoding-pragma
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
Loading