Skip to content

Replace argparse with typer for CLI#22

Merged
sageyu123 merged 5 commits intosuncast-org:mainfrom
sageyu123:dev/typer-cli
Jun 6, 2025
Merged

Replace argparse with typer for CLI#22
sageyu123 merged 5 commits intosuncast-org:mainfrom
sageyu123:dev/typer-cli

Conversation

@sageyu123
Copy link
Contributor

Refactored CLI code to use typer instead of argparse for a cleaner and more user-friendly interface.

Changes

  • Rewrote CLI logic using typer.Option and @app.command()
  • Updated pyproject.toml with CLI entry points: pyampp, gxbox
  • Clarified and improved help messages
  • Preserved default values and usage patterns

Benefits

  • Cleaner, more readable code
  • Built-in help, type validation, and argument parsing
  • Easier to extend and maintain
  • Existing command usage remains valid. No breaking changes.

Example Usage

gxbox --time "2024-05-12T00:00:00" --coords 0.0 0.0 --hpc

@sageyu123 sageyu123 merged commit f149b37 into suncast-org:main Jun 6, 2025
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.

1 participant