Skip to content

Commit

Permalink
mgc: add dry-run mode to submit to viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Jul 15, 2015
1 parent e7fb477 commit 0519db7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/mgc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ def info(args):
print '{}: {}'.format(k, ' '.join(v))

def submit(args):
check_pymatgen()
submit_mpfile(args.mpfile, target=mpr)
if args.dry:
viewer(args)
else:
check_pymatgen()
submit_mpfile(args.mpfile, target=mpr)

def delete(args):
check_pymatgen()
Expand Down Expand Up @@ -116,6 +119,8 @@ def main():
'submit', help="""submit a MPFile containing the contribution data"""
)
parser_submit.add_argument('mpfile', type=str, help='MPFile to submit')
parser_submit.add_argument('--dry', help='dry-run: use viewer instead of MP',
action='store_true')
parser_submit.set_defaults(func=submit)

parser_delete = subparsers.add_parser(
Expand Down

0 comments on commit 0519db7

Please sign in to comment.