Skip to content

Generalize check-test-skeleton hook with --source-dir and --tests-dir CLI args#1679

Merged
nathanjmcdougall merged 2 commits intomainfrom
copilot/generalize-check-test-skeleton-hook
Apr 1, 2026
Merged

Generalize check-test-skeleton hook with --source-dir and --tests-dir CLI args#1679
nathanjmcdougall merged 2 commits intomainfrom
copilot/generalize-check-test-skeleton-hook

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

The check-test-skeleton hook hard-coded SRC_DIR and TESTS_DIR as constants, preventing reuse in other projects.

  • hooks/check-test-skeleton.py: Replace constants with required --source-dir and --tests-dir argparse arguments. Path mapping uses tests_dir.parent dynamically instead of hard-coded "tests".
  • .pre-commit-config.yaml: Pass args explicitly to the hook entry:
args: ["--source-dir", "src", "--tests-dir", "tests/usethis"]

… CLI args

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2b280478-56ce-4e9a-a779-287bc273cace

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Generalize check-test-skeleton hook with CLI args Generalize check-test-skeleton hook with --source-dir and --tests-dir CLI args Apr 1, 2026
Copilot AI requested a review from nathanjmcdougall April 1, 2026 00:56
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review April 1, 2026 02:23
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 1, 2026

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/generalize-check-test-skeleton-hook (1ba5f87) with main (ea64647)

Open in CodSpeed

@nathanjmcdougall nathanjmcdougall merged commit afc4ea2 into main Apr 1, 2026
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/generalize-check-test-skeleton-hook branch April 1, 2026 03:27
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.

Generalize the check-test-skeleton hook

2 participants