You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the top-level parsing just uses sys.argv then dispatches to subcommands which each have their own parser constructed with argparse. Although argparse has great aspects, I believe it's a bit tough to build a subcommmand-driven parser with it (thus the current construction I guess).
There are some great-seeming, recently-developed tools capable of implementing a complex CLI like smt. One example is cliff, but click seems more well-supported and documented. (See repo example for a subcommand system.)
Moving to one of these would not only support completion, but could aid long term maintenance and extensibility. For example, at the cost of some UI rigidity, it will make the CLI a little more self-documenting (removing the need for maintaining bin/smt by using entry points and providing top-level options for the smt command). Additionally, click in particular is python 2/3 agnostic so could help ease that transition (though of course the CLI is a very small part of this issue).
(Above first raised in #224 migrated to this new issue)
The text was updated successfully, but these errors were encountered:
I'm not at all a fan of the entry point approach to scripts. My experience is that when things break, the multiple levels of indirection make it very hard to figure out what's wrong. However, it seems that using entry points could give us Windows script support for free (cf #111).
I don't have much experience either way. I can look into whether entry point approach is required to use click. Windows bonus seems to work in favor of it though. Will discuss more on the PR
Currently the top-level parsing just uses sys.argv then dispatches to subcommands which each have their own parser constructed with argparse. Although argparse has great aspects, I believe it's a bit tough to build a subcommmand-driven parser with it (thus the current construction I guess).
There are some great-seeming, recently-developed tools capable of implementing a complex CLI like smt. One example is cliff, but click seems more well-supported and documented. (See repo example for a subcommand system.)
Moving to one of these would not only support completion, but could aid long term maintenance and extensibility. For example, at the cost of some UI rigidity, it will make the CLI a little more self-documenting (removing the need for maintaining bin/smt by using entry points and providing top-level options for the smt command). Additionally, click in particular is python 2/3 agnostic so could help ease that transition (though of course the CLI is a very small part of this issue).
(Above first raised in #224 migrated to this new issue)
The text was updated successfully, but these errors were encountered: