Skip to content

Commit

Permalink
Merge pull request #337 from byuccl/add_flow_choices
Browse files Browse the repository at this point in the history
updated argparser to use choices kwarg to list valid flows if invalid flow specified
  • Loading branch information
KeenanRileyFaulkner authored Nov 9, 2023
2 parents 6ee3269 + 348b991 commit edeb863
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 edeb863

Please sign in to comment.