-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (83 loc) · 2.58 KB
/
.pre-commit-config.yaml
File metadata and controls
95 lines (83 loc) · 2.58 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types:
- pre-commit
- commit-msg
default_language_version:
python: python3
ci:
skip: [generate-pixi-docs, settings-doc-check]
default_stages: [pre-commit]
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: ["--verbose"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--unsafe"]
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.14.2'
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
additional_dependencies:
- pydantic
- sqlalchemy
- types-PyYAML
- types-cachetools
- types-requests
- types-python-dateutil
- types-aiobotocore[essential]
- boto3-stubs[essential]
exclude: ^(diracx-client/src/diracx/client/_generated|diracx-[a-z]+/tests/|diracx-testing/|build|extensions/gubbins/gubbins-client/src/gubbins/client/_generated)
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-mkdocs
- mdformat-gfm
- mdformat-black
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ["-w"]
- repo: local
hooks:
- id: check-lollygag
name: check for lollygag
types: [python]
entry: '(?i)lollygag'
language: pygrep
files: ^diracx
- repo: local
hooks:
- id: generate-pixi-docs
name: Generate pixi tasks documentation
entry: pixi run -e default python .github/workflows/generate_pixi_tasks_doc.py
language: system
pass_filenames: false
files: ^pixi\.toml$|^pixi\.lock$ # only run if pixi files change
- repo: local
hooks:
- id: settings-doc-check
name: Generate settings documentation
entry: pixi run -e default python scripts/generate_settings_docs.py
language: system
pass_filenames: false
files: ^(diracx-.*/src/diracx/.*/settings\.py|docs/.*\.j2|docs/templates/.*\.jinja|scripts/generate_settings_docs\.py)$