Skip to content

Move calculate_scan_scope out of cli.py into sources.py - #171

Merged
coordt merged 1 commit into
mainfrom
167-move-calculate-scan-scope
Aug 16, 2026
Merged

Move calculate_scan_scope out of cli.py into sources.py#171
coordt merged 1 commit into
mainfrom
167-move-calculate-scan-scope

Conversation

@coordt

@coordt coordt commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Moves calculate_scan_scope() (pure scope/unmatched-id computation) from cli.py into sources.py, next to SourceScanResult
  • cli.py's source_scan() keeps only the click.echo loop over the returned unmatched set, restoring the ADR-0002 thin-CLI seam
  • Adds direct unit tests in test_sources.py (no-filter path and unmatched-id path)

Test plan

  • uv run pytest tests/ — 269 passed
  • uv run ruff check / ruff format --check on touched files
  • uv run mypy on touched files
  • /code-review — no findings

Closes #167

Restores the ADR-0002 thin-CLI seam: the scope/unmatched-id
computation is now a plain function next to SourceScanResult,
directly unit-tested in test_sources.py instead of only exercised
through Click's CliRunner. cli.py keeps only the click.echo loop.

Closes #167
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callowayproject.github.io/wiki-toolkit/pr-preview/pr-171/

Built to branch gh-pages at 2026-08-16 20:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Version hint: patch
Current version: 0.29.0
New version (when merged): 0.29.1

Comment ID: Display version hint-auto-generated

@coordt
coordt merged commit 9c193d1 into main Aug 16, 2026
7 checks passed
@coordt
coordt deleted the 167-move-calculate-scan-scope branch August 16, 2026 20:15
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.

Move calculate_scan_scope out of cli.py into sources.py

1 participant