-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from WMD-group/ruff
Overhaul pre-commit
- Loading branch information
Showing
84 changed files
with
905,521 additions
and
7,551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = | ||
extend-ignore = | ||
# E203: whitespace before ':' (black compatibility) | ||
E203, | ||
#D105: Missing docstring in magic method | ||
D105 | ||
D105 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
changelog: | ||
exclude: | ||
authors: [dependabot, github-actions, pre-commit-ci] | ||
categories: | ||
- title: 🎉 New Features | ||
labels: [feature] | ||
- title: 🐛 Bug Fixes | ||
labels: [fix] | ||
- title: 🛠 Enhancements | ||
labels: [enhancement, DX, UX] | ||
- title: 📖 Documentation | ||
labels: [docs] | ||
- title: 🧹 House-Keeping | ||
labels: [housekeeping] | ||
- title: 🚀 Performance | ||
labels: [performance] | ||
- title: 💡 Refactoring | ||
labels: [refactor] | ||
- title: 🧪 Tests | ||
labels: [tests] | ||
- title: 💥 Breaking Changes | ||
labels: [breaking] | ||
- title: 🔒 Security Fixes | ||
labels: [security] | ||
- title: 🏥 Package Health | ||
labels: [pkg] | ||
- title: 🤷♂️ Other Changes | ||
labels: ["*"] | ||
|
||
changelog: | ||
exclude: | ||
authors: [dependabot, github-actions, pre-commit-ci] | ||
categories: | ||
- title: 🎉 New Features | ||
labels: [feature] | ||
- title: 🐛 Bug Fixes | ||
labels: [fix] | ||
- title: 🛠 Enhancements | ||
labels: [enhancement, DX, UX] | ||
- title: 📖 Documentation | ||
labels: [docs] | ||
- title: 🧹 House-Keeping | ||
labels: [housekeeping] | ||
- title: 🚀 Performance | ||
labels: [performance] | ||
- title: 💡 Refactoring | ||
labels: [refactor] | ||
- title: 🧪 Tests | ||
labels: [tests] | ||
- title: 💥 Breaking Changes | ||
labels: [breaking] | ||
- title: 🔒 Security Fixes | ||
labels: [security] | ||
- title: 🏥 Package Health | ||
labels: [pkg] | ||
- title: 🤷♂️ Other Changes | ||
labels: ["*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build/Publish Develop Docs | ||
name: Build/Publish Develop Docs | ||
on: | ||
push: | ||
branches: | ||
|
@@ -22,6 +22,6 @@ jobs: | |
git fetch origin gh-pages --depth=1 | ||
git config --global user.name "Docs Deploy" | ||
git config --global user.email "[email protected]" | ||
- name: Build Docs Website | ||
run: mike deploy --push main latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,55 @@ | ||
ci: | ||
autoupdate_schedule: quarterly | ||
autofix_commit_msg: pre-commit auto-fixes | ||
autoupdate_commit_msg: pre-commit autoupdate | ||
skip: [eslint, pyright] | ||
|
||
repos: | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: "5.12.0" | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.5 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/psf/black | ||
rev: "23.10.1" | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: black-jupyter | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.41.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
- id: markdownlint | ||
# MD013: line too long | ||
# MD024: Multiple headings with the same content | ||
# MD033: no inline HTML | ||
# MD041: first line in a file should be a top-level heading | ||
# MD025: single title | ||
args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"] | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.7.1 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-docstrings] | ||
#- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
#rev: v2.0.0 | ||
#hooks: | ||
# - id: autopep8 | ||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: "1.7.0" | ||
- id: nbstripout | ||
args: [--drop-empty-cells, --keep-output] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
hooks: | ||
#- #id: nbqa-isort | ||
#additional_dependencies: [isort==5.10.1] | ||
#- id: nbqa-flake8 | ||
# additional_dependencies: [flake8==6.0.0] | ||
# args: [--ignore=E501] # E501 line too long | ||
- id: nbqa-pyupgrade | ||
additional_dependencies: [pyupgrade==3.3.1] | ||
- id: nbqa-autopep8 | ||
additional_dependencies: [autopep8==2.0.0] | ||
args: ["--ignore=E501"] | ||
- repo: https://github.com/roy-ht/pre-commit-jupyter | ||
rev: v1.2.1 | ||
- id: prettier | ||
args: [--write] # edit files in-place | ||
additional_dependencies: | ||
- prettier | ||
- repo: https://github.com/RobertCraigie/pyright-python | ||
rev: v1.1.376 | ||
hooks: | ||
- id: jupyter-notebook-cleanup | ||
args: | ||
# - --remove-kernel-metadata | ||
- --pin-patterns | ||
- "[pin];[donotremove]" | ||
- id: pyright | ||
args: [--level, error] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
stages: [commit, commit-msg] | ||
args: [--toml, pyproject.toml] | ||
additional_dependencies: | ||
- tomli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.