Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

.pre-commit-config.yaml 3.1 KB

You have to be logged in to leave a comment. Sign In
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  1. ---
  2. default_install_hook_types: [commit-msg, post-checkout, pre-commit, pre-push]
  3. minimum_pre_commit_version: "2.18.0"
  4. # TODO: Refactor notebooks/dashboard files.
  5. # Remove this exclusion after refactoring.
  6. exclude: "^source/thesis/dashboard|notebook"
  7. repos:
  8. # Perform general checks.
  9. - repo: https://github.com/pre-commit/pre-commit-hooks
  10. rev: v4.2.0
  11. hooks:
  12. - id: check-case-conflict
  13. - id: check-executables-have-shebangs
  14. - id: check-merge-conflict
  15. - id: check-shebang-scripts-are-executable
  16. - id: detect-private-key
  17. - id: end-of-file-fixer
  18. - id: mixed-line-ending
  19. - id: trailing-whitespace
  20. # Check commit messages.
  21. - repo: https://github.com/compilerla/conventional-pre-commit
  22. rev: v1.3.0
  23. hooks:
  24. - id: conventional-pre-commit
  25. stages: [commit-msg]
  26. # Check web related files.
  27. - repo: https://github.com/pre-commit/mirrors-prettier
  28. rev: v2.6.2
  29. hooks:
  30. - id: prettier
  31. args: ["--ignore-path", ".gitignore"]
  32. types_or:
  33. - html
  34. - markdown
  35. - yaml
  36. - toml
  37. - json
  38. # Check DVC files.
  39. - repo: https://github.com/iterative/dvc
  40. rev: 2.10.1
  41. hooks:
  42. - id: dvc-pre-commit
  43. language_version: python3
  44. stages:
  45. - commit
  46. - id: dvc-pre-push
  47. additional_dependencies: [".[all]"]
  48. language_version: python3
  49. stages:
  50. - push
  51. - id: dvc-post-checkout
  52. language_version: python3
  53. stages:
  54. - post-checkout
  55. always_run: true
  56. # Check Markdown files.
  57. - repo: https://github.com/executablebooks/mdformat
  58. rev: 0.7.14
  59. hooks:
  60. - id: mdformat
  61. # Check Python files.
  62. - repo: https://github.com/PyCQA/bandit # Check security vulnerabilites.
  63. rev: 1.7.4
  64. hooks:
  65. - id: bandit
  66. - repo: https://github.com/psf/black # Standardize code style.
  67. rev: 22.3.0
  68. hooks:
  69. - id: black
  70. - repo: https://github.com/PyCQA/flake8 # Indentify errors.
  71. rev: 4.0.1
  72. hooks:
  73. - id: flake8
  74. args: [--max-line-length=88]
  75. - repo: https://github.com/PyCQA/isort # Sort imports.
  76. rev: 5.10.1
  77. hooks:
  78. - id: isort
  79. args: [--profile, black]
  80. - repo: https://github.com/pre-commit/mirrors-mypy # Indentify type errors.
  81. rev: v0.942
  82. hooks:
  83. - id: mypy
  84. additional_dependencies: [types-pyyaml==6.0.5]
  85. - repo: https://github.com/PyCQA/pydocstyle # Check docstrings.
  86. rev: 6.1.1
  87. hooks:
  88. - id: pydocstyle
  89. additional_dependencies: [toml==0.10.2]
  90. args: [--add-select=D212]
  91. - repo: https://github.com/asottile/pyupgrade # Ensure modern syntax.
  92. rev: v2.32.0
  93. hooks:
  94. - id: pyupgrade
  95. args: [--py38-plus]
  96. # Check Python notebooks.
  97. - repo: https://github.com/nbQA-dev/nbQA
  98. rev: 1.3.1
  99. hooks:
  100. - id: nbqa-flake8
  101. args: [--max-line-length=88]
  102. - id: nbqa-isort
  103. args: [--profile, black]
  104. - id: nbqa-mypy
  105. - id: nbqa-pydocstyle
  106. args: [--add-select=D212]
  107. - id: nbqa-pyupgrade
  108. args: [--py38-plus]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...