-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π§: add pre-commit config Signed-off-by: nstarman <[email protected]> * π§: add rst checks to pre-commit Signed-off-by: nstarman <[email protected]> --------- Signed-off-by: nstarman <[email protected]>
- Loading branch information
Showing
3 changed files
with
88 additions
and
3 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 |
---|---|---|
|
@@ -3,9 +3,9 @@ name: CI | |
on: | ||
push: | ||
branches: | ||
- main | ||
- main | ||
tags: | ||
- '*' | ||
- "*" | ||
pull_request: | ||
|
||
concurrency: | ||
|
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
ci: | ||
autoupdate_schedule: "quarterly" | ||
autoupdate_commit_msg: "π·: update pre-commit hooks" | ||
autofix_commit_msg: "π¨: pre-commit fixes" | ||
|
||
default_stages: [pre-commit, pre-push] | ||
|
||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-useless-excludes | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v5.0.0" | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: name-tests-test | ||
args: ["--pytest-test-first"] | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.7.3" | ||
hooks: | ||
# Run the linter | ||
- id: ruff | ||
types_or: [python, pyi, jupyter] | ||
args: ["--fix", "--show-fixes"] | ||
# Run the formatter | ||
- id: ruff-format | ||
types_or: [python, pyi, jupyter] | ||
|
||
- repo: https://github.com/adamchainz/blacken-docs | ||
rev: "1.19.1" | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==23.*] | ||
|
||
- repo: https://github.com/rbubley/mirrors-prettier | ||
rev: "v3.3.3" | ||
hooks: | ||
- id: prettier | ||
types_or: [yaml, markdown, html, css, scss, javascript, json] | ||
args: [--prose-wrap=always] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.13.0" | ||
hooks: | ||
- id: mypy | ||
files: src | ||
additional_dependencies: | ||
- pytest | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-directive-colons | ||
# Detect mistake of rst directive not ending with double colon. | ||
- id: rst-inline-touching-normal | ||
# Detect mistake of inline code touching normal text in rst. | ||
- id: text-unicode-replacement-char | ||
# Forbid files which have a UTF-8 Unicode replacement character. | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: "v2.3.0" | ||
hooks: | ||
- id: codespell | ||
|
||
- repo: https://github.com/abravalheri/validate-pyproject | ||
rev: v0.23 | ||
hooks: | ||
- id: validate-pyproject | ||
|
||
- repo: local | ||
hooks: | ||
- id: disallow-caps | ||
name: Disallow improper capitalization | ||
language: pygrep | ||
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest | ||
exclude: .pre-commit-config.yaml |
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