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

TODO: Migrate CLI to Typer #47

Open
bogdandm opened this issue Sep 9, 2022 · 1 comment
Open

TODO: Migrate CLI to Typer #47

bogdandm opened this issue Sep 9, 2022 · 1 comment
Labels
internal Just some stuff under the hood

Comments

@bogdandm
Copy link
Owner

bogdandm commented Sep 9, 2022

Current CLI class has a lot of boiler plate code and based on obsolete ArgParser. So it would be easeir to maintain it if it will be rewritten to some modern lib like Typer

@bogdandm bogdandm added the enhancement New feature or request label Sep 9, 2022
@ialarmedalien
Copy link
Contributor

ialarmedalien commented Sep 11, 2022

I have used a number of projects recently that use click for cli interaction (click is the only dependency of typer). I had a look at converting json2python-models over to using click, and it looks like the way in which some CLI arguments are specified would have to be changed, at least if you want to be able to include help text with the arguments. Example here. Any input parameter that currently has a variable number of possible values (e.g. -dkf, -dkr, --merge) would need to be changed to only allowing a single value BUT allowing the parameter to be repeated numerous times, i.e.

json2models --merge percent_50 number_500 -m Whatever whatever.json

would need to become

json2models --merge percent_50 --merge number_500 -m Whatever whatever.json

Apart from that, the conversion does not look too hard.

@bogdandm bogdandm added refactoring Changing existing code without adding new features and removed enhancement New feature or request labels Sep 13, 2022
@bogdandm bogdandm added internal Just some stuff under the hood and removed refactoring Changing existing code without adding new features labels Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Just some stuff under the hood
Projects
None yet
Development

No branches or pull requests

2 participants