Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 9, 2024
1 parent 0721fe9 commit c7d54bf
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 85 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"*particle*.*ml",
".constraints/*.txt",
".editorconfig",
".envrc",
".gitattributes",
".gitignore",
".gitpod.*",
".pre-commit-config.yaml",
Expand Down
11 changes: 10 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
layout anaconda
if [ -e .venv ]; then
source .venv/bin/activate
elif [ -e venv ]; then
source venv/bin/activate
elif [ -e .pixi ]; then
watch_file pixi.lock
eval "$(pixi shell-hook)"
else
layout anaconda
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ pyvenv*/
!codecov.yml
!environment.yml
!pyrightconfig.json
.pixi/
37 changes: 0 additions & 37 deletions .gitpod.yml

This file was deleted.

49 changes: 23 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,39 @@ ci:
skip:
- check-jsonschema
- mypy
- prettier
- pyright
- taplo

repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.4.0
hooks:
- id: check-dev-files
args:
- --doc-apt-packages=graphviz
- --no-prettierrc
- --pin-requirements=monthly
- --repo-name=qrules
- --repo-title=QRules
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,viz

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --drop-empty-cells
- --extra-keys
- |
cell.attachments
Expand All @@ -40,26 +58,6 @@ repos:
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/ComPWA/policy
rev: 0.4.0
hooks:
- id: check-dev-files
args:
- --doc-apt-packages=graphviz
- --no-prettierrc
- --pin-requirements=monthly
- --repo-name=qrules
- --repo-title=QRules
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,viz

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
Expand Down Expand Up @@ -92,16 +90,15 @@ repos:
args: ["--django"]
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-prettier
- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- repo: https://github.com/ComPWA/mirrors-taplo
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.8.1
hooks:
- id: taplo

- id: taplo-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"joaompinto.vscode-graphviz",
"mhutchie.git-graph",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
40 changes: 30 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"editor.formatOnSave": false
},
"[git-commit]": {
"editor.rulers": [72],
"editor.rulers": [
72
],
"rewrap.wrappingColumn": 72
},
"[json]": {
Expand All @@ -21,20 +23,25 @@
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.rulers": [88]
"editor.rulers": [
88
]
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"coverage-gutters.coverageFileNames": ["coverage.xml"],
"coverage-gutters.coverageFileNames": [
"coverage.xml"
],
"coverage-gutters.coverageReportFileName": "**/htmlcov/index.html",
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"files.associations": {
"**/.constraints/py*.txt": "pip-requirements"
"**/.constraints/py*.txt": "pip-requirements",
"**/pixi.lock": "yaml"
},
"files.watcherExclude": {
"**/*_cache/**": true,
Expand All @@ -43,21 +50,29 @@
"**/.tox/**": true
},
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"github-actions.workflows.pinned.workflows": [
".github/workflows/ci.yml"
],
"gitlens.telemetry.enabled": false,
"json.schemas": [
{
"fileMatch": ["*particle*.json"],
"fileMatch": [
"*particle*.json"
],
"url": "./src/qrules/particle-validation.json"
},
{
"fileMatch": [".zenodo.json"],
"fileMatch": [
".zenodo.json"
],
"url": "https://zenodo.org/schemas/deposits/records/legacyrecord.json"
}
],
"livePreview.defaultPreviewPath": "docs/_build/html",
"multiDiffEditor.experimental.enabled": true,
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
"mypy-type-checker.args": [
"--config-file=${workspaceFolder}/pyproject.toml"
],
"mypy-type-checker.importStrategy": "fromEnvironment",
"notebook.codeActionsOnSave": {
"notebook.source.organizeImports": "explicit"
Expand All @@ -68,7 +83,10 @@
"python.analysis.inlayHints.pytestParameters": true,
"python.analysis.typeCheckingMode": "strict",
"python.terminal.activateEnvironment": false,
"python.testing.pytestArgs": ["--color=no", "--no-cov"],
"python.testing.pytestArgs": [
"--color=no",
"--no-cov"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"redhat.telemetry.enabled": false,
Expand All @@ -82,7 +100,9 @@
},
"telemetry.telemetryLevel": "off",
"yaml.schemas": {
"./src/qrules/particle-validation.json": ["*particle*.y*ml"],
"./src/qrules/particle-validation.json": [
"*particle*.y*ml"
],
"https://citation-file-format.github.io/1.2.0/schema.json": "CITATION.cff",
"https://json.schemastore.org/github-workflow.json": "./.github/workflows/requirements.yml"
}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
[![Binder](https://static.mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ComPWA/qrules/stable?filepath=docs/usage)
[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ComPWA/qrules/blob/stable)
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://open.vscode.dev/ComPWA/qrules)
[![GitPod](https://img.shields.io/badge/gitpod-open-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ComPWA/qrules)

[![Documentation](https://readthedocs.org/projects/qrules/badge/?version=latest)](https://qrules.readthedocs.io)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/qrules/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/qrules/main)
Expand Down
Loading

0 comments on commit c7d54bf

Please sign in to comment.