ComPWA repository policy#
This repository standardizes and synchronizes the developer environment of ComPWA repositories. Its check-dev-files hook keeps configuration files up to date as developer tools introduce new features and deprecate old ones. The policies are enforced through pre-commit; all available hooks are listed in .pre-commit-hooks.yaml.
Set up a repository#
Add a .pre-commit-config.yaml file to your repository and list which hooks you want to use:
repos:
- repo: https://github.com/ComPWA/policy
rev: ""
hooks:
- id: check-dev-files
args:
- --repo-name="short name for your repository"
Then install and activate pre-commit:
pip install pre-commit
pre-commit autoupdate --repo=https://github.com/ComPWA/policy
pre-commit install
Running the hook for the first time turns this minimal configuration into the standard ComPWA developer setup:
pre-commit run check-dev-files --all-files
For an existing repository, policy bootstrap can detect its current setup and configure the hook automatically. See the command-line guide for bootstrapping, individual checks, and installation options.
The notebook formatting hooks that used to be served from this repository now live in ComPWA/nbhooks.