Skip to content

Commit

Permalink
updated argparser to use choices kwarg to list valid flows if invalid…
Browse files Browse the repository at this point in the history
… flow specified
  • Loading branch information
KeenanRileyFaulkner committed Nov 8, 2023
1 parent 169c8f7 commit 348b991
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/bfasster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib
import subprocess
import sys
from bfasst.ninja_flows.flow_utils import get_flows

from bfasst.ninja_flows.ninja_flow_manager import NinjaFlowManager
from bfasst.utils.general import clean_error_injections_and_comparisons
Expand Down Expand Up @@ -65,7 +66,9 @@ def parse_args(args):
parser.add_argument(
"--design", type=pathlib.Path, help="Design directory for single design flows"
)
parser.add_argument("--flow", type=str, help="Flow to run for single design flows")
parser.add_argument(
"--flow", type=str, choices=get_flows(), help="Flow to run for single design flows"
)
args = parser.parse_args(args)

if args.yaml and (args.design or args.flow):
Expand Down

0 comments on commit 348b991

Please sign in to comment.