ezyang / ghstack

Submit stacked diffs to GitHub on the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider using click for CLI/argument parsing?

amyreese opened this issue · comments

Would you be open to considering replacing the argparse usage with something more "friendly", like click? https://click.palletsprojects.com/en/8.1.x/

This would make it easier to associate flags and arguments with the code that uses it, and also would remove the need for the giant if/else block in __main__.py. I'd be happy to submit a PR, but wanted to know if this would be worth pursuing before I head down that road.

While at it, I think it could be helpful to organize the commands into a separate subpackage, like ghstack.cli.<command> to separate them from the main package.

You know what, fine, sure, we can do it.

My primary requirement is that the replaced argparser must be backwards compatible. This includes the special handling where ghstack defaults to ghstack submit.