Skip to content

docs(init): use console-script form in package docstring examples#34

Merged
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
docs/init-docstring-console-script
Apr 22, 2026
Merged

docs(init): use console-script form in package docstring examples#34
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
docs/init-docstring-console-script

Conversation

@cmeans-claude-dev
Copy link
Copy Markdown
Contributor

@cmeans-claude-dev cmeans-claude-dev Bot commented Apr 22, 2026

Summary

  • Replace every `python -m yt_dont_recommend …` example in `src/yt_dont_recommend/init.py` with the console-script form `yt-dont-recommend …`. The `python -m` form never worked (no `main.py` in the package) and the console script is what README and `--help` already document.
  • Add `--blocklist` to each example, since the bare `yt-dont-recommend` invocation now prints help (`--blocklist` or `--clickbait` is required to do work).
  • Minor scope-creep: corrected the docstring's `License: MIT` line to `Apache-2.0` to match `main` after the PR chore: switch license to Apache-2.0 and fix PyPI metadata for badges #22 license switch. The LICENSE file, `pyproject.toml`, and CHANGELOG were already correct — this was just stale docstring metadata.

Closes #31.

Test plan

  • `.venv/bin/python -m pytest tests/ -q` — 449 passed (no test touches the module docstring, but confirms the edit did not break imports).
  • QA: spot-check the rendered docstring via `python -c "import yt_dont_recommend; print(yt_dont_recommend.doc)"` and confirm every `Usage:` example is invokable as written.

Closes #31.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Awaiting CI Dev complete, waiting for CI to pass before QA Ready for QA Dev work complete — QA can begin review and removed Awaiting CI Dev complete, waiting for CI to pass before QA labels Apr 22, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

LGTM

@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label Apr 22, 2026
@github-actions github-actions Bot removed the Ready for QA Dev work complete — QA can begin review label Apr 22, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

QA Review — PR #34

Verdict: QA Failed

One substantive finding blocks signoff (missing CHANGELOG entry). Everything else I checked passed.

Verification

  • python -m yt_dont_recommend --version still fails with No module named yt_dont_recommend.__main__ — confirms issue #31's premise and confirms PR chose option 1 (docstring fix) rather than option 2 (add __main__.py). Correct choice per issue discussion.
  • Rendered docstring verified via python -c "import yt_dont_recommend; print(yt_dont_recommend.__doc__)" — every Usage: example now uses yt-dont-recommend … with --blocklist where required, License line reads Apache-2.0.
  • Bare yt-dont-recommend prints help — matches the PR claim that --blocklist or --clickbait is now required to do work. --check-selectors and --login stand alone without --blocklist; also correct.
  • No remaining python -m yt_dont_recommend references anywhere in the repo (grep -rn "python -m yt_dont_recommend" --include="*.py" --include="*.md" --include="*.yaml" --include="*.yml" --include="*.toml" returns zero hits).
  • License docstring correction (MIT → Apache-2.0) matches pyproject.toml (license = {text = "Apache-2.0"}) and LICENSE file. Legitimate cleanup of stale metadata; the scope-creep callout in the PR body is fair.
  • Tests: .venv/bin/python -m pytest tests/ -q → 449 passed (34.13s). Matches PR body.
  • CI: all required checks green on docs/init-docstring-console-script.

Findings

# Finding Severity
1 No CHANGELOG.md ## [Unreleased] entry for this PR. Project convention is that every PR — docs-only included — adds an Unreleased entry. The existing ### Changed — License changed from MIT to Apache-2.0 entry describes the PR #22 license switch itself, not this PR's catch-up of stale docstring metadata, and there is no entry for the console-script example cleanup or closes #31. Suggested: add a ### Fixed entry, e.g. "Corrected stale python -m yt_dont_recommend examples and License: MIT metadata in the package module docstring to match the console-script entry point and the Apache-2.0 license switch (closes #31)." substantive
2 CLAUDE.md:79 and CLAUDE.md:90 still reference a pre-restructure invocation .venv/bin/python yt_dont_recommend.py --source /tmp/test-blocklist.txt. There is no top-level yt_dont_recommend.py — running that command errors the same way the old docstring examples did. Strictly out of scope for issue #31 (which targeted src/yt_dont_recommend/__init__.py only), but it's the same doc-drift failure mode and the PR already took one scope-creep (license line). Either tighten up in this PR or file a follow-up. observation

