Skip to content

release: v0.2.1 CLI help passthrough#2

Merged
na399 merged 1 commit into
mainfrom
release/v0.2.1
Feb 25, 2026
Merged

release: v0.2.1 CLI help passthrough#2
na399 merged 1 commit into
mainfrom
release/v0.2.1

Conversation

@na399
Copy link
Copy Markdown
Member

@na399 na399 commented Feb 25, 2026

Summary

  • make top-level thirawat CLI delegate leaf command args via parse_known_args
  • ensure thirawat index build -h, thirawat infer bulk -h, and thirawat infer query -h show full underlying command arguments
  • add dispatcher/unit tests for CLI routing, invalid command shapes, version output, and leaf help delegation

Validation

  • uv run pytest tests/test_cli_dispatch.py
  • uv run pytest
  • manual checks:
    • uv run thirawat index build -h
    • uv run thirawat infer bulk -h
    • uv run thirawat infer query -h

Copilot AI review requested due to automatic review settings February 25, 2026 02:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements CLI help passthrough for the thirawat mapper tool, enabling leaf commands to show their full underlying command arguments when -h or --help is requested. The implementation uses parse_known_args to delegate unrecognized arguments to underlying command parsers.

Changes:

  • Refactored top-level CLI to use parse_known_args for argument passthrough
  • Disabled help at the leaf command parser level with add_help=False to delegate help to underlying parsers
  • Added comprehensive test suite covering CLI routing, help delegation, version output, and error handling

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/thirawat_mapper/cli.py Refactored argument parsing to use parse_known_args and removed intermediate argument handling; set add_help=False on leaf command parsers to delegate help display to underlying modules
tests/test_cli_dispatch.py Added comprehensive test coverage for CLI dispatch behavior, help passthrough, version flag, and invalid command rejection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@na399 na399 merged commit ed6b435 into main Feb 25, 2026
13 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.

2 participants