-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
121 lines (120 loc) · 4.31 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: no-commit-to-branch # without arguments, master/main will be protected.
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear==24.12.12',
'pep8-naming==0.14.1'
]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
# Because complaining about docstrings here is annoying. We want to
# check the benchmarks/ directory because that code is more complex.
exclude: 'scratch/(?!benchmarks)'
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.14.1'
hooks:
- id: mypy
# Passing filenames to mypy can do odd things. See
# https://github.com/pre-commit/mirrors-mypy/issues/33.
# mypy.ini determines the set of files that will actually be checked.
pass_filenames: false
# The pre-commit hook passes some options, but we set options in mypy.ini.
args: []
# The pre-commit hook only has python, not pyi.
types: []
types_or: [python, pyi]
additional_dependencies: [
'aioconsole==0.8.1',
'aiokatcp==2.0.2',
'aiomonitor==0.7.1',
'asyncssh==2.19.0',
'dask==2024.12.1',
'katsdpsigproc==1.8.1',
'katsdptelstate==0.14',
'matplotlib==3.10.0',
'numpy==2.0.2',
'pandas-stubs==2.2.3.241126',
'prometheus-client==0.21.1',
'pyparsing==3.2.1',
'pytest==8.3.4',
'redis==5.2.1', # Indirect dependency of katsdptelstate
'spead2==4.4.0',
'types-decorator==5.1.1',
'types-docutils==0.21.0.20241128',
'types-setuptools==75.8.0.20250110', # Indirect dependency
'types-six==1.17.0.20241205',
'typing-extensions==4.12.2',
]
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
hooks:
- id: pip-compile
name: pip-compile requirements.txt
args:
- --output-file=requirements.txt
- --extra=gpu
# Avoid putting extras in the output, so that it can be used for constraints
- --strip-extras
- setup.cfg
- requirements.in
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
files: '^(requirements\.(in|txt)|setup\.cfg)$'
- id: pip-compile
name: pip-compile requirements-dev.txt
args:
- --output-file=requirements-dev.txt
- --extra=test
- --extra=doc
- --strip-extras
- setup.cfg
- requirements-dev.in
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
files: '^(requirements(-dev)?\.(in|txt)|setup\.cfg)$'
- id: pip-compile
name: pip-compile qualification/requirements.txt
args:
- --output-file=qualification/requirements.txt
- --extra=qualification
- --strip-extras
- setup.cfg
- qualification/requirements.in
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
files: '(.*requirements(-dev)?\.(in|txt)|^setup\.cfg)$'
- id: pip-compile
name: pip-compile scratch/benchmarks/requirements.txt
args:
- --output-file=scratch/benchmarks/requirements.txt
- --strip-extras
- scratch/benchmarks/requirements.in
additional_dependencies:
- "pip<24.3" # Workaround for https://github.com/jazzband/pip-tools/issues/2131
files: '(.*requirements(-dev)?\.(in|txt)|^setup\.cfg)$'