-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
87 lines (86 loc) · 2.48 KB
/
.pre-commit-config.yaml
File metadata and controls
87 lines (86 loc) · 2.48 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
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: []
submodules: false
exclude: '.*.weldx$|.*.wx$|.*.asdf$'
repos:
# ----- general formatting -----
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
exclude: devtools/conda.recipe/meta.yaml # doesn't play nice with jinja
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
- mdformat-config
# ----- Python formatting -----
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
# Run ruff linter.
- id: ruff-check
args:
- --quiet
- --fix
# Run ruff formatter.
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.21.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
# ----- Jupyter Notebooks -----
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-black
- id: nbqa-ruff # ruff handles isort
args:
- --fix
- --force-exclude
- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
hooks:
- id: jupyter-notebook-cleanup
args:
- --remove-kernel-metadata
# ----- spellchecking -----
- repo: https://github.com/codespell-project/codespell/
rev: v2.4.2
hooks:
- id: codespell
exclude: doc/src/legal-notice.md
args:
- -L ro
# ----- CFF checking -----
# Format and validate CFF. NOTE: pre-commit doesn't recognize CFF as YAML
# (https://github.com/pre-commit/identify/pull/435), so we may need to
# specify the prettier hook twice if we want to format other things and avoid
# a messy regex.
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.3
hooks:
- id: prettier
files: CITATION.cff
- repo: https://github.com/citation-file-format/cffconvert
rev: b6045d78aac9e02b039703b030588d54d53262ac
hooks:
- id: validate-cff
args:
- --verbose