-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
98 lines (98 loc) · 3.19 KB
/
.pre-commit-config.yaml
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
exclude: ^(external/|venv/|.venv/|notebooks/|scripts/|test/|tests/)
ci:
skip:
- poetry-lock
- poetry-install
repos:
- repo: local # Remove this when a new version of pre-commit-hooks (>4.6.0) is released
hooks:
- id: check-illegal-windows-names
name: check illegal windows names
entry: Illegal Windows filenames detected
language: fail
files: '(?i)((^|/)(CON|PRN|AUX|NUL|COM[\d¹²³]|LPT[\d¹²³])(\.|/|$)|[<>:\"\\|?*\x00-\x1F]|/[^/]*[\.\s]/|[^/]*[\.\s]$)'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
- id: check-executables-have-shebangs
# - id: check-illegal-windows-names # Uncomment this when a new version of pre-commit-hooks (>4.6.0) is released
- id: check-json
- id: pretty-format-json
args: [ "--autofix", "--no-sort-keys" ]
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: destroyed-symlinks
- id: mixed-line-ending
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: name-tests-test
args: [ "--pytest-test-first" ]
- id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
hooks:
- id: validate-pyproject
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: python-no-log-warn
- id: python-use-type-annotations
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.20
hooks:
- id: pymarkdown
args:
- "-d"
- "md013, MD041" # Line length, First line in file should be a top level heading
- "scan"
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint
args: [ --enable=default-role ]
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check
args: [ --lock ]
- id: poetry-lock
- id: poetry-export
args: [ --without-hashes, --with=test, --with=docs, --format, requirements.txt, --output, requirements.txt ]
- id: poetry-install
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff-format
- id: ruff
# Pydoclint is useful, but gives too many false positives
# - repo: https://github.com/jsh9/pydoclint
# rev: 0.4.1
# hooks:
# - id: pydoclint
# args: [ "--quiet" ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies:
- numpy==1.26.4
- pandas-stubs>=2.2.2.240514
- types-tqdm>=4.66.0.20240417
- polars==0.20.25
- hydra-core==1.3.2
- types-networkx==3.2.1.20240518
- rustworkx==0.14.2
- pypdf==4.2.0
args:
- "--fast-module-lookup"
- "--disallow-any-generics"