|
a |
|
b/.pre-commit-config.yaml |
|
|
1 |
repos: |
|
|
2 |
- repo: https://github.com/pre-commit/pre-commit-hooks |
|
|
3 |
rev: v2.3.0 |
|
|
4 |
hooks: |
|
|
5 |
- id: end-of-file-fixer |
|
|
6 |
- id: trailing-whitespace |
|
|
7 |
- id: check-yaml |
|
|
8 |
exclude: "mkdocs.yml" |
|
|
9 |
- repo: https://github.com/astral-sh/ruff-pre-commit |
|
|
10 |
rev: v0.9.10 |
|
|
11 |
hooks: |
|
|
12 |
- id: ruff |
|
|
13 |
# 1. Attempt to automatically fix any lint issues. |
|
|
14 |
args: ["--fix"] |
|
|
15 |
- id: ruff-format |
|
|
16 |
- repo: https://github.com/Yelp/detect-secrets |
|
|
17 |
rev: v1.5.0 |
|
|
18 |
hooks: |
|
|
19 |
- id: detect-secrets |
|
|
20 |
name: detect-secrets (everything but notebooks) |
|
|
21 |
args: ['--baseline', '.secrets.baseline', '--exclude-files', '(.*\.ipynb|.*\.baseline)$', ] |
|
|
22 |
exclude: package.lock.json |
|
|
23 |
- id: detect-secrets |
|
|
24 |
name: detect-secrets (notebooks only) |
|
|
25 |
args: ['--baseline', '.secrets-nb.baseline', '--exclude-files', '^.(?!.*\.ipynb)', '--exclude-lines', '"(hash|id|image/\w+)":.*|<.*at 0x[0-9a-f]+>|object at 0x[0-9a-f]+', ] |
|
|
26 |
- repo: local |
|
|
27 |
hooks: |
|
|
28 |
- id: license-header-check |
|
|
29 |
name: Run license-check script |
|
|
30 |
entry: python internal/infra-bionemo/src/infra_bionemo/license_check.py -c scripts -c sub-packages -c docs -c internal --license-header ./license_header --modify |
|
|
31 |
language: python |
|
|
32 |
additional_dependencies: ["click==8.1.7"] |
|
|
33 |
pass_filenames: false |
|
|
34 |
always_run: true |