forked from rapidsai/cugraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
85 lines (85 loc) · 2.63 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
85
## https://pre-commit.com/
#
# Before first use: `pre-commit install`
# To run: `pre-commit run --all-files`
exclude: '^thirdparty'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language_version: python3
args: [--target-version=py39]
files: ^(python/.*|benchmarks/.*)$
exclude: ^python/nx-cugraph/
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ["--config=.flake8"]
files: python/.*$
types: [file]
types_or: [python] # TODO: Enable [python, cython]
additional_dependencies: ["flake8-force"]
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa
additional_dependencies:
- flake8==6.0.0
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
exclude: |
(?x)^(
cpp/libcugraph_etl|
cpp/tests/c_api
)
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.8.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v0.0.3
hooks:
- id: verify-copyright
files: |
(?x)
[.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
[.]flake8[.]cython$|
meta[.]yaml$|
setup[.]cfg$
- repo: local
hooks:
- id: nx-cugraph-meta-data-update
name: nx-cugraph meta-data updater
entry: bash -c "PYTHONPATH=./python/nx-cugraph python ./python/nx-cugraph/_nx_cugraph/__init__.py"
files: ^python/nx-cugraph/
types: [python]
language: python
pass_filenames: false
additional_dependencies: ["networkx>=3.2"]
- repo: local
hooks:
- id: nx-cugraph-readme-update
name: nx-cugraph README updater
entry: bash -c "PYTHONPATH=./python/nx-cugraph python ./python/nx-cugraph/scripts/update_readme.py ./python/nx-cugraph/README.md"
files: ^python/nx-cugraph/
types_or: [python, markdown]
language: python
pass_filenames: false
additional_dependencies: ["networkx>=3.2"]