Skip to content

Commit 44b1ce7

Browse files
authored
Merge pull request #49 from NNPDF/add_dry_option
add --dry option
2 parents a222615 + de9c6f1 commit 44b1ce7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/reportengine/app.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ def argparser(self):
182182
help="additional providers from which to "
183183
"load actions. Must be an importable specifiaction.")
184184

185+
parser.add_argument('--dry',
186+
help = "Perform only the runcard checks without executing the actions.",
187+
action='store_true')
188+
185189
parallel = parser.add_mutually_exclusive_group()
186190
parallel.add_argument('--parallel', action='store_true',
187191
help="execute actions in parallel")
@@ -356,10 +360,13 @@ def run(self):
356360
traceback_if_debug(e)
357361
sys.exit(1)
358362

359-
c.dump_lockfile()
360-
361-
log.info("All requirements processed and checked successfully. "
362-
"Executing actions.")
363+
if self.args['dry']:
364+
log.info("All requirements processed and checked successfully. ")
365+
return
366+
else:
367+
c.dump_lockfile()
368+
log.info("All requirements processed and checked successfully. "
369+
"Executing actions.")
363370

364371
if parallel:
365372
rb.execute_parallel()

0 commit comments

Comments
 (0)