You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: gate doc quality in CI and pre-commit to prevent future degradation #616
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
Extend docs-autogen-pr.yml — add a quality audit step using --quality --fail-on-quality after doc generation on tag-triggered doc PRs.
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.
Currently the coverage metric counts only top-level classes and module-level functions (365 symbols, 99.45% documented). Methods are excluded because coverage is measured by existence of a dedicated MDX file, and methods don't get their own pages — they're documented as sections within the class page.
To make coverage truly representative of the full public API, a future enhancement could:
Parse class MDX pages to verify each public method is present as a documented section, or
Restructure docs generation to give each method its own MDX file
For now, method-level completeness is captured by the --quality audit (soft-fail in CI). The hard gate added by this issue should cover method docstrings too (i.e., no --no-methods) once the issue count reaches 0.
Activity
planetf1 commentedon Mar 11, 2026
We should also consider the overlap/alignment with existing ruff etc checks. From first glance they are broadly compatible.
ci: strip ANSI codes from job summary logs; defer docstring quality p…
planetf1 commentedon Mar 13, 2026
Coverage metric enhancement — include methods
Currently the coverage metric counts only top-level classes and module-level functions (365 symbols, 99.45% documented). Methods are excluded because coverage is measured by existence of a dedicated MDX file, and methods don't get their own pages — they're documented as sections within the class page.
To make coverage truly representative of the full public API, a future enhancement could:
For now, method-level completeness is captured by the
--qualityaudit (soft-fail in CI). The hard gate added by this issue should cover method docstrings too (i.e., no--no-methods) once the issue count reaches 0.docs: implement publishing pipeline (#617) (#646)
planetf1 commentedon Mar 17, 2026
Interatively fixing up the underlying issues in prep for enabling this.
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (generative-computing#616)
ci: gate docstring quality and coverage in CI (#616) (#689)
docs: implement publishing pipeline (generative-computing#617) (gener…
ci: gate docstring quality and coverage in CI (generative-computing#616…