Open bogdandm opened 2 years ago
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.
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