usgs / groundmotion-processing

Parsing and processing ground motion data
Other
54 stars 41 forks source link

Switch from argparse to typer #1036

Closed emthompson-usgs closed 1 year ago

emthompson-usgs commented 1 year ago

https://typer.tiangolo.com/

baagaard-usgs commented 1 year ago

Typer looks interesting. It looks like it should be compatible with scripting (calling an application from another Python script), but we should check.

emthompson-usgs commented 1 year ago

I've looked into this a bit more and I think that doing this doesn't make sense at this time. Typer is relatively new and it may not be as reliably supported/stable as argparse (which is part of the python standard library). The main benefit that I was excited about was tab completion support, but that doesn't seem worth the trouble. Closing this issue.

baagaard-usgs commented 1 year ago

We might think about restructuring the top-level code to be less argparse centric. We could push argparse-specific code to the command line script and make the GMrecordsApp class independent of argparse. This would make it easy to switch the top-level code from one CLI parsing tool to another.

I agree this is not a high priority.

emthompson-usgs commented 1 year ago

I like this idea and I'll make a separate issue for it.