sisl
sisl copied to clipboard
Change CLI to click
Describe the feature
@pfebrer did #608 in response to #606.
I have been looking around on typer
and trying to get a grasp of where the project is heading.
I must admit, that I am worried about its future commitment. The last many months of commits are (almost) purely maintenance. It does seem that it might catch on, but...
While click
is a bit verbose, it is probably much less than what we have right now with argparse.
The main advantage of using click
is that it is well maintained, and has a clear goal.
typer
is really lacking behind, but might be more susceptible to changes along the way, but due to its infancies its restriction on the Type
system means that one might need to overwrite many types in order to get behaviour that looks coherent for the users.
I am also worried about the complexity one has to go about to show nice types for the CLI. I.e. Union
types (which is not supported).
Typer has a nice rich
usage, but rich-click
seems like a drop-in replacement for viewing things in rich
.
I would also argue that once click
is in use, having smaller portions of the code use typer
is not that much of a deal since click
is the underlying machinery. I guess that they can be combined and used together?
@pfebrer I am sorry I have pushed you into the other details, I think it was worth it to get an idea of how it looked, but the above worries me.
Hmm ok, but could we have some kind of wrapper where we get the type annotations and help messages from the function definition so that we don't have to redefine all the arguments? That is very annoying to me, and that's why I like typer.
We could have the automatic detection, but allow normal click customization on top.