Rewrite CLI to use click instad of typer #270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #261 typer changed the scope of the project and started pulling in other dependencies.
This pull request changes the dependency used from typer to click.
The resulting code is a bit more verbose, but the general way of working with it is largely similar.
I found that there were two features missing in click.
First is no support for enums as choices. But this is easy to work around by supplying a list of choices and in the function itself convert to an enum.
Second feature missing was the option to show the environment variables for each option. I have added a simple monkey patch to the option function to extend the help text.
Current state is functional, all option types work and environment variables in general work.. But some more testing is wise.