-
Notifications
You must be signed in to change notification settings - Fork 10
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 #36 from asmeurer/pre-commit
Enable pre-commit
- Loading branch information
Showing
11 changed files
with
1,434 additions
and
723 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# activated pre-commit - https://github.com/asmeurer/removestar/pull/36 | ||
aa3a9ba0bffb194670484ec6bdb35cc4ce645330 |
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 |
---|---|---|
|
@@ -2,14 +2,24 @@ name: Build removestar | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master] | ||
|
||
env: | ||
SHELLOPTS: errexit:nounset:pipefail | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
name: Check SDist | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -25,10 +35,6 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyflakes pytest pytest-doctestplus ruff | ||
- name: Lint | ||
run: | | ||
ruff --select=A,B,E,F,PLC,PLE,PLW,SIM,W --ignore=B023,B904,E402,PLC1901,SIM115,B018 --line-length=263 --statistics . | ||
python -We:invalid -We::SyntaxWarning -m compileall -f -q removestar/ | ||
- name: Install | ||
run: | | ||
python -m pip install . | ||
|
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,69 @@ | ||
ci: | ||
autoupdate_commit_msg: "chore: update pre-commit hooks" | ||
autofix_commit_msg: "style: pre-commit fixes" | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: ^docs | ||
- id: mixed-line-ending | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.0.282" | ||
hooks: | ||
- id: ruff | ||
args: ["--fix", "--show-fixes"] | ||
|
||
# TODO: add static types | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v1.4.1 | ||
# hooks: | ||
# - id: mypy | ||
# files: src | ||
# args: [] | ||
# additional_dependencies: | ||
# - numpy | ||
# - packaging | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.0.1" | ||
hooks: | ||
- id: prettier | ||
types_or: [yaml, markdown, html, css, scss, javascript, json] | ||
exclude: assets/js/webapp\.js | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.15.0 | ||
hooks: | ||
- id: blacken-docs | ||
args: ["-E"] | ||
additional_dependencies: [black==23.1.0] | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-blanket-type-ignore | ||
exclude: ^src/vector/backends/_numba_object.py$ | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal |
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 +1 @@ | ||
theme: jekyll-theme-merlot | ||
theme: jekyll-theme-merlot |
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.