Skip to content

Commit ca23d4f

Browse files
author
Dylan Huang
committed
save
1 parent 948961b commit ca23d4f

File tree

2 files changed

+481
-0
lines changed

2 files changed

+481
-0
lines changed

eval_protocol/cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,17 @@ def parse_args(args=None):
494494
# help="Run an evaluation using a Hydra configuration. All arguments after 'run' are passed to Hydra.",
495495
# )
496496

497+
# Hidden command: export-docs (for generating CLI reference documentation)
498+
export_docs_parser = subparsers.add_parser(
499+
"export-docs",
500+
help=argparse.SUPPRESS, # Hidden from help output
501+
)
502+
export_docs_parser.add_argument(
503+
"--output-dir",
504+
default="./docs/cli-reference",
505+
help="Directory to write markdown files to (default: ./docs/cli-reference)",
506+
)
507+
497508
# Use parse_known_args to allow Hydra to handle its own arguments
498509
return parser.parse_known_args(args)
499510

@@ -623,6 +634,10 @@ def _extract_flag_value(argv_list, flag_name):
623634
from .cli_commands.local_test import local_test_command
624635

625636
return local_test_command(args)
637+
elif args.command == "export-docs":
638+
from .cli_commands.export_docs import export_docs_command
639+
640+
return export_docs_command(args)
626641
# elif args.command == "run":
627642
# # For the 'run' command, Hydra takes over argument parsing.
628643
#

0 commit comments

Comments
 (0)