Add named CLI arguments while maintaining backwards compatibility with positional arguments #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduces a proper argument parser using Python's
argparsemodule with named arguments, while maintaining full backwards compatibility with the existing positional argument style.New named argument style:
python rushti.py --tasks tasks.txt --workers 4 --mode opt --retries 2 --result results.csv # Or with short flags: python rushti.py -t tasks.txt -w 4 -m opt -r 2 -o results.csvBackwards compatibility: The existing positional style continues to work exactly as before:
Implementation approach (detection-based hybrid):
-) is detected, use the newargparse-based parserThis provides:
--helpsupport and meaningful argument names--retries 3without specifying--mode)Closes #105
Type of Change
Release Label
Suggested:
release:minor- New feature (named arguments), non-breaking changeChecklist