Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes ArgMojo terminology by expanding abbreviations (arg→argument, cmd→command) and renaming “argv/args” concepts to “tokens” where they refer to raw CLI token streams. It updates core APIs and then propagates the naming changes through tests, docs, and examples.
Changes:
- Rename builder/declarative identifiers and APIs (e.g.,
Command.args→Command.arguments,Parsable.parse_args→Parsable.parse_arguments). - Rename “unknown args” handling to “unknown arguments” (
ParseResult.get_unknown_arguments()), and adjust callers/tests/docs. - Update parsing internals/docs to use “tokens” for raw CLI input (including
argv()output), and refresh related documentation.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_subcommands_declarative.mojo | Updates local variables and declarative parsing helper usage to command / parse_arguments. |
| tests/test_subcommands.mojo | Updates subcommand argument list access from .args to .arguments and local variable naming. |
| tests/test_schema_validation.mojo | Updates Command.arguments usage and parse_arguments naming. |
| tests/test_parse.mojo | Updates unknown-collection API usage to get_unknown_arguments(). |
| tests/test_options.mojo | Renames positional “cmd” field to “command” and updates unknown-collection API usage. |
| tests/test_interactive.mojo | Renames cmd locals and updates .args→.arguments loops. |
| tests/test_hybrid.mojo | Updates hybrid examples/tests to command naming and parse_arguments naming. |
| tests/test_help.mojo | Updates internal color field name expectations (_argument_color) and .arguments usage. |
| tests/test_declarative.mojo | Updates declarative tests to .arguments and parse_arguments. |
| tests/test_completion.mojo | Aligns typo-subcommand tests with new error-message behavior (no inline “Did you mean”). |
| src/argmojo/utils.mojo | Clarifies _help_line_width() docstring to match its clamping/fallback behavior. |
| src/argmojo/parse_result.mojo | Renames unknown tracking field/method to _unknown_arguments / get_unknown_arguments(). |
| src/argmojo/parsable.mojo | Renames parse_args→parse_arguments, and shifts local naming to command/arguments. |
| src/argmojo/command.mojo | Broad rename: args→arguments, raw CLI inputs to tokens, and related helper/method renames. |
| src/argmojo/argument_wrappers.mojo | Renames trait/method parameters from cmd→command and local arg→argument. |
| pixi.toml | Updates task scripts (but currently introduces a shell line-continuation issue with set -e). |
| examples/mgit.mojo | Propagates cmd→command naming through example builder code. |
| docs/user_manual.md | Updates examples/tables to new API and ANSI code representation; updates unknown-collection API name. |
| docs/declarative_api_planning.md | Updates planning doc examples to new command / parse_arguments naming. |
| docs/argmojo_overall_planning.md | Updates planning doc references to get_unknown_arguments() and command naming. |
| README.md | Updates hybrid bridge example and method table wording to parse_arguments / command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
pixi.toml:33
- The
testtask script starts withset -e\which line-continues into the next command. Inbash, this turns intoset -e pixi run format ..., which changes positional parameters instead of executing the test commands, so the task will not actually run the suite as intended. Putset -eon its own line (no trailing\) / ensure the multi-line string is structured so subsequent commands are separate shell statements.
test = """ set -e\
pixi run format \
&& pixi run package \
&& mojo run -I src -D ASSERT=all tests/test_parse.mojo \
&& mojo run -I src -D ASSERT=all tests/test_options.mojo \
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR standardizes ArgMojo terminology by expanding abbreviations (
arg→argument,cmd→command) and renaming “argv/args” concepts to “tokens” where they refer to raw CLI token streams. It updates core APIs and then propagates the naming changes through tests, docs, and examples.Changes:
Command.args→Command.arguments,Parsable.parse_args→Parsable.parse_arguments).ParseResult.get_unknown_arguments()), and adjust callers/tests/docs.argv()output), and refresh related documentation.