switch CLI to using click, handles printing colors

docs for click are good, would recommend skimming over them
https://click.palletsprojects.com/en/7.x/#documentation

everything is backwards-compatible with the previous
interface, the only minor changes were to the doctor cmd
which can now accept more than one item to run,
and the --skip-config-check to skip the config_ok
check if the user specifies to

added a test using click.testing.CliRunner (tests
the CLI in an isolated environment), though
additional tests which aren't testing the CLI
itself (parsing arguments or decorator behaviour)
can just call the functions themselves, as they
no longer accept a argparser.Namespace and instead
accept the direct arguments
This commit is contained in:
Sean Breckenridge 2021-04-03 21:38:21 -07:00
parent 5ef2775265
commit ff424e5e80
4 changed files with 153 additions and 131 deletions

View file

@ -20,3 +20,4 @@ from my.core.freezer import *
from my.core.stats import *
from my.core.query import *
from my.core.serialize import test_serialize_fallback
from my.core.__main__ import *