Extend the core profiler CLI with report-management flags.
()
| 31 | |
| 32 | |
| 33 | def build_script_parser(): |
| 34 | """Extend the core profiler CLI with report-management flags.""" |
| 35 | parser = build_arg_parser() |
| 36 | for action in list(parser._actions): |
| 37 | if action.dest == "format": |
| 38 | parser._remove_action(action) |
| 39 | break |
| 40 | |
| 41 | parser.add_argument( |
| 42 | "--output-dir", |
| 43 | type=Path, |
| 44 | default=Path("reports"), |
| 45 | help="Directory to store timestamped JSON/CSV reports", |
| 46 | ) |
| 47 | parser.add_argument( |
| 48 | "--json", |
| 49 | action="store_true", |
| 50 | default=True, |
| 51 | help="Emit a JSON report (default: True)", |
| 52 | ) |
| 53 | parser.add_argument( |
| 54 | "--csv", |
| 55 | action="store_true", |
| 56 | default=True, |
| 57 | help="Emit a CSV report (default: True)", |
| 58 | ) |
| 59 | return parser |
| 60 | |
| 61 | |
| 62 | def main() -> None: |
no test coverage detected