Skip to content

Commit

Permalink
DX: apply new ComPWA dev configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Apr 5, 2024
1 parent 749d930 commit 38fc982
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 51 deletions.
95 changes: 47 additions & 48 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,37 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --extra-keys
- |
cell.attachments
cell.metadata.code_folding
cell.metadata.id
cell.metadata.pycharm
cell.metadata.user_expressions
metadata.celltoolbar
metadata.colab.name
metadata.colab.provenance
metadata.interpreter
metadata.notify_time
metadata.toc
metadata.toc-autonumbering
metadata.toc-showcode
metadata.toc-showmarkdowntxt
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/ComPWA/policy
rev: 0.3.3
hooks:
- id: colab-toc-visible
- id: check-dev-files
args:
- --ignore-author
- --no-github-actions
- --no-gitpod
- --no-prettierrc
Expand Down Expand Up @@ -59,6 +83,28 @@ repos:
args: [--line-length=85]
types_or: [jupyter]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

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

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

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.2
hooks:
Expand All @@ -79,63 +125,16 @@ repos:
.*\.py
)$
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.8
hooks:
- id: latexindent
args:
- "-y=defaultIndent: ' '"

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --extra-keys
- |
cell.attachments
cell.metadata.code_folding
cell.metadata.id
cell.metadata.pycharm
cell.metadata.user_expressions
metadata.celltoolbar
metadata.colab.name
metadata.colab.provenance
metadata.interpreter
metadata.notify_time
metadata.toc
metadata.toc-autonumbering
metadata.toc-showcode
metadata.toc-showmarkdowntxt
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args:
- --py37-plus

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

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"garaioag.garaio-vscode-unwanted-recommendations",
"ms-python.mypy-type-checker",
"streetsidesoftware.code-spell-checker",
"travisillig.vscode-json-stable-stringify"
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
}
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"rewrap.wrappingColumn": 72
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.wordWrap": "on"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down Expand Up @@ -33,6 +34,7 @@
".github/workflows/amptools.yml",
".github/workflows/docs.yml"
],
"gitlens.telemetry.enabled": false,
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.latex.autoClean.run": "onSucceeded",
"latex-workshop.latex.clean.fileTypes": [
Expand Down Expand Up @@ -74,5 +76,7 @@
"livePreview.defaultPreviewPath": "docs/_build/html",
"multiDiffEditor.experimental.enabled": true,
"notebook.gotoSymbols.showAllSymbols": true,
"rewrap.wrappingColumn": 88
"redhat.telemetry.enabled": false,
"rewrap.wrappingColumn": 88,
"telemetry.telemetryLevel": "off"
}

0 comments on commit 38fc982

Please sign in to comment.