Skip to content

added docstrings#18

Merged
wpak-ai merged 3 commits intocppalliance:developfrom
henry0816191:documentation/add-docstring
May 5, 2026
Merged

added docstrings#18
wpak-ai merged 3 commits intocppalliance:developfrom
henry0816191:documentation/add-docstring

Conversation

@henry0816191
Copy link
Copy Markdown
Collaborator

@henry0816191 henry0816191 commented May 5, 2026

Summary

Added some docstrings

Test plan

  • ./run check (or make check)
  • pre-commit run --all-files

Related issues

close #17

Summary by CodeRabbit

  • New Features

    • Exposes package version at runtime, falling back to a development version when unavailable.
  • Documentation

    • Improved and standardized docstrings across modules and public APIs for clearer descriptions and easier onboarding.

@henry0816191 henry0816191 self-assigned this May 5, 2026
@henry0816191 henry0816191 requested a review from wpak-ai as a code owner May 5, 2026 20:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 72b8ed9c-e0b1-4c5d-a912-944def6bdc24

📥 Commits

Reviewing files that changed from the base of the PR and between 7fc7675 and dc17b44.

📒 Files selected for processing (2)
  • src/paperscout/scout.py
  • src/paperscout/storage.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/paperscout/storage.py
  • src/paperscout/scout.py

📝 Walkthrough

Walkthrough

Adds/updates docstrings across the paperscout package and initializes package version metadata in src/paperscout/__init__.py by setting __version__ from installed distribution metadata with a fallback to "0.0.0-dev". No runtime behavior or public signatures were changed.

Changes

Documentation & Version Initialization

Layer / File(s) Summary
Package Version
src/paperscout/__init__.py
Adds module docstring and sets __version__ via importlib.metadata.version("paperscout") with PackageNotFoundError fallback to "0.0.0-dev".
CLI Entrypoint Docstrings
src/paperscout/__main__.py
Condensed docstrings for _setup_logging, _async_main, and main describing logging, startup, and CLI loop.
Configuration
src/paperscout/config.py
Adds module and Settings docstrings describing environment/.env-backed configuration.
Data Models
src/paperscout/models.py
Adds docstrings for enums, Paper dataclass, and Paper.from_index_entry.
Health & Slack API
src/paperscout/health.py, src/paperscout/scout.py
Adds/condenses docstrings for health handler, Slack app construction, message queue, handlers (watchlist, status, version, uptime), and helper formatting functions.
Sources / Probing
src/paperscout/sources.py
Adds module and function docstrings for WG21 index fetching, ISO probing, PDF/HTML extraction, and open-std.org scraping.
Monitoring / Polling
src/paperscout/monitor.py
Adds docstrings for diffing, per-user matches, DP transitions, poll results, and scheduler loop behavior.
Storage / State
src/paperscout/storage.py
Adds/updates docstrings for DB connection semantics, TTL-backed cache, probe state persistence, watchlist semantics, and match queries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • wpak-ai

Poem

🐰 I nibble lines and tidy prose,

Docstrings planted in tidy rows.
A version nestled, safe and small,
The scout is clearer — ready to call.
Hooray, the rabbit hops and stalls!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 79.07% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title "added docstrings" directly and clearly summarizes the main change across all modified files in the PR.
Description check ✅ Passed The PR description includes all required template sections: Summary explaining docstrings were added, Test plan with checklist items, and Related issues linking to #17.
Linked Issues check ✅ Passed The PR successfully fulfills issue #17 by adding comprehensive docstrings to modules, classes, functions, and methods across all core files.
Out of Scope Changes check ✅ Passed All changes are strictly within scope—only docstrings and module-level documentation were added; no functional logic, control flow, or exported API signatures were modified.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/paperscout/scout.py`:
- Line 418: The docstring contains a RIGHT SINGLE QUOTATION MARK in the text
"Post the user’s watchlist entries or an empty-state hint."; update that string
to use a plain ASCII apostrophe so it reads "Post the user's watchlist entries
or an empty-state hint." (replace the ’ with '). Save the change and re-run the
linter to confirm RUF002 is resolved.

In `@src/paperscout/storage.py`:
- Line 268: The docstring string "Slack users’ watchlists: author substring or
numeric paper id per row." in storage.py uses a typographic RIGHT SINGLE
QUOTATION MARK (U+2019); replace that character with the standard ASCII
apostrophe (U+0027) so the docstring becomes "Slack users' watchlists: author
substring or numeric paper id per row." — update the triple-quoted docstring
where it appears (search for the exact text "Slack users’ watchlists") to fix
the quotation character.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06283ae1-4c94-452a-bd1b-d3e2c69ff1f9

📥 Commits

Reviewing files that changed from the base of the PR and between 43f8549 and a490b12.

📒 Files selected for processing (9)
  • src/paperscout/__init__.py
  • src/paperscout/__main__.py
  • src/paperscout/config.py
  • src/paperscout/health.py
  • src/paperscout/models.py
  • src/paperscout/monitor.py
  • src/paperscout/scout.py
  • src/paperscout/sources.py
  • src/paperscout/storage.py

Comment thread src/paperscout/scout.py Outdated
Comment thread src/paperscout/storage.py Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
src/paperscout/scout.py (1)

419-419: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace smart quote with ASCII apostrophe to fix RUF002 lint failure.

Line 419 contains a RIGHT SINGLE QUOTATION MARK (') in "user's" instead of a plain ASCII apostrophe ('). This causes the Ruff RUF002 lint check to fail.

🔧 Proposed fix
-    """Post the user's watchlist entries or an empty-state hint."""
+    """Post the user's watchlist entries or an empty-state hint."""
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/paperscout/scout.py` at line 419, Replace the RIGHT SINGLE QUOTATION MARK
in the docstring text "Post the user’s watchlist entries or an empty-state
hint." with a plain ASCII apostrophe so it reads "Post the user's watchlist
entries or an empty-state hint."; update the triple-quoted docstring in scout.py
(the string containing that sentence) and scan nearby docstrings/comments for
any other smart quotes to ensure Ruff RUF002 no longer fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/paperscout/scout.py`:
- Line 419: Replace the RIGHT SINGLE QUOTATION MARK in the docstring text "Post
the user’s watchlist entries or an empty-state hint." with a plain ASCII
apostrophe so it reads "Post the user's watchlist entries or an empty-state
hint."; update the triple-quoted docstring in scout.py (the string containing
that sentence) and scan nearby docstrings/comments for any other smart quotes to
ensure Ruff RUF002 no longer fails.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 98fd050f-7d71-42fd-bf82-6faec0a3ee20

📥 Commits

Reviewing files that changed from the base of the PR and between a490b12 and 7fc7675.

📒 Files selected for processing (4)
  • src/paperscout/config.py
  • src/paperscout/models.py
  • src/paperscout/scout.py
  • src/paperscout/sources.py
✅ Files skipped from review due to trivial changes (3)
  • src/paperscout/config.py
  • src/paperscout/models.py
  • src/paperscout/sources.py

@wpak-ai wpak-ai merged commit 6f35ebb into cppalliance:develop May 5, 2026
7 checks passed
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.

Add Docstrings

2 participants