Skip to content

Commit 0bc9b8b

Browse files
authored
Update pre-commit hooks and fix CSV data value (#573)
Added several new pre-commit hooks for improved code quality checks and validation, including TOML, JSON, merge conflict, case conflict, and mixed line ending checks. Also corrected a data value in PISA18sampleScale.csv from -0.907727459 to 0.907727459.
1 parent 1fc193b commit 0bc9b8b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ repos:
2121
- id: end-of-file-fixer
2222
exclude_types: [svg]
2323
- id: check-yaml
24+
- id: check-toml
25+
- id: check-json
2426
- id: check-added-large-files
2527
exclude: &exclude_pattern '(iv_weak_instruments|its_lift_test)\.ipynb'
2628
args: ["--maxkb=1500"]
29+
- id: check-merge-conflict
30+
- id: check-case-conflict
31+
- id: mixed-line-ending
2732
- repo: https://github.com/astral-sh/ruff-pre-commit
2833
rev: v0.14.5
2934
hooks:
@@ -55,3 +60,7 @@ repos:
5560
args: [--ignore-missing-imports]
5661
files: ^causalpy/
5762
additional_dependencies: [numpy>=1.20, pandas-stubs]
63+
- repo: https://github.com/abravalheri/validate-pyproject
64+
rev: v0.23
65+
hooks:
66+
- id: validate-pyproject

causalpy/data/PISA18sampleScale.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ PV1READ,Female,ESCS,METASUM,PERFEED,JOYREAD,MASTGOAL,ADAPTIVITY,TEACHINT,SCREADD
9898
1.382758437,0,1.112755087,1.024329216,-1.363017023,0.546695917,-0.300835494,0.488206717,0.990856172,0.19103636,-0.063690149
9999
-0.180166117,0,-0.903784153,1.416120964,-0.789077206,0.3589234,-2.209705037,-1.353064842,-0.668887592,0.689393741,-0.929939088
100100
-0.138452609,0,-1.523831485,-0.171666648,0.021680557,-0.050770988,1.521829065,-0.8111262,-0.039406676,0.66554889,-0.851380406
101-
0.907727459,1,0.115773982,1.024329216,1.478217432,0.461175761,-0.873789642,0.080450276,-0.668887592,-0.265544842,-0.063690149
101+
0.907727459,1,0.115773982,1.024329216,1.478217432,0.461175761,-0.873789642,0.080450276,-0.668887592,-0.265544842,-0.063690149

0 commit comments

Comments
 (0)