Skip to content

Commit

Permalink
MAINT: Recent CLI tweaks and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
beardymcjohnface committed Oct 16, 2023
1 parent 2d73da4 commit 2836be2
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def common_options(func):
"--snake-default",
multiple=True,
default=[
"--rerun-incomplete",
"--printshellcmds",
"--nolock",
"--show-failed-logs",
Expand All @@ -96,6 +95,11 @@ def common_options(func):
callback=default_to_output,
hidden=True,
),
click.option(
"--system-config",
default=snake_base(os.path.join("config", "config.yaml")),
hidden=True,
),
click.argument("snake_args", nargs=-1),
]
for option in reversed(options):
Expand Down Expand Up @@ -147,27 +151,23 @@ def run(**kwargs):
"""Run {{cookiecutter.project_name}}"""
# Config to add or update in configfile
merge_config = {
"input": kwargs["_input"],
"output": kwargs["output"],
"profile": kwargs["profile"],
"log": kwargs["log"]
"args": kwargs
}

# run!
run_snakemake(
# Full path to Snakefile
snakefile_path=snake_base(os.path.join("workflow", "Snakefile")),
system_config=snake_base(os.path.join("config", "config.yaml")),
merge_config=merge_config,
**kwargs
)


@click.command()
@common_options
def config(configfile, **kwargs):
def config(**kwargs):
"""Copy the system default config file"""
copy_config(configfile, system_config=snake_base(os.path.join("config", "config.yaml")))
copy_config(kwargs["configfile"])


@click.command()
Expand Down

0 comments on commit 2836be2

Please sign in to comment.