Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Pre-Commit Hooks

Pre-commit hooks are checks and syntax formatters that run upon every commit. If one of the hooks fails, the commit is aborted and you have to commit again after you resolved the issues raised by the hooks. Pre-commit hooks are defined in the .pre-commit-config.yaml. The template project includes a selected set of hooks that help maintain code quality and consistency. You can find additional hooks in the pre-commit documentation.

The template uses prek to manage pre-commit hooks, which simplifies installation and usage.

Python and Jupyter

File Formatting

Repository Hygiene

Spell Checking

Options

If you want to run the pre-commit hooks manually on all files (not just the ones that have changed), you can run:

$ pixi run prek

If you want to skip the pre-commit hooks for a particular commit, you can run:

$ git commit -am <your commit message> --no-verify

But don’t let errors grow large this way!