Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared/vendored/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 10 additions & 12 deletions shared/vendored/snakemake/remote_files.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Loading