11fail_fast : true
22repos :
3-
4- # Clear output from jupyter notebooks so that only the input cells are committed.
3+ # Clear output from jupyter notebooks so that only the input cells are committed.
54 - repo : local
65 hooks :
76 - id : jupyter-nb-clear-output
87 name : Clear output from Jupyter notebooks
98 description : Clear output from Jupyter notebooks.
109 files : \.ipynb$
11- stages : [commit]
10+ stages : [pre- commit]
1211 language : system
1312 entry : jupyter nbconvert --clear-output
1413
2221 - id : check-added-large-files
2322 name : Check for large files
2423 description : Prevent the user from committing very large files.
25- args : ['--maxkb=500']
24+ args : ["--maxkb=500"]
25+ - id : end-of-file-fixer
2626
2727 # verify that pyproject.toml is well formed
2828 - repo : https://github.com/abravalheri/validate-pyproject
@@ -31,6 +31,21 @@ repos:
3131 - id : validate-pyproject
3232 name : Validate pyproject.toml
3333 description : Verify that pyproject.toml adheres to the established schema.
34+
35+ # use the black code formatter
36+ - repo : https://github.com/psf/black-pre-commit-mirror
37+ # Using this mirror lets us use mypyc-compiled black, which is about 2x faster
38+ rev : 25.9.0
39+ hooks :
40+ - id : black
41+
42+ # use the isort code formatter
43+ - repo : https://github.com/pycqa/isort
44+ rev : 7.0.0
45+ hooks :
46+ - id : isort
47+ args : ["--profile", "black", "--filter-files"]
48+
3449 # Analyze the src code style and report code that doesn't adhere.
3550 - repo : local
3651 hooks :
@@ -40,11 +55,11 @@ repos:
4055 language : system
4156 types : [python]
4257 files : ^src/
43- args :
44- [
58+ args : [
4559 " -rn" , # Only display messages
4660 " -sn" , # Don't display the score
4761 ]
62+
4863 # Analyze the tests code style and report code that doesn't adhere.
4964 - repo : local
5065 hooks :
@@ -54,14 +69,13 @@ repos:
5469 language : system
5570 types : [python]
5671 files : ^tests/
57- args :
58- [
72+ args : [
5973 " -rn" , # Only display messages
6074 " -sn" , # Don't display the score
6175 ]
6276
6377 # Run unit tests, verify that they pass. Note that coverage is run against
64- # the ./src directory here because that is what will be committed. In the
78+ # the ./src directory here because that is what will be committed. In the
6579 # github workflow script, the coverage is run against the installed package
6680 # and uploaded to Codecov by calling pytest like so:
6781 # `python -m pytest --cov=<package_name> --cov-report=xml`
7387 entry : bash -c "if python -m pytest --co -qq; then python -m pytest --cov=./src --cov-report=html; fi"
7488 language : system
7589 pass_filenames : false
76- always_run : true
90+ always_run : true
0 commit comments