ComPWA notebook hooks#
This repository provides pre-commit hooks for formatting and standardizing Jupyter notebooks across repositories of the ComPWA organization. The hooks are distributed through this repository’s .pre-commit-hooks.yaml and are consumed by listing them in a .pre-commit-config.yaml file.
Usage#
Add a .pre-commit-config.yaml file to your repository and list which hooks you want to use:
repos:
- repo: https://github.com/ComPWA/nbhooks
rev: ""
hooks:
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
- id: set-nb-display-name
- id: strip-nb-whitespace
and install and activate pre-commit as follows:
pip install pre-commit
pre-commit autoupdate --repo=https://github.com/ComPWA/nbhooks
pre-commit install
This repository provides the following hooks: