-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
87 lines (77 loc) · 2.62 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
87 lines (77 loc) · 2.62 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
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.4
hooks:
- id: ruff-check
args: [--fix]
types_or: [python, jupyter]
- id: ruff-format
types_or: [python, jupyter]
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.74
hooks:
- id: ty
# Isolated extras in a temp env. Override shell UV_FROZEN=1 / UV_NO_SYNC=1 or that env stays empty.
args: [--isolated, --all-extras]
env: { UV_FROZEN: "0", UV_NO_SYNC: "0" }
- repo: local
hooks:
- 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.3
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-staged
name: Format, lint and type-check staged files (vp staged)
# `cd site` not `pnpm -C site`: corepack reads `packageManager` from the CWD, and
# there is no root package.json, so from the root it picks its own pnpm and then trips
# the version check against site/package.json
entry: env PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false sh -c 'cd site && pnpm exec vp staged'
language: system
pass_filenames: false
stages: [pre-commit]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.38.0
hooks:
- id: check-jsonschema
files: ^pymatviz/keys\.yml$
args: [--schemafile, tests/keys-schema.yml]