Skip to content

Commit

Permalink
Merge pull request #84
Browse files Browse the repository at this point in the history
adds setup only option to CLI
  • Loading branch information
joaomcteixeira committed Sep 6, 2021
2 parents a3624ad + 11b6e19 commit 6aa0b69
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions src/haddock/clis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ def positive_int(n):
# The recipe to be used
parser.add_argument("recipe", type=argparse.FileType("r"),
help="The input recipe file name")

parser.add_argument(
"--setup",
help="Only setup the run, do not execute",
action="store_true",
)

# Version
parser.add_argument("-V", "-v", "--version", help="show version",
action="version",
Expand All @@ -51,18 +58,19 @@ def positive_int(n):
logging.error(se)
sys.exit()

try:
workflow = WorkflowManager(
workflow_params=params,
start=options.restart,
**other_params,
)
if not options.setup:
try:
workflow = WorkflowManager(
workflow_params=params,
start=options.restart,
**other_params,
)

# Main loop of execution
workflow.run()
# Main loop of execution
workflow.run()

except HaddockError as he:
logging.error(he)
except HaddockError as he:
logging.error(he)

# Finish
logging.info(get_adieu())
Expand Down

0 comments on commit 6aa0b69

Please sign in to comment.