Split CLI program (sonador-cli.py) into modules to make it easier to maintain and extend
Comment from oak-tree/medical-imaging/sonador-cli!14:
I'm not sure that we need to hold up this merge request, but the CLI tool is starting to get really cluttered. There's now three top-level commands and more than two dozen tools that can be used, all of which are in the main file. We should refactor to a module system so that "pacs", "local", ... commands are all together in single package along with the parser, validation, and execution logic. Over time, that will hopefully make it easier to determine where new code should be added.
- Create a defined interface for registering new modules
-
register_cmd
: add arguments and options of a module to theArgumentParser
instance -
run_cmd
: execute module's commands
-