Skip to content

ci: add docstring coverage gate via interrogate#42

Merged
WomB0ComB0 merged 2 commits into
mainfrom
feat/docstring-coverage
May 9, 2026
Merged

ci: add docstring coverage gate via interrogate#42
WomB0ComB0 merged 2 commits into
mainfrom
feat/docstring-coverage

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

Summary

Surface missing docstrings on the public API surface as a failing PR check rather than letting them leak into the auto-generated docs (resq-software/docs) as empty headings.

Adds:

  • `[tool.interrogate]` to each package's `pyproject.toml` (config lives with the code so contributors get the same result locally).
  • `docstrings` job in `.github/workflows/ci.yml` running `uvx interrogate --config pyproject.toml src/` per package.

Initial thresholds

Anchor today's measured coverage with a small buffer so new code can't regress; ratchet up as gaps fill in:

Package Current `fail-under` Notes
resq-mcp 81% 75 Concentration of misses in `core/telemetry.py` (OpenTelemetry helpers)
resq-dsa 100% 90 Already fully documented with private/init/magic exclusions

Both packages pass with these thresholds today.

Test plan

  • `uvx interrogate --config packages/resq-mcp/pyproject.toml packages/resq-mcp/src/` passes locally
  • `uvx interrogate --config packages/resq-dsa/pyproject.toml packages/resq-dsa/src/` passes locally
  • CI `docstrings` job appears in the check list and passes

Surface missing docstrings on the public API surface as a failing
PR check rather than letting them leak into the auto-generated docs
as empty headings.

Initial thresholds anchor today's measured coverage with a small
buffer so new code can't regress, and the floor can be raised
incrementally as gaps fill in:

  resq-mcp: fail-under = 75  (current 81%; concentration in
                              core/telemetry.py)
  resq-dsa: fail-under = 90  (current 100% with private/init/magic
                              exclusions)

Configuration lives in `[tool.interrogate]` per-package so contributors
can run `uvx interrogate --config pyproject.toml src/` locally and
get the same result.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 46 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f959b6cd-f6e8-4929-813c-47118d6aa26e

📥 Commits

Reviewing files that changed from the base of the PR and between ece8971 and e25661c.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • packages/resq-dsa/pyproject.toml
  • packages/resq-mcp/pyproject.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docstring-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces interrogate configuration to the resq-dsa and resq-mcp packages to enforce docstring coverage. The reviewer identified discrepancies between the coverage percentages mentioned in the configuration comments and the PR description, suggesting that the fail-under thresholds be increased to better reflect the current state and provide more effective regression testing.

Comment thread packages/resq-dsa/pyproject.toml Outdated
Comment thread packages/resq-mcp/pyproject.toml
Per gemini-code-assist review on PR #42, the original comments cited
raw interrogate output (95%, 76.6%) but [tool.interrogate] enables
ignore-init/ignore-magic/ignore-private which raise the measured
coverage to 100% / 81%. Update comments to match what the gate
actually evaluates.
@WomB0ComB0
Copy link
Copy Markdown
Member Author

Updated pyproject.toml comments to reference post-[tool.interrogate]-exclusion coverage numbers (resq-dsa 100%, resq-mcp 81%) per @gemini-code-assist review. Resolves the discrepancy with the PR description.

@WomB0ComB0 WomB0ComB0 merged commit 09cf4f5 into main May 9, 2026
22 checks passed
@WomB0ComB0 WomB0ComB0 deleted the feat/docstring-coverage branch May 9, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant