Skip to content

Commit

Permalink
cli: remove auto-yes
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Jun 26, 2023
1 parent 063423f commit 74e085c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions emmet-cli/emmet/cli/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ def wrapper(*args, **kwargs):
logger.debug(f"{track_dir} created")

bb = ctx.grand_parent.params["bb"]
yes = ctx.grand_parent.params["yes"]
if bb:
if not yes:
click.confirm("Did you run `module unload esslurm`?", abort=True)
subdir = directory.rsplit(os.sep, 1)[1]
stage_in = f"#DW stage_in source={directory} "
stage_in += f"destination=$DW_JOB_STRIPED/{subdir} type=directory"
Expand All @@ -150,8 +147,6 @@ def wrapper(*args, **kwargs):
"time": "48:00:00",
}
else:
if not yes:
click.confirm("Did you run `module load esslurm`?", abort=True)
slurm_kwargs = {
"qos": "xfer",
"time": "48:00:00",
Expand Down
3 changes: 1 addition & 2 deletions emmet-cli/emmet/cli/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ def opt_prompt():
help="Number of jobs (for walltime > 48h).",
)
@click.option("--bb", is_flag=True, help="Use burst buffer.")
@click.option("--yes", is_flag=True, help="Automatic yes to all prompts.")
@click.option("--no-dupe-check", is_flag=True, help="Skip duplicate check(s).")
@click.option("--verbose", is_flag=True, help="Show debug messages.")
@click.version_option()
def emmet(spec_or_dbfile, run, issue, sbatch, ntries, bb, yes, no_dupe_check, verbose):
def emmet(spec_or_dbfile, run, issue, sbatch, ntries, bb, no_dupe_check, verbose):
"""Command line interface for emmet"""
logger.setLevel(logging.DEBUG if verbose else logging.INFO)
logging.getLogger("github3").setLevel(logging.WARNING)
Expand Down
2 changes: 0 additions & 2 deletions emmet-cli/emmet/cli/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def backups(ctx, clean):
rootdir_pattern = os.path.join(rootdir, ctx.parent.params["pattern"])
comment_txt = [f"Backup {gen.value} launchers in `{rootdir_pattern}`:\n"]
ctx.parent.parent.params["sbatch"] = True
ctx.parent.parent.params["yes"] = True
run = ctx.parent.parent.params["run"]
prefix = ctx.parent.params["pattern"] = "block_*"

Expand Down Expand Up @@ -505,7 +504,6 @@ def parsers(ctx, task_ids):
remaining = group_strings_by_prefix(remaining_vaspdirs, len_prefix)

ctx.parent.parent.params["sbatch"] = True
ctx.parent.parent.params["yes"] = True
rootdir_pattern = os.path.join(directory, ctx.parent.params["pattern"])
comment_txt = [f"Parse {gen.value} launchers in `{rootdir_pattern}`:\n"]

Expand Down

0 comments on commit 74e085c

Please sign in to comment.