Repository navigation
Add marginal help / marginal help <command> - #78
HarshRajSinghania wants to merge 2 commits into
Conversation
exactml
left a comment
There was a problem hiding this comment.
Thanks again for the contribution! ❤️ It's really nice to see marginal getting contributions from outside the core maintainers. Really appreciate you taking the time to work on this and help improve the project! 🙏
There was a problem hiding this comment.
Could we move _run_help from marginal/cli/__init__.py into a dedicated marginal/cli/help.py as run_help?
This would keep the CLI structure consistent with run_init and run_review, where each command has its own module and is dispatched from __init__.py. The required arguments can simply be passed into run_help, just like args.path / args.force are passed to run_init.
I don't think this requires any behavioral changes, mainly just a small refactor to keep the CLI organized consistently. 😊
| return 2 | ||
|
|
||
|
|
||
| def _run_help( |
There was a problem hiding this comment.
I noticed there is no entry about this new cli capability. Could you also add a CHANGELOG.md entry under UNDER DEVELOPMENT → New Features as well?
Keep the CLI package consistent with run_init and run_review by exporting run_help from marginal/cli/help.py.
|
Moved
The CHANGELOG entry under UNDER DEVELOPMENT → New Features for ISSUE-77 is still outstanding; I will push that on this branch next. |
Summary
Closes #77.
marginal --helpandmarginal <command> --helpalready work via argparse. The baremarginal help/marginal help <command>forms were not recognized and failed withinvalid choice: 'help'and exit code 2.Implementation
helpsubcommand on the top-level parser inmarginal/cli/__init__.py.marginal helpprints the same top-level usage asmarginal --helpand exits 0.marginal help init/marginal help reviewprint that subcommand's usage (same asmarginal init --help/marginal review --help) and exit 0.marginal help not-a-command) still go through argparseparser.errorand exit 2.Testing
python3 -m pytest tests/test_help.py -q— 4 passedpython3 -m pytest tests --ignore=tests/test_providers.py -q— 122 passed (providers module skipped:anthropicnot installed in this environment)CHANGELOG entry for ISSUE-77 will follow in this branch if maintainers want it in the same PR; happy to add it.