forked from EffiSciencesResearch/ML4G-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
65 lines (58 loc) · 1.4 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
repos:
- repo: local
hooks:
- id: generate-notebooks
name: generate exercise notebooks
files: \.ipynb$
exclude: ^tests/
language: system
entry: python
args:
- meta/tools.py
- sync
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
name: format python files with black
args:
- --line-length
- "100"
- repo: local
hooks:
- id: neat-notebooks
name: remove jupyer outputs, metadata, fmt and add badge
files: \.ipynb$
exclude: ^tests/
language: system
entry: python
args:
- meta/tools.py
- neat
- id: update-readme
name: sync TOC in README.md
always_run: true
pass_filenames: false
language: system
entry: python
args:
- meta/tools.py
- list-of-workshops-readme
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=500']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
hooks:
- id: ruff
# Regex are python regex
files: ^(meta|tests)/.*\.py$
args:
- "--config"
- "pyproject.toml"
- "--fix"
- "--exit-non-zero-on-fix"