-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (86 loc) · 3.01 KB
/
.pre-commit-config.yaml
File metadata and controls
95 lines (86 loc) · 3.01 KB
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
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8
hooks:
- id: ruff-check
args: [--fix]
types_or: [python, jupyter]
- id: ruff-format
types_or: [python, jupyter]
- repo: local
hooks:
- id: ty
name: ty check
entry: ty check --ignore unused-type-ignore-comment --ignore unused-ignore-comment
language: python
types: [python]
pass_filenames: false
additional_dependencies: [ty==0.0.18]
- id: check-readme-src-links
name: Check README source links
entry: python .github/scripts/check_readme_src_links.py
language: python
files: ^(readme\.md|pymatviz/.*\.py)$
pass_filenames: false
- repo: local
hooks:
- id: marimo-check
name: marimo check
entry: marimo check --strict
language: python
files: examples/widgets/marimo_demo\.py$
additional_dependencies: [marimo]
- repo: https://github.com/janosh/format-ipy-cells
rev: v0.1.11
hooks:
- id: format-ipy-cells
- repo: builtin
hooks:
- id: check-case-conflict
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
exclude: ^assets/.+\.(svg|html)$
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-added-large-files
args: [--maxkb=1024]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
stages: [pre-commit, commit-msg]
exclude_types: [csv, svg, html, yaml, jupyter]
args: [--ignore-words-list, 'hist,mape,te,nd,fpr,abou,nam', --check-filenames]
- repo: https://github.com/kynan/nbstripout
rev: 0.9.1
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-output]
- repo: local
hooks:
- id: vp-fmt
name: Format (oxfmt)
entry: bash -c 'for dir in site pymatviz/widgets/web; do (cd "$dir" && [ -d node_modules ] || npm install && node_modules/.bin/vp fmt --write); done'
types_or: [ts, javascript, json, css, html, svelte]
language: system
pass_filenames: false
- id: vp-lint
name: Lint (oxlint)
entry: bash -c 'for dir in site pymatviz/widgets/web; do (cd "$dir" && [ -d node_modules ] || npm install && node_modules/.bin/vp lint --fix); done'
types_or: [ts, javascript, json, css, html, svelte]
language: system
pass_filenames: false
- id: svelte-check
name: Svelte type check
entry: bash -c 'cd site && [ -d node_modules ] || npm install && node_modules/.bin/svelte-kit sync && node_modules/.bin/svelte-check-rs --threshold error'
language: system
types_or: [ts, svelte]
pass_filenames: false
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
files: ^pymatviz/keys\.yml$
args: [--schemafile, tests/keys-schema.yml]