-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (81 loc) · 2.32 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
# Issue on Github action CI?
# - id: no-commit-to-branch
# args: [--branch, main]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args: ['--ignore=E501,E203,E731,W503']
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
additional_dependencies: [click==8.0.2]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.990
hooks:
- id: mypy
additional_dependencies: [types-dataclasses, numpy==1.22.4]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v15.0.7'
hooks:
- id: clang-format
# Not formatting external dependencies.
files: tessellate_ipu/lib/
# CMake formatting
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: [pyyaml]
types: [file]
files: (\.cmake|CMakeLists.txt)(.in)?$
# Jupyter notebook checks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.5.3
hooks:
- id: nbqa-black
- id: nbqa-pyupgrade
args: [--py37-plus]
- id: nbqa-isort
args: ['--profile=black']
- id: nbqa-flake8
args: ['--ignore=E501,E203,E302,E402,E722,E731,F401,F811,W503']
# Graphcore copyright
- repo: local
hooks:
- id: copyright-header-check-module
name: copyright-header-check-module
entry: python3 -m examples_utils test_copyright --amend ./tessellate/tile/
pass_filenames: false
language: python
additional_dependencies:
- 'git+https://github.com/graphcore/examples-utils@latest_stable'
- id: copyright-header-check-tests
name: copyright-header-check-tests
entry: python3 -m examples_utils test_copyright --amend ./tests
pass_filenames: false
language: python
additional_dependencies:
- 'git+https://github.com/graphcore/examples-utils@latest_stable'