-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
127 lines (124 loc) · 3.8 KB
/
.pre-commit-config.yaml
File metadata and controls
127 lines (124 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
default_language_version:
python: python3
exclude: ^docs/(conf.py|_ext/)
default_stages: [pre-commit,pre-push]
fail_fast: false
ci:
skip: [pylint]
autoupdate_branch: develop
autoupdate_schedule: monthly
repos:
- repo: https://github.com/python-poetry/poetry
rev: 2.1.3
hooks:
- id: poetry-check
args: [--lock, --no-plugins]
- repo: https://github.com/hadialqattan/pycln
rev: v2.5.0
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.5
hooks:
- id: ruff-check
args:
- --fix
- --exit-non-zero-on-fix
# - --unsafe-fixes
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies: [
# numpy==2.4.*, # TODO: fix mypy errors related to numpy
pydantic==2.12.*,
tomli, # to read config from pyproject.toml
types-toml,
types-PyYAML,
]
exclude: |
(?x)(^
geoh5py/interfaces/__init__.py|
geoh5py/handlers/__init__.py|
geoh5py/interfaces/.*|
geoh5py/handlers/.*|
tests/.*|
geoh5py/shared/utils.py|
geoh5py/shared/entity_type.py|
geoh5py/data/data_type.py|
geoh5py/objects/cell_object.py|
geoh5py/shared/concatenation/drillhole.py|
geoh5py/shared/concatenation/concatenator.py|
geoh5py/workspace/workspace.py|
geoh5py/ui_json/validation.py
)$
- repo: https://github.com/codingjoe/relint
rev: 3.3.1
hooks:
- id: relint
args: [-W] # to fail on warnings
- repo: https://github.com/MiraGeoscience/pre-commit-hooks
rev: v1.1.0
hooks:
- id: check-copyright
files: (^package\.rst|^LICENSE|^README(|-dev)\.rst|\.py|\.pyi)$
exclude: (^\.|^docs/)
- id: prepare-commit-msg
- id: check-commit-msg
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
require_serial: true # pylint does its own parallelism
types: [text]
types_or: [python, pyi]
exclude: ^(devtools|docs|geoh5py/interfaces|geoh5py/handlers)/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: (\.lock|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
entry: codespell -I .codespellignore
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-toml
exclude: \.mdj$
- id: check-json
exclude_types: [jupyter]
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: (^\.idea/.*\.?ml|\.mdj)$
- id: mixed-line-ending
exclude: ^\.idea/.*\.?ml$
- id: name-tests-test
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-sort-keys
- --top-keys
- version,title,icon,documentation,conda_environment,run_command,geoh5,monitoring_directory,workspace_geoh5
exclude_types: [jupyter]
exclude: ^docs/(.*/)?images/
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
exclude: ^THIRD_PARTY_SOFTWARE.rst$
additional_dependencies: [sphinx]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
exclude: ^THIRD_PARTY_SOFTWARE.rst$