GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ComPWA/policy: Pre-commit hooks that ensure that ComPWA repositories have a similar developer set-up

BranchesTags
Open more actions menu

Latest commit

 

History

825 Commits
825 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
benchmarks
benchmarks
 
 
docs
docs
 
 
labels
labels
 
 
src/compwa_policy
src/compwa_policy
 
 
tests
tests
 
 
.cspell.json
.cspell.json
 
 
.editorconfig
.editorconfig
 
 
.envrc
.envrc
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pre-commit-hooks.yaml
.pre-commit-hooks.yaml
 
 
.prekignore
.prekignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.yml
.prettierrc.yml
 
 
.python-version
.python-version
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
codecov.yml
codecov.yml
 
 
compwa-policy.schema.json
compwa-policy.schema.json
 
 
pyproject.toml
pyproject.toml
 
 
renovate.jsonc
renovate.jsonc
 
 

Repository files navigation

ComPWA repository policy

BSD 3-Clause license Spelling checked CI pre-commit.ci status code style: prettier uv Ruff ty

This repository sets the policies for developer environment in repositories if the ComPWA organization (See our Help developing page). The policies are automatically enforced through prek, a drop-in replacement for pre-commit.

Usage

Add a .pre-commit-config.yaml file to your repository with the following content:

repos:
  - repo: https://github.com/ComPWA/policy
    rev: ""
    hooks:
      - id: check-dev-files

then run

prek autoupdate --repo=https://github.com/ComPWA/policy

The notebook formatting hooks that used to live here have moved to ComPWA/nbhooks. When a repository contains notebooks, check-dev-files automatically migrates them over and keeps them up to date.

Important

After upgrading, the check-dev-files hook fails if your .pre-commit-config.yaml still passes area-scoped flags (such as --no-pypi) under args:. These options now live in a [tool.compwa.policy] table in your pyproject.toml. Run the following one-off command to migrate automatically; you do not need to install anything first.

uvx --from git+https://github.com/ComPWA/policy --refresh policy migrate

Command-line interface

The same checks are exposed through a short Typer-based policy command, so you can run them on the fly without setting up prek first:

uvx --from git+https://github.com/ComPWA/policy policy --help

Running policy without a subcommand runs every check at once, exactly like the check-dev-files hook. Subcommands group the checks by domain, so you can run just a subset (e.g. policy python or policy nb). Options that apply to the whole repository can be declared once in a [tool.compwa.policy] table in your pyproject.toml instead of repeating them under args:. See the check-dev-files documentation for the full command tree and configuration options.

About

Pre-commit hooks that ensure that ComPWA repositories have a similar developer set-up

compwa.github.io/policy

Resources

Readme
BSD-3-Clause license

Contributing

Contributing
Activity
Custom properties

Stars

1 star

Watchers

5 watching

Forks

2 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.