Ejemplo n.º 1
0
def try_command(*argv):
    try:
        argcmdr.main(cli.Triage, argv=('--tb', ) + argv)
    except SystemExit as exc:
        raise AssertionError(exc)
Ejemplo n.º 2
0
def execute():
    main(Triage)
Ejemplo n.º 3
0
    def upgrade(self, args):
        """Upgrade triage results database"""
        upgrade_db(args.dbfile)

    @cmdmethod(
        "configversion",
        choices=REVISION_MAPPING.keys(),
        help="config version of last experiment you ran",
    )
    def stamp(self, args):
        """Instruct the triage results database to mark itself as updated to a
        known version without doing any upgrading.

        Use this if the database was created without an 'alembic_version' table.
        Uses the config version of your experiment to infer what database version is suitable.
        """
        revision = REVISION_MAPPING[args.configversion]
        print(
            f"Based on config version {args.configversion} "
            f"we think your results schema is version {revision} and are upgrading to it"
        )
        stamp_db(revision, args.dbfile)


def execute():
    main(Triage)


if __name__ == "__main__":
    main(Triage)
Ejemplo n.º 4
0
def main():
    argcmdr.main(Report)
Ejemplo n.º 5
0
def execute():
    """launch the netml cli"""
    argcmdr.main(Main)
Ejemplo n.º 6
0
 def try_execute(self, *argv):
     argcmdr.main(cli.Main, argv=map(str, argv))