From 11d2a3a810a16125e082d79679c882269819c96d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 19:03:13 +0100 Subject: [PATCH] MAINT: autoupdate pre-commit hooks (#24) 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> --- .gitignore | 1 + .pre-commit-config.yaml | 55 +++++++++++++++++++++-------------------- .vscode/extensions.json | 4 ++- .vscode/settings.json | 4 ++- environment.yml | 3 ++- pyproject.toml | 5 ++++ 6 files changed, 42 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 8088844..9743366 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ version.py .pytest_cache/ __pycache__/ htmlcov/ +node_modules/ prof/ # Virtual environments diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8891982..1dfa93b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,7 @@ ci: autoupdate_commit_msg: "MAINT: autoupdate pre-commit hooks" autoupdate_schedule: quarterly skip: + - prettier - taplo repos: @@ -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 @@ -43,15 +27,32 @@ 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 @@ -59,7 +60,7 @@ repos: 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: @@ -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 @@ -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: @@ -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 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 81de77a..1dc9f0e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -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", @@ -20,6 +19,7 @@ "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" @@ -27,7 +27,9 @@ "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" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 3c4765b..1506945 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,7 +14,7 @@ }, "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, "editor.defaultFormatter": "ms-python.black-formatter", "editor.rulers": [88] @@ -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, @@ -71,6 +72,7 @@ } ], "livePreview.defaultPreviewPath": "docs/_build/html", + "multiDiffEditor.experimental.enabled": true, "notebook.gotoSymbols.showAllSymbols": true, "rewrap.wrappingColumn": 88 } diff --git a/environment.yml b/environment.yml index 88494b6..9070a96 100644 --- a/environment.yml +++ b/environment.yml @@ -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" diff --git a/pyproject.toml b/pyproject.toml index 6477948..ef9abec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",