From 2836be25b12a578ac40886fcde54c6c57578ab10 Mon Sep 17 00:00:00 2001 From: Michael Roach Date: Mon, 16 Oct 2023 16:30:26 +1030 Subject: [PATCH] MAINT: Recent CLI tweaks and fixes --- .../{{cookiecutter.project_slug}}/__main__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__main__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__main__.py index 8bc1918..6fe6745 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__main__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__main__.py @@ -82,7 +82,6 @@ def common_options(func): "--snake-default", multiple=True, default=[ - "--rerun-incomplete", "--printshellcmds", "--nolock", "--show-failed-logs", @@ -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): @@ -147,17 +151,13 @@ 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 ) @@ -165,9 +165,9 @@ def run(**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()