Skip to content

ci: gate doc quality in CI and pre-commit to prevent future degradation #616

@planetf1

Description

@planetf1

Context

The audit_coverage.py --quality tool detects missing/incomplete docstrings across the public API. The --fail-on-quality flag (added in PR #611) causes the tool to exit 1 when quality issues are found, making it usable as a hard gate in CI or pre-commit.

The goal is to prevent future degradation once the baseline is clean.

Pre-requisites (must land first)

These open items need to complete before this gate makes sense to enable:

The gate should only be enabled once the audit reports 0 quality issues, so it starts green.

Work required

  1. Extend docs-autogen-pr.yml — add a quality audit step using --quality --fail-on-quality after doc generation on tag-triggered doc PRs.

  2. Consider a pre-commit hook — a local hook calling audit_coverage.py --quality --fail-on-quality would catch regressions at commit time. Note Griffe loads the full package (~10 s), so CI may be more practical than pre-commit for most contributors.

Goal

Once in place, any PR that removes a docstring, strips an Args:/Returns: section, or adds an undocumented public symbol will fail the build automatically.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions