-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
80 lines (80 loc) · 2.43 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
80 lines (80 loc) · 2.43 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: double-quote-string-fixer
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
# Hook to remove metadata changes from notebooks to avoid diff contamination
- repo: local
hooks:
- id: nbstripout
name: nbstripout with keep-output
entry: |
python -m nbstripout --keep-output $@
language: system
files: \.ipynb$
exclude: packages/opencloning/tests/
# Hook to ensure that httpx is only imported in the httpClient.py file
- repo: local
hooks:
- id: httpx-import-check
name: httpx-import-check
entry: python scripts/check_httpx_imports.py
language: system
files: \.py$
exclude: |
(?x)^(
packages/opencloning/tests/.*|
scripts/.*|
)$
# Hook to ensure that primer3 is only imported in the primer3_functions.py file
# This is to centralize how the settings etc. are handled.
- repo: local
hooks:
- id: primer3-import-check
name: primer3-import-check
entry: python scripts/check_primer3_imports.py
language: system
files: \.py$
exclude: packages/opencloning/tests/
- repo: local
hooks:
- id: deptry
name: deptry
entry: uv run deptry --config packages/opencloning/pyproject.toml packages/opencloning/src
language: system
pass_filenames: false
files: |
(?x)^(
packages/opencloning/src/.*|
packages/opencloning/pyproject.toml|
pyproject.toml
)$
exclude: |
(?x)^(
packages/opencloning/tests/.*|
packages/opencloning-db/tests/.*|
)$
- repo: local
hooks:
- id: deptry-opencloning-db
name: deptry (opencloning-db)
entry: uv run deptry --config packages/opencloning-db/pyproject.toml packages/opencloning-db/src
language: system
pass_filenames: false
files: |
(?x)^(
packages/opencloning-db/src/.*|
packages/opencloning-db/pyproject.toml|
pyproject.toml
)$