|
1 | | - |
2 | 1 | default_language_version: |
3 | | - python: python3 |
| 2 | + python: python3 |
4 | 3 | exclude: ^docs/(conf.py|_ext/) |
5 | 4 | default_stages: [pre-commit,pre-push] |
6 | 5 | fail_fast: false |
7 | 6 |
|
8 | 7 | ci: |
9 | | - skip: [pylint] |
10 | | - autoupdate_branch: develop |
11 | | - autoupdate_schedule: monthly |
| 8 | + skip: [pylint] |
| 9 | + autoupdate_branch: develop |
| 10 | + autoupdate_schedule: monthly |
12 | 11 |
|
13 | 12 | repos: |
14 | | -# - repo: https://github.com/python-poetry/poetry # TODO: re-enable with pixi (does not support source=pypi) |
15 | | -# rev: 2.2.1 |
16 | | -# hooks: |
17 | | -# - id: poetry-check |
18 | | -# args: [--no-plugins] |
19 | | -- repo: https://github.com/hadialqattan/pycln |
20 | | - rev: v2.6.0 |
21 | | - hooks: |
22 | | - - id: pycln |
23 | | - args: [--config=pyproject.toml] |
24 | | -- repo: https://github.com/astral-sh/ruff-pre-commit |
25 | | - rev: v0.14.4 |
26 | | - hooks: |
27 | | - - id: ruff-check |
28 | | - args: |
29 | | - - --fix |
30 | | - - --exit-non-zero-on-fix |
31 | | -# - --unsafe-fixes |
32 | | - - id: ruff-format |
33 | | -# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors |
34 | | -# rev: v1.18.2 |
35 | | -# hooks: |
36 | | -# - id: mypy |
37 | | -# additional_dependencies: [ |
38 | | -# numpy==1.26.*, |
39 | | -# types-toml, |
40 | | -# types-PyYAML, |
41 | | -# tomli # to read config from pyproject.toml |
42 | | -# ] |
43 | | -# exclude: ^(docs|simpeg_drivers-assets)/ |
44 | | -- repo: https://github.com/codingjoe/relint |
45 | | - rev: 3.3.1 |
46 | | - hooks: |
47 | | - - id: relint |
48 | | - args: [-W] # to fail on warnings |
49 | | -- repo: https://github.com/MiraGeoscience/pre-commit-hooks |
50 | | - rev: v1.1.0 |
51 | | - hooks: |
52 | | - - id: check-copyright |
53 | | - files: (^package\.rst|LICENSE|^README(|-dev).rst|^docs/intro\.md|\.py|\.pyi)$ |
54 | | - exclude: (^\.|^docs/(?!intro\.md)) |
55 | | - args: |
56 | | - - --full-scan-files |
57 | | - - intro.md |
58 | | - - id: prepare-commit-msg |
59 | | - - id: check-commit-msg |
60 | | -- repo: local |
61 | | - hooks: |
62 | | - - id: pylint |
63 | | - name: pylint |
64 | | - entry: pixi run --locked pylint |
65 | | - language: system |
66 | | - require_serial: true # pylint does its own parallelism |
67 | | - types: [python] |
68 | | - exclude: ^(devtools|docs)/ |
69 | | -- repo: https://github.com/codespell-project/codespell |
70 | | - rev: v2.4.1 |
71 | | - hooks: |
72 | | - - id: codespell |
73 | | - exclude: (^pixi\.lock|-lock\.ya?ml|\benvironments/.*\.ya?ml|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$ |
74 | | - entry: codespell -I .codespellignore |
75 | | -- repo: https://github.com/pre-commit/pre-commit-hooks |
76 | | - rev: v6.0.0 |
77 | | - hooks: |
78 | | - - id: trailing-whitespace |
79 | | - exclude: \.mdj$ |
80 | | - - id: check-json |
81 | | - exclude_types: [jupyter] |
82 | | - - id: check-toml |
83 | | - - id: check-yaml |
84 | | - - id: check-added-large-files |
85 | | - exclude: (\.ipynb)$ |
86 | | - - id: check-case-conflict |
87 | | - - id: check-merge-conflict |
88 | | - - id: debug-statements |
89 | | - - id: detect-private-key |
90 | | - - id: end-of-file-fixer |
91 | | - exclude: (^\.idea/.*\.xml|\.mdj)$ |
92 | | - - id: mixed-line-ending |
93 | | - exclude: ^\.idea/.*\.xml$ |
94 | | - - id: name-tests-test |
95 | | - exclude: ^tests/utils/ |
96 | | - - id: pretty-format-json |
97 | | - args: |
98 | | - - --autofix |
99 | | - - --indent=4 |
100 | | - - --no-sort-keys |
101 | | - - --top-keys |
102 | | - - version,title,icon,documentation,conda_environment,run_command,geoh5,monitoring_directory,workspace_geoh5 |
103 | | - exclude_types: [jupyter] |
104 | | - exclude: ^docs/(.*/)?images/ |
105 | | -- repo: https://github.com/rstcheck/rstcheck |
106 | | - rev: v6.2.5 |
107 | | - hooks: |
108 | | - - id: rstcheck |
109 | | - exclude: ^THIRD_PARTY_SOFTWARE.rst$ |
110 | | - additional_dependencies: [sphinx] |
111 | | -- repo: https://github.com/pre-commit/pygrep-hooks |
112 | | - rev: v1.10.0 |
113 | | - hooks: |
114 | | - - id: rst-backticks |
115 | | - exclude: ^THIRD_PARTY_SOFTWARE.rst$ |
| 13 | +- repo: https://github.com/python-poetry/poetry |
| 14 | + rev: 2.2.1 |
| 15 | + hooks: |
| 16 | + - id: poetry-check |
| 17 | + args: [--no-plugins] |
| 18 | +- repo: https://github.com/hadialqattan/pycln |
| 19 | + rev: v2.6.0 |
| 20 | + hooks: |
| 21 | + - id: pycln |
| 22 | + args: [ --config=pyproject.toml ] |
| 23 | +- repo: https://github.com/astral-sh/ruff-pre-commit |
| 24 | + rev: v0.14.10 |
| 25 | + hooks: |
| 26 | + - id: ruff-check |
| 27 | + args: |
| 28 | + - --fix |
| 29 | + - --exit-non-zero-on-fix |
| 30 | + # - --unsafe-fixes |
| 31 | + - id: ruff-format |
| 32 | +# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors |
| 33 | +# rev: v1.19.1 |
| 34 | +# hooks: |
| 35 | +# - id: mypy |
| 36 | +# additional_dependencies: [ |
| 37 | +# numpy==1.26.*, |
| 38 | +# types-toml, |
| 39 | +# types-PyYAML, |
| 40 | +# tomli, # to read config from pyproject.toml |
| 41 | +# ] |
| 42 | +# exclude: ^(docs|simpeg_drivers-assets)/ |
| 43 | +- repo: https://github.com/codingjoe/relint |
| 44 | + rev: 3.3.1 |
| 45 | + hooks: |
| 46 | + - id: relint |
| 47 | + args: [-W] # to fail on warnings |
| 48 | +- repo: https://github.com/MiraGeoscience/pre-commit-hooks |
| 49 | + rev: v1.1.0 |
| 50 | + hooks: |
| 51 | + - id: check-copyright |
| 52 | + files: (^package\.rst|^LICENSE|^README(|-dev).rst|^docs/intro\.md|\.py|\.pyi)$ |
| 53 | + exclude: (^\.|^docs/(?!intro\.md)) |
| 54 | + args: |
| 55 | + - --full-scan-files |
| 56 | + - intro.md |
| 57 | + - id: prepare-commit-msg |
| 58 | + - id: check-commit-msg |
| 59 | +- repo: local |
| 60 | + hooks: |
| 61 | + - id: pylint |
| 62 | + name: pylint |
| 63 | + entry: pixi run -e linter --as-is lint |
| 64 | + language: system |
| 65 | + require_serial: true # pylint does its own parallelism |
| 66 | + types: [text] |
| 67 | + types_or: [python, pyi] |
| 68 | + exclude: ^(devtools|docs|simpeg_drivers-assets)/ |
| 69 | +- repo: https://github.com/codespell-project/codespell |
| 70 | + rev: v2.4.1 |
| 71 | + hooks: |
| 72 | + - id: codespell |
| 73 | + exclude: (\.ipynb|THIRD_PARTY_SOFTWARE\.rst|^pixi\.lock)$ |
| 74 | + entry: codespell -I .codespellignore |
| 75 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 76 | + rev: v6.0.0 |
| 77 | + hooks: |
| 78 | + - id: trailing-whitespace |
| 79 | + exclude: \.mdj$ |
| 80 | + - id: check-json |
| 81 | + exclude_types: [jupyter] |
| 82 | + - id: check-toml |
| 83 | + - id: check-yaml |
| 84 | + - id: check-added-large-files |
| 85 | + exclude: (\.ipynb)$ |
| 86 | + # args: [--enforce-all] |
| 87 | + - id: check-case-conflict |
| 88 | + - id: check-merge-conflict |
| 89 | + - id: debug-statements |
| 90 | + - id: detect-private-key |
| 91 | + - id: end-of-file-fixer |
| 92 | + exclude: (^\.idea/.*\.xml|\.mdj)$ |
| 93 | + - id: mixed-line-ending |
| 94 | + exclude: ^\.idea/.*\.xml$ |
| 95 | + - id: name-tests-test |
| 96 | + exclude: ^tests/utils/ |
| 97 | + - id: pretty-format-json |
| 98 | + args: |
| 99 | + - --autofix |
| 100 | + - --indent=4 |
| 101 | + - --no-sort-keys |
| 102 | + - --top-keys |
| 103 | + - version,title,icon,documentation,conda_environment,run_command,geoh5,monitoring_directory,workspace_geoh5 |
| 104 | + exclude_types: [jupyter] |
| 105 | + exclude: ^docs/(.*/)?images/ |
| 106 | +- repo: https://github.com/rstcheck/rstcheck |
| 107 | + rev: v6.2.5 |
| 108 | + hooks: |
| 109 | + - id: rstcheck |
| 110 | + exclude: ^THIRD_PARTY_SOFTWARE.rst$ |
| 111 | + additional_dependencies: [sphinx] |
| 112 | +- repo: https://github.com/pre-commit/pygrep-hooks |
| 113 | + rev: v1.10.0 |
| 114 | + hooks: |
| 115 | + - id: rst-backticks |
| 116 | + exclude: ^THIRD_PARTY_SOFTWARE.rst$ |
0 commit comments