Unchecked PR checkbox

The PR body's second test-plan checkbox (QA: spot-check the rendered docstring via python -c "import yt_dont_recommend; print(yt_dont_recommend.__doc__)" and confirm every Usage: example is invokable as written) is now verified by QA. I'll tick it as part of the review.

@cmeans cmeans added QA Failed QA found issues — needs dev attention and removed QA Active QA is actively reviewing; Dev should not push changes labels Apr 22, 2026
Addresses QA feedback on #34:
- Add `### Fixed` entry under `[Unreleased]` for this PR.
- Fix `CLAUDE.md:79` and `CLAUDE.md:90` which still reference the
  pre-restructure `.venv/bin/python yt_dont_recommend.py` invocation
  (no such top-level script exists). Same doc-drift pattern as the
  `python -m` examples in the package docstring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Awaiting CI Dev complete, waiting for CI to pass before QA Ready for QA Dev work complete — QA can begin review and removed QA Failed QA found issues — needs dev attention Awaiting CI Dev complete, waiting for CI to pass before QA labels Apr 22, 2026
@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label Apr 22, 2026
@github-actions github-actions Bot removed the Ready for QA Dev work complete — QA can begin review label Apr 22, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

QA Review — Round 2 on PR #34

Verdict: Ready for QA Signoff

Both findings from round 1 addressed; re-verification clean.

Re-verification

  • CHANGELOG ## [Unreleased] → ### Fixed entry added (424688b) — closes #31, describes the docstring fix, the CLAUDE.md console-script catch-up, and the License: MIT → Apache-2.0 docstring correction all in one entry. Correct section, correct category.
  • CLAUDE.md:79,90 now use .venv/bin/yt-dont-recommend --blocklist --source /tmp/test-blocklist.txt — matches the console-script form and preserves the CLI semantics (--blocklist required, --source consumed, empty file still triggers check_removals() for the Step 5 unblock cycle).
  • Rendered docstring still correct — re-ran python -c "import yt_dont_recommend; print(yt_dont_recommend.__doc__)"; every Usage: example is invokable, License reads Apache-2.0.
  • Repo-wide scan: grep -rn "python -m yt_dont_recommend\|python yt_dont_recommend\.py\|python3 yt_dont_recommend\.py" → only hit is the CHANGELOG entry itself (quoting the old pattern in prose). No remaining live usages.
  • Tests: .venv/bin/python -m pytest tests/ -q → 449 passed in 34.06s.
  • Lint: .venv/bin/ruff check src/ tests/ → all checks passed.
  • CI green on the refreshed branch; mergeable.

Promoting to Ready for QA Signoff. Maintainer can apply QA Approved.

@cmeans cmeans added Ready for QA Signoff QA passed — ready for maintainer final review and merge QA Approved Manual QA testing completed and passed and removed QA Active QA is actively reviewing; Dev should not push changes Ready for QA Signoff QA passed — ready for maintainer final review and merge labels Apr 22, 2026
@cmeans-claude-dev cmeans-claude-dev Bot merged commit 043f65c into main Apr 22, 2026
28 checks passed
@cmeans-claude-dev cmeans-claude-dev Bot deleted the docs/init-docstring-console-script branch April 22, 2026 16:22
@cmeans cmeans mentioned this pull request Apr 23, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Approved Manual QA testing completed and passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs/tool: __init__.py docstring documents python -m yt_dont_recommend, which doesn't work

2 participants