()
| 1515 | |
| 1516 | |
| 1517 | def main(): |
| 1518 | parser = argparse.ArgumentParser(description="Summarize pystats results") |
| 1519 | |
| 1520 | parser.add_argument( |
| 1521 | "inputs", |
| 1522 | nargs="*", |
| 1523 | type=str, |
| 1524 | default=[DEFAULT_DIR], |
| 1525 | help=f""" |
| 1526 | Input source(s). |
| 1527 | For each entry, if a .json file, the output provided by --json-output from a previous run; |
| 1528 | if a directory, a directory containing raw pystats .txt files. |
| 1529 | If one source is provided, its stats are printed. |
| 1530 | If two sources are provided, comparative stats are printed. |
| 1531 | Default is {DEFAULT_DIR}. |
| 1532 | """, |
| 1533 | ) |
| 1534 | |
| 1535 | parser.add_argument( |
| 1536 | "--json-output", |
| 1537 | nargs="?", |
| 1538 | help="Output complete raw results to the given JSON file.", |
| 1539 | ) |
| 1540 | |
| 1541 | args = parser.parse_args() |
| 1542 | |
| 1543 | if len(args.inputs) > 2: |
| 1544 | raise ValueError("0-2 arguments may be provided.") |
| 1545 | |
| 1546 | output_stats(args.inputs, json_output=args.json_output) |
| 1547 | |
| 1548 | |
| 1549 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…