Skip to content

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Remco de Boer <29308176+redeboer@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and redeboer authored Jan 12, 2024
1 parent b2ac218 commit 11d2a3a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ version.py
.pytest_cache/
__pycache__/
htmlcov/
node_modules/
prof/

# Virtual environments
Expand Down
55 changes: 28 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ci:
autoupdate_commit_msg: "MAINT: autoupdate pre-commit hooks"
autoupdate_schedule: quarterly
skip:
- prettier
- taplo

repos:
Expand All @@ -10,25 +11,8 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: end-of-file-fixer
exclude: >
(?x)^(
.*\.svg
)$
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.0
- repo: https://github.com/ComPWA/policy
rev: 0.2.0
hooks:
- id: colab-toc-visible
- id: check-dev-files
Expand All @@ -43,23 +27,40 @@ repos:
- --repo-name=gluex-amplitude

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.7.1
hooks:
- id: nbqa-isort
- id: nbqa-pyupgrade
args:
- --py37-plus

- repo: https://github.com/psf/black
rev: 23.9.1
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: end-of-file-fixer
exclude: >
(?x)^(
.*\.svg
)$
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black
- id: black-jupyter
args: [--line-length=85]
types_or: [jupyter]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v17.0.6
hooks:
- id: clang-format
types_or:
Expand All @@ -68,7 +69,7 @@ repos:
- cuda

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -79,12 +80,12 @@ repos:
)$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.2
rev: V3.23.5
hooks:
- id: latexindent
args:
Expand Down Expand Up @@ -116,7 +117,7 @@ repos:
metadata.vscode
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier

Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"executablebookproject.myst-highlight",
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"james-yu.latex-workshop",
Expand All @@ -20,14 +19,17 @@
"ms-vscode.makefile-tools",
"ms-vsliveshare.vsliveshare",
"redhat.vscode-yaml",
"Soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"tamasfe.even-better-toml",
"yzhang.markdown-all-in-one"
],
"unwantedRecommendations": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"garaioag.garaio-vscode-unwanted-recommendations",
"ms-python.mypy-type-checker",
"streetsidesoftware.code-spell-checker",
"travisillig.vscode-json-stable-stringify"
]
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
Expand All @@ -23,6 +23,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"black-formatter.importStrategy": "fromEnvironment",
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"git.autofetch": true,
"git.autoRepositoryDetection": false,
Expand Down Expand Up @@ -71,6 +72,7 @@
}
],
"livePreview.defaultPreviewPath": "docs/_build/html",
"multiDiffEditor.experimental.enabled": true,
"notebook.gotoSymbols.showAllSymbols": true,
"rewrap.wrappingColumn": 88
}
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: gluex-amplitude
channels:
- defaults
dependencies:
- python==3.10.*
- python==3.8.*
- pip
- pip:
- -e .[dev]
variables:
PYTHONHASHSEED: 0
PRETTIER_LEGACY_CLI: "1"
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ dev = [
]
doc = ["jupyter-book"]
jupyter = [
"isort",
"jupyterlab",
"jupyterlab-code-formatter",
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"python-lsp-ruff",
"python-lsp-server[rope]",
]
sty = [
"black",
Expand Down

0 comments on commit 11d2a3a

Please sign in to comment.