Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow default storage provider to be explicitly set to none #2746

Merged
merged 4 commits into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion snakemake/cli.py
Expand Up @@ -83,6 +83,13 @@ def inner(args):
return inner


def optional_str(arg):
if arg is None or arg == "none":
return None
else:
return arg


def parse_set_threads(args):
return parse_set_ints(
args,
Expand Down Expand Up @@ -1369,10 +1376,12 @@ def get_argument_parser(profiles=None):
)
group_behavior.add_argument(
"--default-storage-provider",
type=optional_str,
help="Specify default storage provider to be used for "
"all input and output files that don't yet specify "
"one (e.g. 's3'). See https://snakemake.github.io/snakemake-plugin-catalog "
"for available storage provider plugins.",
"for available storage provider plugins. If not set or explicitly 'none', no "
"default storage provider will be used.",
)
group_behavior.add_argument(
"--default-storage-prefix",
Expand Down
5 changes: 5 additions & 0 deletions tests/tests.py
Expand Up @@ -1990,6 +1990,11 @@ def test_resource_string_in_cli_or_profile():
)


@skip_on_windows # not platform dependent, only cli
def test_default_storage_provider_none():
run(dpath("test01"), shellcmd="snakemake --default-storage-provider none -c3")


def test_resource_tbdstring():
test_path = dpath("test_resource_tbdstring")
results_dir = Path(test_path) / "expected-results"
Expand Down