Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CLI to click #735

Open
zerothi opened this issue Mar 27, 2024 · 1 comment
Open

Change CLI to click #735

zerothi opened this issue Mar 27, 2024 · 1 comment

Comments

@zerothi
Copy link
Owner

zerothi commented Mar 27, 2024

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.

@pfebrer
Copy link
Contributor

pfebrer commented Mar 28, 2024

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.

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

No branches or pull requests

2 participants