-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
146 lines (135 loc) · 4.18 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
146 lines (135 loc) · 4.18 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
exclude: courts_schema_autogen\.py
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
exclude: autogen/\.*|types/.*autogen\.py
- id: forbid-submodules
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
exclude: types/.*autogen\.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff-check
args:
- --fix
- --exit-non-zero-on-fix
exclude: types/.*autogen\.py
- id: ruff-format
exclude: types/.*autogen\.py
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-jsonschema
name: Check all JSON Schema files are valid schemas
files: src/ds_caselaw_utils/schemas/.*\.schema\.json
args: ["--check-metaschema"]
- id: check-jsonschema
name: Check courts data matches schema
files: ^src/ds_caselaw_utils/data/court_names.yaml$
args:
[
"--schemafile",
"src/ds_caselaw_utils/schemas/courts/courts.schema.json",
]
- repo: https://github.com/camptocamp/jsonschema-gentypes
rev: 2.13.0
hooks:
- id: jsonschema-gentypes
name: Generate types file for court data
language: python
language_version: python3.12
additional_dependencies:
- "jsonschema-gentypes[validation]"
args:
[
"--json-schema=src/ds_caselaw_utils/schemas/courts/courts.schema.json",
"--python=src/ds_caselaw_utils/types/courts_schema_autogen.py",
]
always_run: true
pass_filenames: false
- id: jsonschema-gentypes
name: Generate types file for parser metadata
language: python
language_version: python3.12
additional_dependencies:
- "jsonschema-gentypes[validation]"
args:
[
"--json-schema=src/ds_caselaw_utils/schemas/parser-metadata/metadata.schema.json",
"--python=src/ds_caselaw_utils/types/metadata_schema_autogen.py",
]
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: build-schema-docs
name: Generate documentation for JSON Schemas
entry: bash scripts/build_schema_docs
language: python
additional_dependencies:
- "json-schema-for-humans==1.5.1"
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: check_courts_list
name: build_courts_list
entry: scripts/build_courts_list
language: python
additional_dependencies:
- "pyyaml==6.0.3"
always_run: true
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.2.0
hooks:
- id: mypy
name: mypy-src
language: python
additional_dependencies:
- "types-PyYAML==6.0.12.20260518"
- "ruamel.yaml==0.19.1"
- "markdown-it-py==4.2.0"
args:
- --strict
files: ^(src/ds_caselaw_utils|scripts)
exclude: (?:test_|factory.py)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.2.0
hooks:
- id: mypy
name: mypy-tests
files: ^src/ds_caselaw_utils/test_
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [yaml, json, xml, markdown, scss, javascript]
exclude: courts\.md|autogen/\.*|schemas/.*\.md
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.16.4
hooks:
- id: commitizen
- id: commitizen-branch
stages:
- pre-push
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 43.256.0
hooks:
- id: renovate-config-validator
args: [--strict]
files: ^renovate\.json$
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.26.1
hooks:
- id: zizmor