github
0 of 36 new or added lines in 2 files covered. (0.0%)
5875 of 7095 relevant lines covered (82.8%)
4.13 hits per line
NEW
|
import argparse |
× |
NEW
|
import sys |
× |
NEW
|
from subprocess import call |
× |
NEW
|
import os |
× |
NEW
|
import pkg_resources |
× |
NEW
|
from pvactools.tools.pvacview import * |
× |
7 |
|
|
NEW
|
def main(): |
× |
NEW
|
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
× |
NEW
|
subparsers = parser.add_subparsers() |
× |
11 |
|
|
12 |
#add subcommands
|
|
NEW
|
run_main_program_parser = subparsers.add_parser( |
× |
14 |
"run",
|
|
15 |
help="Run the pVACview R shiny application",
|
|
16 |
add_help=False
|
|
17 |
) |
|
NEW
|
run_main_program_parser.set_defaults(func=run) |
× |
19 |
|
|
NEW
|
args = parser.parse_known_args() |
× |
NEW
|
try:
|
× |
NEW
|
args[0].func.main(args[1]) |
× |
NEW
|
except AttributeError as e: |
× |
NEW
|
parser.print_help() |
× |
NEW
|
print("Error: No command specified")
|
× |
NEW
|
sys.exit(-1)
|
× |
27 |
|
|
28 |
|
|
NEW
|
if __name__ == '__main__': |
× |
NEW
|
main() |
× |