-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
.pre-commit-config.yaml
51 lines (51 loc) · 1.51 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
# This config is used by pre-commit to run hooks on files before committing them to git
# To use it install pre-commit with:
# `pip install pre-commit`
# and run
# `pre-commit install`
# in the root of the repository
# From that point onwards, pre-commit will run the hooks on every commit.
# If pre-commit does some modification, the commit will fail. Add the
# changes done by pre-commit and commit again.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Black to format code with a consistent style
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black-jupyter
# isort to automatically sort imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
# jupyter notebook cleans
- repo: local
hooks:
- id: jupyter-nb-clear-output
name: jupyter-nb-clear-output
files: \.ipynb$
stages: [commit]
language: system
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
#License header
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: \.py$
args:
- --license-filepath
- .LICENSE_header
- --no-extra-eol
#Validate our CITATION.cff
- repo: https://github.com/citation-file-format/cff-converter-python
rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
hooks:
- id: validate-cff