Skip to content

docs: enforce public API docstrings - #38

Merged
IceCodeNew merged 1 commit into
masterfrom
codex/enforce-docstring-coverage
Jul 16, 2026
Merged

docs: enforce public API docstrings#38
IceCodeNew merged 1 commit into
masterfrom
codex/enforce-docstring-coverage

Conversation

@IceCodeNew

@IceCodeNew IceCodeNew commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • document Python modules, classes, functions, methods, constructors, and context-manager hooks with concise responsibility and behavior docstrings
  • enforce the complete stable Ruff pydocstyle rule set with the Google convention through existing local hooks and CI lint jobs
  • explicitly exclude formatter-conflicting D203, D206, and D300 rules, and exclude tests where behavior-focused names are the primary documentation

Validation

  • mise exec -- uv run --with pytest --with pytest-cov -- pytest --cov --cov-branch --cov-report=xml (529 passed; 100% source line and branch coverage)
  • .venv/bin/ruff check .
  • .venv/bin/ruff format --check .
  • prek run

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for public modules, classes, methods, protocols, and data models.
    • Clarified provider behavior, configuration, publishing, rendering, reference data, state management, and service orchestration.
    • Added documentation linting rules using the Google documentation convention.
  • Refactor
    • Centralized timezone-awareness validation while preserving existing behavior.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7852b36c-ce04-4993-8080-23dc40d48d09

📥 Commits

Reviewing files that changed from the base of the PR and between da86457 and f17ac30.

📒 Files selected for processing (19)
  • pyproject.toml
  • weather_briefing/air_quality.py
  • weather_briefing/allergen.py
  • weather_briefing/api_client.py
  • weather_briefing/cli.py
  • weather_briefing/config.py
  • weather_briefing/content_cleaners.py
  • weather_briefing/geocoding.py
  • weather_briefing/llm.py
  • weather_briefing/models.py
  • weather_briefing/prompts.py
  • weather_briefing/publishers.py
  • weather_briefing/reference_data.py
  • weather_briefing/render.py
  • weather_briefing/service.py
  • weather_briefing/sources.py
  • weather_briefing/state.py
  • weather_briefing/time_utils.py
  • weather_briefing/weather_context.py

📝 Walkthrough

Walkthrough

Ruff now enforces Google-style documentation rules, and docstrings were added throughout providers, domain models, configuration, orchestration, persistence, rendering, publishing, and CLI modules. A timezone validation helper was extracted without changing behavior.

Changes

Documentation and lint coverage

Layer / File(s) Summary
Lint configuration and core contracts
pyproject.toml, weather_briefing/models.py, weather_briefing/time_utils.py, weather_briefing/content_cleaners.py, weather_briefing/config.py, weather_briefing/reference_data.py, weather_briefing/prompts.py
Ruff enables D checks with Google conventions, while core models, utilities, configuration, reference data, and cleaning interfaces receive documentation.
Provider and source adapters
weather_briefing/air_quality.py, weather_briefing/allergen.py, weather_briefing/api_client.py, weather_briefing/geocoding.py, weather_briefing/llm.py, weather_briefing/sources.py, weather_briefing/weather_context.py
Provider protocols, constructors, fetch methods, adapters, and conversion helpers gain module, class, and method docstrings.
CLI orchestration, delivery, and state
weather_briefing/cli.py, weather_briefing/service.py, weather_briefing/render.py, weather_briefing/publishers.py, weather_briefing/state.py
CLI commands, briefing orchestration, renderers, publishers, SQLite state operations, and diagnostics helpers are documented without runtime logic changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding and enforcing public API docstrings.
Docstring Coverage ✅ Passed Docstring coverage is 93.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/enforce-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.

@IceCodeNew
IceCodeNew requested a review from Copilot July 16, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.62%. Comparing base (da86457) to head (f17ac30).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #38   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files          39       39           
  Lines        5851     5884   +33     
  Branches      337      337           
=======================================
+ Hits         5829     5862   +33     
  Misses         15       15           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@IceCodeNew
IceCodeNew marked this pull request as ready for review July 16, 2026 08:34
@IceCodeNew
IceCodeNew force-pushed the codex/enforce-docstring-coverage branch from 7dbe89f to f17ac30 Compare July 16, 2026 08:57
@IceCodeNew
IceCodeNew requested a review from Copilot July 16, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@IceCodeNew

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@IceCodeNew
IceCodeNew merged commit f13e518 into master Jul 16, 2026
20 checks passed
@IceCodeNew
IceCodeNew deleted the codex/enforce-docstring-coverage branch July 16, 2026 09:16
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.

2 participants