This is the solution to PS2 ex 1: Pre-commit hooks.
Install the virtual environment and install your repo from source:
conda env create -f environment.yml
conda activate gdp
pip install --no-build-isolation -e .
To install the pre-commit hooks, run:
pre-commit install
When updating the pre-commit hooks, run:
pre-commit clean
pre-commit install
To run pre-commit hooks on all files, run:
pre-commit run --all-files
to run it on a specific file, run:
pre-commit run --files <file>