-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
80 lines (74 loc) · 2.44 KB
/
.pre-commit-config.yaml
File metadata and controls
80 lines (74 loc) · 2.44 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
default_install_hook_types:
- pre-commit
- commit-msg
- pre-push
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
files: \.ya?ml$
- id: check-json
files: \.json$
exclude: ^aodn_cloud_optimised/config/dataset/dataset_template.json$
- id: end-of-file-fixer
exclude: '\.schema$'
- id: trailing-whitespace
- id: check-toml
- id: pretty-format-json
files: \.json$
args: ["--autofix", "--no-sort-keys"]
exclude: ^aodn_cloud_optimised/config/dataset/dataset_template.json$
- id: debug-statements
- id: check-executables-have-shebangs
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-jsonschema
files: ^aodn_cloud_optimised/config/dataset/.*\.json$
exclude: ^aodn_cloud_optimised/config/dataset/dataset_template.json$
args:
[
"--schemafile",
"aodn_cloud_optimised/config/schema_validation_common.json",
]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
#exclude: ^aodn_cloud_optimised/bin/create_aws_registry_dataset.py$ # issue with black!
- repo: https://github.com/python-poetry/poetry
rev: "2.3.3" # SYNC: see .poetry-version for all locations to update
hooks:
- id: poetry-check
args: ["--lock", "--quiet"] # Add --quiet to run poetry-check quietly
verbose: false
# - id: poetry-export
# args: ["-f", "requirements.txt", "--quiet"]
# verbose: false
- id: poetry-lock
args: ["--no-cache"]
verbose: true
- id: poetry-install
args: ["--quiet"]
- repo: local
hooks:
- id: validate-json-configs
name: Validate dataset JSON configs with Pydantic
entry: python3 aodn_cloud_optimised/bin/pydantic_precommit_hook.py --validate-configs aodn_cloud_optimised/config/dataset
language: system
types: [json]
pass_filenames: false
always_run: true
- id: check-data-query-protected-vars
name: Validate DataQuery.py
entry: python3 aodn_cloud_optimised/bin/validate_data_query.py
language: system
types: [json]
pass_filenames: false
always_run: true