diff --git a/shared/vendored/.gitrepo b/shared/vendored/.gitrepo index 3f1a4b4..67d4d4b 100644 --- a/shared/vendored/.gitrepo +++ b/shared/vendored/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/nextstrain/shared branch = main - commit = 6e82a95b4e1e1a9b2ae42bb9a63c458a0a0ac7c0 - parent = d69e5f61ceddb2d39d57a5dcb7c74e3264b09aba + commit = 7a986c3c6c52c51d33dd412800b0bb694030f379 + parent = 89b1a481f13aa65c5e722efa3f6abe1cb000e0c4 method = merge cmdver = 0.4.9 diff --git a/shared/vendored/snakemake/remote_files.smk b/shared/vendored/snakemake/remote_files.smk index 5c0414d..a6b71e2 100644 --- a/shared/vendored/snakemake/remote_files.smk +++ b/shared/vendored/snakemake/remote_files.smk @@ -12,6 +12,7 @@ import socket from urllib.parse import urlparse from snakemake.io import get_flag_value, AnnotatedString from snakemake.logging import logger +from textwrap import dedent def is_online(host="8.8.8.8", port=53, timeout=3) -> bool: @@ -228,17 +229,14 @@ def _local_or_storage(wrapped: AnnotatedString) -> str | AnnotatedString: ) return wrapped - local = so.local_path() - if not local.exists(): - raise Exception( - f"Unable to find local cached file for {so.query!r}. " - "Please make sure you have run the workflow at least once with " - "internet connection and config.use_remote_files set to True to " - "to fetch and save the remote file locally.") + local = str(so.local_path()) + logger.warning(dedent(f"""\ + Attempting to use the local file for: - logger.warning( - f"Using the cached copy of {so.query} at {local} without revalidation. " - "Set config.use_remote_files to True if you want to force revalidation." - ) + remote: {so.query} + local: {local} - return str(local) + Set config.use_remote_files to True if you want to force revalidation of the remote file + or if you run into the MissingInputException with the local file. + """)) + return local