Skip to content

Conversation

@nicolasbisurgi
Copy link
Collaborator

@nicolasbisurgi nicolasbisurgi commented Dec 5, 2025

Description

Introduces a proper argument parser using Python's argparse module 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.csv

Backwards compatibility: The existing positional style continues to work exactly as before:

python rushti.py tasks.txt 4 opt 2 results.csv

Implementation approach (detection-based hybrid):

  • If any named argument (starting with -) is detected, use the new argparse-based parser
  • Otherwise, fall back to the existing positional argument parsing logic

This provides:

  • Full backwards compatibility for existing scripts and automation
  • Improved UX with --help support and meaningful argument names
  • Flexibility to specify only the arguments you need (e.g., --retries 3 without specifying --mode)
  • A clear migration path for users who want to adopt the new style

Closes #105

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • CI/CD or build changes

Release Label

Suggested: release:minor - New feature (named arguments), non-breaking change

Checklist

  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's coding style
  • I have added tests if applicable

@nicolasbisurgi nicolasbisurgi self-assigned this Dec 5, 2025
@nicolasbisurgi nicolasbisurgi added the release:minor Triggers major version bump (e.g.: 1.4.1 → 1.5.0) label Dec 5, 2025
@nicolasbisurgi
Copy link
Collaborator Author

@MariusWirtz - I think this is a prerequisite for #104 as we would need a --run-exclusive argument to prevent other instance of RushTI to run in parallel.

@nicolasbisurgi nicolasbisurgi merged commit 3f745a8 into master Dec 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:minor Triggers major version bump (e.g.: 1.4.1 → 1.5.0)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add named CLI arguments while maintaining backwards compatibility with positional arguments

2 participants