From c113d8c6bdf6fae8d121220a8c7f87ddfac27edb Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 1 Sep 2023 11:45:38 -0400 Subject: [PATCH] Add pre-commit-config file for developer convenience --- .gitignore | 1 - .pre-commit-config.yaml | 90 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 2d39191cd..3f56a5377 100644 --- a/.gitignore +++ b/.gitignore @@ -70,7 +70,6 @@ test/externaldata docs/source/* !docs/source/*.py !docs/source/*.rst -.pre-commit-config.yaml *.ipynb !docs/*.ipynb diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..eafb059af --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,90 @@ +# Initially run +# pre-commit install +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-builtin-literals + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + # - id: check-symlinks + # - id: check-toml + # - id: check-xml + - id: check-yaml + - id: debug-statements + - id: destroyed-symlinks + - id: detect-private-key + - id: double-quote-string-fixer + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: forbid-new-submodules + - id: mixed-line-ending + - id: trailing-whitespace +- repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-no-eval + - id: python-no-log-warn + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal + - id: text-unicode-replacement-char +- repo: https://github.com/Lucas-C/pre-commit-hooks-markup + rev: v1.0.1 + hooks: + - id: rst-linter + files: README.rst + name: rst-linter of README.rst +- repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell + args: + - --ignore-words-list + - "hist,indext,pixelx,thex,subtile,slippy" +- repo: https://github.com/syntaqx/git-hooks + rev: v0.0.18 + hooks: + - id: circleci-config-validate +- repo: https://github.com/ThisIsManta/stylus-supremacy + rev: v2.17.5 + hooks: + - id: stylus-supremacy + args: + - '--options' + - './girder/girder_large_image/web_client/package.json' +- repo: https://github.com/asottile/pyupgrade + rev: v3.10.1 + hooks: + - id: pyupgrade + args: + - --py36-plus + - --keep-percent-format +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.0.286 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + types_or: [python, pyi, jupyter] +- repo: https://github.com/pre-commit/mirrors-autopep8 + rev: v2.0.4 + hooks: + - id: autopep8 +- repo: https://github.com/PyCQA/flake8 + rev: 6.1.0 + hooks: + - id: flake8 +- repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort (python)