From db646fc5053bf9a1db0e14e1adc22e33336123dc Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 22 Jan 2026 12:28:04 -0800 Subject: [PATCH 01/11] add boilerplate --- src/openfecli/commands/test.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index d659ed802..29e3409cc 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -1,16 +1,28 @@ import os +import pathlib import sys import click +import pooch import pytest from openfecli import OFECommandPlugin from openfecli.utils import write +def retrieve_test_data(): + pass + + @click.command("test", short_help="Run the OpenFE test suite") @click.option('--long', is_flag=True, default=False, help="Run additional tests (takes much longer)") # fmt: skip -def test(long): +@click.option( + "--download-only", + is_flag=True, + default=False, + help="Download data to the cache (this is helpful if internet is flaky).", +) +def test(long, download_only): """ Run the OpenFE test suite. This first checks that OpenFE is correctly imported, and then runs the main test suite, which should take several @@ -22,6 +34,9 @@ def test(long): terminals, these show as green or yellow. Warnings are not a concern. However, You should not see anything that fails or errors (red). """ + if download_only: + retrieve_test_data() + sys.exit() try: old_env = dict(os.environ) os.environ["OFE_SLOW_TESTS"] = str(long) From af4eb690be409c425a52c31652272c9373e54d1f Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 22 Jan 2026 12:34:13 -0800 Subject: [PATCH 02/11] define pooch cache at top level --- src/openfe/tests/conftest.py | 3 +++ .../tests/protocols/restraints/test_geometry_boresch.py | 3 +-- .../tests/protocols/restraints/test_geometry_boresch_host.py | 3 +-- src/openfe/tests/protocols/restraints/test_geometry_utils.py | 3 +-- src/openfe/tests/protocols/test_openmmutils.py | 5 ++--- src/openfecli/tests/commands/test_gather.py | 3 +-- src/openfecli/tests/conftest.py | 4 ++++ 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/openfe/tests/conftest.py b/src/openfe/tests/conftest.py index f2358757f..4a75fc03b 100644 --- a/src/openfe/tests/conftest.py +++ b/src/openfe/tests/conftest.py @@ -12,6 +12,7 @@ import numpy as np import openmm import pandas as pd +import pooch import pytest from gufe import AtomMapper, LigandAtomMapping, ProteinComponent, SmallMoleculeComponent from openff.toolkit import ForceField @@ -26,6 +27,8 @@ from openfe.protocols.openmm_utils.serialization import deserialize from openfe.tests.protocols.openmm_rfe.helpers import make_htf +POOCH_CACHE = pooch.os_cache("openfe") + class SlowTests: """Plugin for handling fixtures that skips slow tests diff --git a/src/openfe/tests/protocols/restraints/test_geometry_boresch.py b/src/openfe/tests/protocols/restraints/test_geometry_boresch.py index b533db1ac..c9a350b43 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_boresch.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_boresch.py @@ -14,7 +14,7 @@ find_boresch_restraint, ) -from ...conftest import HAS_INTERNET +from ...conftest import HAS_INTERNET, POOCH_CACHE @pytest.fixture() @@ -235,7 +235,6 @@ def test_get_boresch_restraint_dssp(eg5_protein_ligand_universe, eg5_ligands): assert -0.02396901 == pytest.approx(restraint_geometry.phi_C0.to("radians").m) -POOCH_CACHE = pooch.os_cache("openfe") zenodo_restraint_data = pooch.create( path=POOCH_CACHE, base_url="doi:10.5281/zenodo.15212342", diff --git a/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py b/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py index 78815a5e9..0efad9115 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py @@ -25,9 +25,8 @@ is_collinear, ) -from ...conftest import HAS_INTERNET +from ...conftest import HAS_INTERNET, POOCH_CACHE -POOCH_CACHE = pooch.os_cache("openfe") zenodo_restraint_data = pooch.create( path=POOCH_CACHE, base_url="doi:10.5281/zenodo.15212342", diff --git a/src/openfe/tests/protocols/restraints/test_geometry_utils.py b/src/openfe/tests/protocols/restraints/test_geometry_utils.py index c7b3156d4..e83578ed7 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_utils.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_utils.py @@ -32,7 +32,7 @@ stable_secondary_structure_selection, ) -from ...conftest import HAS_INTERNET +from ...conftest import HAS_INTERNET, POOCH_CACHE @pytest.fixture(scope="module") @@ -49,7 +49,6 @@ def eg5_protein_ligand_universe(eg5_protein_pdb, eg5_ligands): return mda.Merge(protein.atoms, lig.atoms) -POOCH_CACHE = pooch.os_cache("openfe") zenodo_restraint_data = pooch.create( path=POOCH_CACHE, base_url="doi:10.5281/zenodo.15212342", diff --git a/src/openfe/tests/protocols/test_openmmutils.py b/src/openfe/tests/protocols/test_openmmutils.py index 8251970e2..7db0b2762 100644 --- a/src/openfe/tests/protocols/test_openmmutils.py +++ b/src/openfe/tests/protocols/test_openmmutils.py @@ -40,7 +40,7 @@ HAS_NAGL, HAS_OPENEYE, ) -from openfe.tests.conftest import HAS_INTERNET +from openfe.tests.conftest import HAS_INTERNET, POOCH_CACHE @pytest.mark.parametrize( @@ -1033,7 +1033,6 @@ def test_openeye_import_error(self, monkeypatch, uncharged_mol): ) -POOCH_CACHE = pooch.os_cache("openfe") RFE_OUTPUT = pooch.create( path=POOCH_CACHE, base_url="doi:10.5281/zenodo.15375081", @@ -1049,7 +1048,7 @@ def test_openeye_import_error(self, monkeypatch, uncharged_mol): @pytest.fixture def simulation_nc(): - return RFE_OUTPUT.fetch("simulation.nc") + return pooch.retrieve(url="simulation.nc", path=POOCH_CACHE) @pytest.mark.slow diff --git a/src/openfecli/tests/commands/test_gather.py b/src/openfecli/tests/commands/test_gather.py index 1cae95aa8..377a32a6f 100644 --- a/src/openfecli/tests/commands/test_gather.py +++ b/src/openfecli/tests/commands/test_gather.py @@ -18,10 +18,9 @@ from openfecli.commands.gather_abfe import gather_abfe from openfecli.commands.gather_septop import gather_septop -from ..conftest import HAS_INTERNET +from ..conftest import HAS_INTERNET, POOCH_CACHE from ..utils import assert_click_success -POOCH_CACHE = pooch.os_cache("openfe") ZENODO_RBFE_DATA = pooch.create( path=POOCH_CACHE, base_url="doi:10.5281/zenodo.15042470", diff --git a/src/openfecli/tests/conftest.py b/src/openfecli/tests/conftest.py index 889f6f278..8aafe0415 100644 --- a/src/openfecli/tests/conftest.py +++ b/src/openfecli/tests/conftest.py @@ -1,9 +1,13 @@ import urllib.error import urllib.request +import pooch + try: urllib.request.urlopen("https://www.google.com") except urllib.error.URLError: # -no-cov- HAS_INTERNET = False else: HAS_INTERNET = True + +POOCH_CACHE = pooch.os_cache("openfe") From 0d8a21f316f5474438796f80d57043967d64488b Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Fri, 23 Jan 2026 07:41:30 -0800 Subject: [PATCH 03/11] try downloading one file --- src/openfecli/commands/test.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 29e3409cc..bb9680dd0 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -10,8 +10,16 @@ from openfecli.utils import write -def retrieve_test_data(): - pass +def retrieve_all_test_data(path): + downloader = pooch.DOIDownloader(progressbar=True) + pooch.retrieve( + url="doi:10.5281/zenodo.15200083/cmet_results.tar.gz", + known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", + fname="cmet_results.tar.gz", + processor=pooch.Untar(), + downloader=downloader, + path=path, + ) @click.command("test", short_help="Run the OpenFE test suite") @@ -34,9 +42,11 @@ def test(long, download_only): terminals, these show as green or yellow. Warnings are not a concern. However, You should not see anything that fails or errors (red). """ + if download_only: - retrieve_test_data() - sys.exit() + retrieve_all_test_data(".") + sys.exit(0) + try: old_env = dict(os.environ) os.environ["OFE_SLOW_TESTS"] = str(long) From 8ae413f078688bef8e04cd2333d0da8a91455988 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 08:20:38 -0800 Subject: [PATCH 04/11] put pooch cache in utils --- src/openfecli/tests/commands/test_gather.py | 3 ++- src/openfecli/tests/conftest.py | 2 -- src/openfecli/utils.py | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/openfecli/tests/commands/test_gather.py b/src/openfecli/tests/commands/test_gather.py index 377a32a6f..28ad7023c 100644 --- a/src/openfecli/tests/commands/test_gather.py +++ b/src/openfecli/tests/commands/test_gather.py @@ -17,8 +17,9 @@ ) from openfecli.commands.gather_abfe import gather_abfe from openfecli.commands.gather_septop import gather_septop +from openfecli.utils import POOCH_CACHE -from ..conftest import HAS_INTERNET, POOCH_CACHE +from ..conftest import HAS_INTERNET from ..utils import assert_click_success ZENODO_RBFE_DATA = pooch.create( diff --git a/src/openfecli/tests/conftest.py b/src/openfecli/tests/conftest.py index 8aafe0415..a24f0e032 100644 --- a/src/openfecli/tests/conftest.py +++ b/src/openfecli/tests/conftest.py @@ -9,5 +9,3 @@ HAS_INTERNET = False else: HAS_INTERNET = True - -POOCH_CACHE = pooch.os_cache("openfe") diff --git a/src/openfecli/utils.py b/src/openfecli/utils.py index 6e7570c83..0e333b3d8 100644 --- a/src/openfecli/utils.py +++ b/src/openfecli/utils.py @@ -8,6 +8,9 @@ from typing import Callable, Optional import click +import pooch + +POOCH_CACHE = pooch.os_cache("openfe") def import_thing(import_string: str): From b942fa80c0cc13cb63122542548fc1e20a3a3641 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 08:26:51 -0800 Subject: [PATCH 05/11] use dict --- src/openfecli/commands/test.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index bb9680dd0..ab951c87a 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -12,14 +12,23 @@ def retrieve_all_test_data(path): downloader = pooch.DOIDownloader(progressbar=True) - pooch.retrieve( - url="doi:10.5281/zenodo.15200083/cmet_results.tar.gz", - known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", + + zenodo_cmet_data = dict( + base_url="doi:10.5281/zenodo.15200083/", fname="cmet_results.tar.gz", + known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", processor=pooch.Untar(), + ) + # ZENODO_CMET_DATA + pooch.retrieve( + url=zenodo_cmet_data["base_url"] + zenodo_cmet_data["fname"], + known_hash=zenodo_cmet_data["known_hash"], + fname=zenodo_cmet_data["fname"], + processor=zenodo_cmet_data["processor"], downloader=downloader, path=path, ) + # ZENODO_RBFE_DATA @click.command("test", short_help="Run the OpenFE test suite") From 999138ee3b8f6ce6b1eb81a24fe00be988494163 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 08:49:09 -0800 Subject: [PATCH 06/11] add all cli data --- src/openfecli/commands/test.py | 57 +++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index ab951c87a..33775ebfd 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -7,7 +7,7 @@ import pytest from openfecli import OFECommandPlugin -from openfecli.utils import write +from openfecli.utils import POOCH_CACHE, write def retrieve_all_test_data(path): @@ -17,18 +17,51 @@ def retrieve_all_test_data(path): base_url="doi:10.5281/zenodo.15200083/", fname="cmet_results.tar.gz", known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", - processor=pooch.Untar(), ) - # ZENODO_CMET_DATA - pooch.retrieve( - url=zenodo_cmet_data["base_url"] + zenodo_cmet_data["fname"], - known_hash=zenodo_cmet_data["known_hash"], - fname=zenodo_cmet_data["fname"], - processor=zenodo_cmet_data["processor"], - downloader=downloader, - path=path, + zenodo_rbfe_serial_data = dict( + base_url="doi:10.5281/zenodo.15042470/", + fname="rbfe_results_serial_repeats.tar.gz", + known_hash="md5:2355ecc80e03242a4c7fcbf20cb45487", ) - # ZENODO_RBFE_DATA + zenodo_rbfe_parallel_data = dict( + base_url="doi:10.5281/zenodo.15042470/", + fname="rbfe_results_parallel_repeats.tar.gz", + known_hash="md5:ff7313e14eb6f2940c6ffd50f2192181", + ) + zenodo_abfe_data = dict( + base_url="doi:10.5281/zenodo.17348229/", + fname="abfe_results.zip", + known_hash="md5:547f896e867cce61979d75b7e082f6ba", + ) + zenodo_septop_data = dict( + base_url="doi:10.5281/zenodo.17435569/", + fname="septop_results.zip", + known_hash="md5:2cfa18da59a20228f5c75a1de6ec879e", + ) + + def _infer_processor(fname: str): + if fname.endswith("tar.gz"): + return pooch.Untar() + elif fname.endswith("zip"): + return pooch.Unzip() + else: + return None + + for d in [ + zenodo_cmet_data, + zenodo_rbfe_serial_data, + zenodo_rbfe_parallel_data, + zenodo_abfe_data, + zenodo_septop_data, + ]: + pooch.retrieve( + url=d["base_url"] + d["fname"], + known_hash=d["known_hash"], + fname=d["fname"], + processor=_infer_processor(d["fname"]), + downloader=downloader, + path=path, + ) @click.command("test", short_help="Run the OpenFE test suite") @@ -53,7 +86,7 @@ def test(long, download_only): """ if download_only: - retrieve_all_test_data(".") + retrieve_all_test_data(POOCH_CACHE) sys.exit(0) try: From 256e5a5a2a73edfed88d6596f28dd1630e4ef344 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 10:09:38 -0800 Subject: [PATCH 07/11] keep registry data all in one place --- src/openfecli/commands/test.py | 58 +------------- src/openfecli/data/__init__.py | 0 src/openfecli/data/_downloader.py | 33 ++++++++ src/openfecli/data/_registry.py | 38 +++++++++ src/openfecli/tests/commands/test_gather.py | 85 +++++++++++++-------- src/openfecli/utils.py | 3 - 6 files changed, 126 insertions(+), 91 deletions(-) create mode 100644 src/openfecli/data/__init__.py create mode 100644 src/openfecli/data/_downloader.py create mode 100644 src/openfecli/data/_registry.py diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 33775ebfd..8acb3918f 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -1,5 +1,4 @@ import os -import pathlib import sys import click @@ -7,63 +6,10 @@ import pytest from openfecli import OFECommandPlugin +from openfecli.data import _downloader from openfecli.utils import POOCH_CACHE, write -def retrieve_all_test_data(path): - downloader = pooch.DOIDownloader(progressbar=True) - - zenodo_cmet_data = dict( - base_url="doi:10.5281/zenodo.15200083/", - fname="cmet_results.tar.gz", - known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", - ) - zenodo_rbfe_serial_data = dict( - base_url="doi:10.5281/zenodo.15042470/", - fname="rbfe_results_serial_repeats.tar.gz", - known_hash="md5:2355ecc80e03242a4c7fcbf20cb45487", - ) - zenodo_rbfe_parallel_data = dict( - base_url="doi:10.5281/zenodo.15042470/", - fname="rbfe_results_parallel_repeats.tar.gz", - known_hash="md5:ff7313e14eb6f2940c6ffd50f2192181", - ) - zenodo_abfe_data = dict( - base_url="doi:10.5281/zenodo.17348229/", - fname="abfe_results.zip", - known_hash="md5:547f896e867cce61979d75b7e082f6ba", - ) - zenodo_septop_data = dict( - base_url="doi:10.5281/zenodo.17435569/", - fname="septop_results.zip", - known_hash="md5:2cfa18da59a20228f5c75a1de6ec879e", - ) - - def _infer_processor(fname: str): - if fname.endswith("tar.gz"): - return pooch.Untar() - elif fname.endswith("zip"): - return pooch.Unzip() - else: - return None - - for d in [ - zenodo_cmet_data, - zenodo_rbfe_serial_data, - zenodo_rbfe_parallel_data, - zenodo_abfe_data, - zenodo_septop_data, - ]: - pooch.retrieve( - url=d["base_url"] + d["fname"], - known_hash=d["known_hash"], - fname=d["fname"], - processor=_infer_processor(d["fname"]), - downloader=downloader, - path=path, - ) - - @click.command("test", short_help="Run the OpenFE test suite") @click.option('--long', is_flag=True, default=False, help="Run additional tests (takes much longer)") # fmt: skip @click.option( @@ -86,7 +32,7 @@ def test(long, download_only): """ if download_only: - retrieve_all_test_data(POOCH_CACHE) + _downloader.retrieve_all_test_data(POOCH_CACHE) sys.exit(0) try: diff --git a/src/openfecli/data/__init__.py b/src/openfecli/data/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/openfecli/data/_downloader.py b/src/openfecli/data/_downloader.py new file mode 100644 index 000000000..a54447b8d --- /dev/null +++ b/src/openfecli/data/_downloader.py @@ -0,0 +1,33 @@ +import pooch + +from ._registry import zenodo_data_registry + + +def retrieve_all_test_data(path: str) -> None: + """Helper function for pulling all test data up-front. + + Parameters + ---------- + path : str + path to store the data - usually a pooch.os_cache instance. + + """ + downloader = pooch.DOIDownloader(progressbar=True) + + def _infer_processor(fname: str): + if fname.endswith("tar.gz"): + return pooch.Untar() + elif fname.endswith("zip"): + return pooch.Unzip() + else: + return None + + for d in zenodo_data_registry: + pooch.retrieve( + url=d["base_url"] + d["fname"], + known_hash=d["known_hash"], + fname=d["fname"], + processor=_infer_processor(d["fname"]), + downloader=downloader, + path=path, + ) diff --git a/src/openfecli/data/_registry.py b/src/openfecli/data/_registry.py new file mode 100644 index 000000000..f9b811f73 --- /dev/null +++ b/src/openfecli/data/_registry.py @@ -0,0 +1,38 @@ +"""Registry for all remotely-stored CLI test data.""" + +import pooch + +POOCH_CACHE = pooch.os_cache("openfe") +zenodo_cmet_data = dict( + base_url="doi:10.5281/zenodo.15200083/", + fname="cmet_results.tar.gz", + known_hash="md5:a4ca67a907f744c696b09660dc1eb8ec", +) +zenodo_rbfe_serial_data = dict( + base_url="doi:10.5281/zenodo.15042470/", + fname="rbfe_results_serial_repeats.tar.gz", + known_hash="md5:2355ecc80e03242a4c7fcbf20cb45487", +) +zenodo_rbfe_parallel_data = dict( + base_url="doi:10.5281/zenodo.15042470/", + fname="rbfe_results_parallel_repeats.tar.gz", + known_hash="md5:ff7313e14eb6f2940c6ffd50f2192181", +) +zenodo_abfe_data = dict( + base_url="doi:10.5281/zenodo.17348229/", + fname="abfe_results.zip", + known_hash="md5:547f896e867cce61979d75b7e082f6ba", +) +zenodo_septop_data = dict( + base_url="doi:10.5281/zenodo.17435569/", + fname="septop_results.zip", + known_hash="md5:2cfa18da59a20228f5c75a1de6ec879e", +) + +zenodo_data_registry = [ + zenodo_cmet_data, + zenodo_rbfe_serial_data, + zenodo_rbfe_parallel_data, + zenodo_abfe_data, + zenodo_septop_data, +] diff --git a/src/openfecli/tests/commands/test_gather.py b/src/openfecli/tests/commands/test_gather.py index 28ad7023c..9584482a9 100644 --- a/src/openfecli/tests/commands/test_gather.py +++ b/src/openfecli/tests/commands/test_gather.py @@ -17,23 +17,34 @@ ) from openfecli.commands.gather_abfe import gather_abfe from openfecli.commands.gather_septop import gather_septop -from openfecli.utils import POOCH_CACHE +from openfecli.data._registry import ( + POOCH_CACHE, + zenodo_abfe_data, + zenodo_cmet_data, + zenodo_rbfe_parallel_data, + zenodo_rbfe_serial_data, + zenodo_septop_data, +) from ..conftest import HAS_INTERNET from ..utils import assert_click_success -ZENODO_RBFE_DATA = pooch.create( +pooch_rbfe_serial = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15042470", - registry={ - "rbfe_results_serial_repeats.tar.gz": "md5:2355ecc80e03242a4c7fcbf20cb45487", - "rbfe_results_parallel_repeats.tar.gz": "md5:ff7313e14eb6f2940c6ffd50f2192181", - }, + base_url=zenodo_rbfe_serial_data["base_url"], + registry={zenodo_rbfe_serial_data["fname"]: zenodo_rbfe_serial_data["known_hash"]}, ) -ZENODO_CMET_DATA = pooch.create( + +pooch_rbfe_parallel = pooch.create( + path=POOCH_CACHE, + base_url=zenodo_rbfe_parallel_data["base_url"], + registry={zenodo_rbfe_parallel_data["fname"]: zenodo_rbfe_parallel_data["known_hash"]}, +) + +pooch_cmet = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15200083", - registry={"cmet_results.tar.gz": "md5:a4ca67a907f744c696b09660dc1eb8ec"}, + base_url=zenodo_cmet_data["base_url"], + registry={zenodo_cmet_data["fname"]: zenodo_cmet_data["known_hash"]}, ) @@ -226,19 +237,9 @@ def test_no_results_found(): """ -@pytest.fixture -def rbfe_result_dir() -> pathlib.Path: - def _rbfe_result_dir(dataset) -> str: - ZENODO_RBFE_DATA.fetch(f"{dataset}.tar.gz", processor=pooch.Untar()) - cache_dir = pathlib.Path(POOCH_CACHE) / f"{dataset}.tar.gz.untar/{dataset}/" - return cache_dir - - return _rbfe_result_dir - - @pytest.fixture def cmet_result_dir() -> pathlib.Path: - ZENODO_CMET_DATA.fetch("cmet_results.tar.gz", processor=pooch.Untar()) + pooch_cmet.fetch("cmet_results.tar.gz", processor=pooch.Untar()) result_dir = pathlib.Path(POOCH_CACHE) / "cmet_results.tar.gz.untar/cmet_results/" return result_dir @@ -347,14 +348,34 @@ def test_write_to_file(self, cmet_result_dir): assert pathlib.Path(fname).is_file() +@pytest.fixture +def rbfe_results_serial_dir() -> pathlib.Path: + pooch_rbfe_serial.fetch("rbfe_results_serial_repeats.tar.gz", processor=pooch.Untar()) + result_dir = ( + pathlib.Path(POOCH_CACHE) + / "rbfe_results_serial_repeats.tar.gz.untar/rbfe_results_serial_repeats/" + ) + return result_dir + + +@pytest.fixture +def rbfe_results_parallel_dir() -> pathlib.Path: + pooch_rbfe_parallel.fetch("rbfe_results_parallel_repeats.tar.gz", processor=pooch.Untar()) + result_dir = ( + pathlib.Path(POOCH_CACHE) + / "rbfe_results_parallel_repeats.tar.gz.untar/rbfe_results_parallel_repeats/" + ) + return result_dir + + @pytest.mark.skipif( not os.path.exists(POOCH_CACHE) and not HAS_INTERNET, reason="Internet seems to be unavailable and test data is not cached locally.", ) -@pytest.mark.parametrize("dataset", ["rbfe_results_serial_repeats", "rbfe_results_parallel_repeats"]) # fmt: skip +@pytest.mark.parametrize("dataset", ["rbfe_results_serial_dir", "rbfe_results_parallel_dir"]) # fmt: skip @pytest.mark.parametrize("report", ["", "dg", "ddg", "raw"]) @pytest.mark.parametrize("input_mode", ["directory", "filepaths"]) -def test_rbfe_gather(rbfe_result_dir, dataset, report, input_mode): +def test_rbfe_gather(request, dataset, report, input_mode): expected = { "": _RBFE_EXPECTED_DG, "dg": _RBFE_EXPECTED_DG, @@ -368,7 +389,7 @@ def test_rbfe_gather(rbfe_result_dir, dataset, report, input_mode): else: args = [] - results = rbfe_result_dir(dataset) + results = request.getfixturevalue(dataset) if input_mode == "directory": results = [str(results)] elif input_mode == "filepaths": @@ -383,11 +404,11 @@ def test_rbfe_gather(rbfe_result_dir, dataset, report, input_mode): assert set(expected.split(b"\n")) == actual_lines -def test_rbfe_gather_single_repeats_dg_error(rbfe_result_dir): +def test_rbfe_gather_single_repeats_dg_error(rbfe_results_parallel_dir): """A single repeat is insufficient for a dg calculation - should fail cleanly.""" runner = CliRunner() - results = rbfe_result_dir("rbfe_results_parallel_repeats") + results = rbfe_results_parallel_dir args = ["report", "dg"] cli_result = runner.invoke(gather, [f"{results}/replicate_0"] + args + ["--tsv"]) assert cli_result.exit_code == 1 @@ -399,9 +420,9 @@ def test_rbfe_gather_single_repeats_dg_error(rbfe_result_dir): ) class TestRBFEGatherFailedEdges: @pytest.fixture() - def results_paths_serial_missing_legs(self, rbfe_result_dir) -> str: + def results_paths_serial_missing_legs(self, rbfe_results_serial_dir) -> str: """Example output data, with replicates run in serial and two missing results JSONs.""" - result_dir = rbfe_result_dir("rbfe_results_serial_repeats") + result_dir = rbfe_results_serial_dir results = glob.glob(f"{result_dir}/*", recursive=True) files_to_skip = [ @@ -442,13 +463,13 @@ def test_allow_partial_msg_not_printed(self, results_paths_serial_missing_legs: ZENODO_ABFE_DATA = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.17348229", - registry={"abfe_results.zip": "md5:547f896e867cce61979d75b7e082f6ba"}, + base_url=zenodo_abfe_data["base_url"], + registry={zenodo_abfe_data["fname"]: zenodo_abfe_data["known_hash"]}, ) ZENODO_SEPTOP_DATA = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.17435569", - registry={"septop_results.zip": "md5:2cfa18da59a20228f5c75a1de6ec879e"}, + base_url=zenodo_septop_data["base_url"], + registry={zenodo_septop_data["fname"]: zenodo_septop_data["known_hash"]}, ) diff --git a/src/openfecli/utils.py b/src/openfecli/utils.py index 0e333b3d8..6e7570c83 100644 --- a/src/openfecli/utils.py +++ b/src/openfecli/utils.py @@ -8,9 +8,6 @@ from typing import Callable, Optional import click -import pooch - -POOCH_CACHE = pooch.os_cache("openfe") def import_thing(import_string: str): From d1c935cdd30d3492ad79e894ae18f45e93d197d1 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 10:15:43 -0800 Subject: [PATCH 08/11] move downloader to openfe from openfecli --- src/openfe/data/__init__.py | 0 src/{openfecli => openfe}/data/_downloader.py | 0 src/openfe/data/_registry.py | 0 src/openfecli/commands/test.py | 3 +-- 4 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 src/openfe/data/__init__.py rename src/{openfecli => openfe}/data/_downloader.py (100%) create mode 100644 src/openfe/data/_registry.py diff --git a/src/openfe/data/__init__.py b/src/openfe/data/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/openfecli/data/_downloader.py b/src/openfe/data/_downloader.py similarity index 100% rename from src/openfecli/data/_downloader.py rename to src/openfe/data/_downloader.py diff --git a/src/openfe/data/_registry.py b/src/openfe/data/_registry.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 8acb3918f..4260a55be 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -2,11 +2,10 @@ import sys import click -import pooch import pytest +from openfe.data import _downloader from openfecli import OFECommandPlugin -from openfecli.data import _downloader from openfecli.utils import POOCH_CACHE, write From 56d0e3224ad221b25a8bd498d6fe43478b12b549 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 28 Jan 2026 11:56:58 -0800 Subject: [PATCH 09/11] add both registries to test --- src/openfe/data/_downloader.py | 4 ++-- src/openfe/data/_registry.py | 24 +++++++++++++++++++ src/openfe/tests/conftest.py | 4 +--- .../restraints/test_geometry_boresch.py | 13 ++++++---- .../restraints/test_geometry_boresch_host.py | 13 +++++----- .../restraints/test_geometry_utils.py | 14 +++++------ .../restraints/test_omm_restraints.py | 17 ++++++++----- .../tests/protocols/test_openmmutils.py | 22 ++++++----------- src/openfecli/commands/test.py | 9 +++++-- 9 files changed, 73 insertions(+), 47 deletions(-) diff --git a/src/openfe/data/_downloader.py b/src/openfe/data/_downloader.py index a54447b8d..135321ce2 100644 --- a/src/openfe/data/_downloader.py +++ b/src/openfe/data/_downloader.py @@ -3,7 +3,7 @@ from ._registry import zenodo_data_registry -def retrieve_all_test_data(path: str) -> None: +def retrieve_all_test_data(zenodo_registry: list[dict], path: str) -> None: """Helper function for pulling all test data up-front. Parameters @@ -22,7 +22,7 @@ def _infer_processor(fname: str): else: return None - for d in zenodo_data_registry: + for d in zenodo_registry: pooch.retrieve( url=d["base_url"] + d["fname"], known_hash=d["known_hash"], diff --git a/src/openfe/data/_registry.py b/src/openfe/data/_registry.py index e69de29bb..7a87814dd 100644 --- a/src/openfe/data/_registry.py +++ b/src/openfe/data/_registry.py @@ -0,0 +1,24 @@ +import pooch + +POOCH_CACHE = pooch.os_cache("openfe") + +zenodo_rfe_simulation_nc = dict( + base_url="doi:10.5281/zenodo.15375081/", + fname="simulation.nc", + known_hash="md5:bc4e842b47de17704d804ae345b91599", +) +zenodo_t4_lysozyme_traj = dict( + base_url="doi:10.5281/zenodo.15212342", + fname="t4_lysozyme_trajectory.zip", + known_hash="sha256:e985d055db25b5468491e169948f641833a5fbb67a23dbb0a00b57fb7c0e59c8", +) +zenodo_industry_benchmark_systems = dict( + base_url="doi:10.5281/zenodo.15212342", + fname="industry_benchmark_systems.zip", + known_hash="sha256:2bb5eee36e29b718b96bf6e9350e0b9957a592f6c289f77330cbb6f4311a07bd", +) +zenodo_data_registry = [ + zenodo_rfe_simulation_nc, + zenodo_t4_lysozyme_traj, + zenodo_industry_benchmark_systems, +] diff --git a/src/openfe/tests/conftest.py b/src/openfe/tests/conftest.py index 4a75fc03b..e3c5c84d4 100644 --- a/src/openfe/tests/conftest.py +++ b/src/openfe/tests/conftest.py @@ -12,7 +12,6 @@ import numpy as np import openmm import pandas as pd -import pooch import pytest from gufe import AtomMapper, LigandAtomMapping, ProteinComponent, SmallMoleculeComponent from openff.toolkit import ForceField @@ -22,13 +21,12 @@ from rdkit.Chem import AllChem import openfe +from openfe.data._registry import POOCH_CACHE from openfe.protocols.openmm_rfe import RelativeHybridTopologyProtocol from openfe.protocols.openmm_rfe._rfe_utils.relative import HybridTopologyFactory from openfe.protocols.openmm_utils.serialization import deserialize from openfe.tests.protocols.openmm_rfe.helpers import make_htf -POOCH_CACHE = pooch.os_cache("openfe") - class SlowTests: """Plugin for handling fixtures that skips slow tests diff --git a/src/openfe/tests/protocols/restraints/test_geometry_boresch.py b/src/openfe/tests/protocols/restraints/test_geometry_boresch.py index c9a350b43..3a99f0d87 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_boresch.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_boresch.py @@ -9,12 +9,13 @@ from openff.units import unit from rdkit import Chem +from openfe.data._registry import POOCH_CACHE, zenodo_industry_benchmark_systems from openfe.protocols.restraint_utils.geometry.boresch.geometry import ( BoreschRestraintGeometry, find_boresch_restraint, ) -from ...conftest import HAS_INTERNET, POOCH_CACHE +from ...conftest import HAS_INTERNET @pytest.fixture() @@ -235,18 +236,20 @@ def test_get_boresch_restraint_dssp(eg5_protein_ligand_universe, eg5_ligands): assert -0.02396901 == pytest.approx(restraint_geometry.phi_C0.to("radians").m) -zenodo_restraint_data = pooch.create( +pooch_industry_benchmark_systems = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15212342", + base_url=zenodo_industry_benchmark_systems["base_url"], registry={ - "industry_benchmark_systems.zip": "sha256:2bb5eee36e29b718b96bf6e9350e0b9957a592f6c289f77330cbb6f4311a07bd" + zenodo_industry_benchmark_systems["fname"]: zenodo_industry_benchmark_systems["known_hash"] }, ) @pytest.fixture def industry_benchmark_files(): - zenodo_restraint_data.fetch("industry_benchmark_systems.zip", processor=pooch.Unzip()) + pooch_industry_benchmark_systems.fetch( + "industry_benchmark_systems.zip", processor=pooch.Unzip() + ) cache_dir = pathlib.Path( pooch.os_cache("openfe") / "industry_benchmark_systems.zip.unzip/industry_benchmark_systems" ) diff --git a/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py b/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py index 0efad9115..e254b0058 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_boresch_host.py @@ -11,6 +11,7 @@ from numpy.testing import assert_equal from openff.units import unit +from openfe.data._registry import POOCH_CACHE, zenodo_t4_lysozyme_traj from openfe.protocols.restraint_utils.geometry.boresch.host import ( EvaluateBoreschAtoms, EvaluateHostAtoms1, @@ -25,20 +26,18 @@ is_collinear, ) -from ...conftest import HAS_INTERNET, POOCH_CACHE +from ...conftest import HAS_INTERNET -zenodo_restraint_data = pooch.create( +pooch_t4_lysozyme = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15212342", - registry={ - "t4_lysozyme_trajectory.zip": "sha256:e985d055db25b5468491e169948f641833a5fbb67a23dbb0a00b57fb7c0e59c8" - }, + base_url=zenodo_t4_lysozyme_traj["base_url"], + registry={zenodo_t4_lysozyme_traj["fname"]: zenodo_t4_lysozyme_traj["known_hash"]}, ) @pytest.fixture(scope="module") def t4_lysozyme_trajectory_universe(): - zenodo_restraint_data.fetch("t4_lysozyme_trajectory.zip", processor=pooch.Unzip()) + pooch_t4_lysozyme.fetch("t4_lysozyme_trajectory.zip", processor=pooch.Unzip()) cache_dir = pathlib.Path( pooch.os_cache("openfe") / "t4_lysozyme_trajectory.zip.unzip/t4_lysozyme_trajectory" ) diff --git a/src/openfe/tests/protocols/restraints/test_geometry_utils.py b/src/openfe/tests/protocols/restraints/test_geometry_utils.py index e83578ed7..5e06662ae 100644 --- a/src/openfe/tests/protocols/restraints/test_geometry_utils.py +++ b/src/openfe/tests/protocols/restraints/test_geometry_utils.py @@ -13,6 +13,7 @@ from openff.units import unit from rdkit import Chem +from openfe.data._registry import POOCH_CACHE, zenodo_t4_lysozyme_traj from openfe.protocols.restraint_utils.geometry.utils import ( CentroidDistanceSort, FindHostAtoms, @@ -32,7 +33,7 @@ stable_secondary_structure_selection, ) -from ...conftest import HAS_INTERNET, POOCH_CACHE +from ...conftest import HAS_INTERNET @pytest.fixture(scope="module") @@ -49,18 +50,17 @@ def eg5_protein_ligand_universe(eg5_protein_pdb, eg5_ligands): return mda.Merge(protein.atoms, lig.atoms) -zenodo_restraint_data = pooch.create( +# TODO: duplicate - move to conftest.py +pooch_t4_lysozyme = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15212342", - registry={ - "t4_lysozyme_trajectory.zip": "sha256:e985d055db25b5468491e169948f641833a5fbb67a23dbb0a00b57fb7c0e59c8" - }, + base_url=zenodo_t4_lysozyme_traj["base_url"], + registry={zenodo_t4_lysozyme_traj["fname"]: zenodo_t4_lysozyme_traj["known_hash"]}, ) @pytest.fixture def t4_lysozyme_trajectory_universe(): - zenodo_restraint_data.fetch("t4_lysozyme_trajectory.zip", processor=pooch.Unzip()) + pooch_t4_lysozyme.fetch("t4_lysozyme_trajectory.zip", processor=pooch.Unzip()) cache_dir = pathlib.Path( pooch.os_cache("openfe") / "t4_lysozyme_trajectory.zip.unzip/t4_lysozyme_trajectory" ) diff --git a/src/openfe/tests/protocols/restraints/test_omm_restraints.py b/src/openfe/tests/protocols/restraints/test_omm_restraints.py index 55b75f5ad..8bdc72f88 100644 --- a/src/openfe/tests/protocols/restraints/test_omm_restraints.py +++ b/src/openfe/tests/protocols/restraints/test_omm_restraints.py @@ -11,6 +11,7 @@ from openff.units import unit from openmmtools.states import ThermodynamicState +from openfe.data._registry import POOCH_CACHE, zenodo_industry_benchmark_systems from openfe.protocols.restraint_utils.openmm.omm_restraints import ( BoreschRestraint, BoreschRestraintGeometry, @@ -98,19 +99,21 @@ def test_verify_geometry(): restraint._verify_geometry(geometry) -POOCH_CACHE = pooch.os_cache("openfe") -zenodo_restraint_data = pooch.create( +# TODO: duplicate - move to conftest.py +pooch_industry_benchmark_systems = pooch.create( path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15212342", + base_url=zenodo_industry_benchmark_systems["base_url"], registry={ - "industry_benchmark_systems.zip": "sha256:2bb5eee36e29b718b96bf6e9350e0b9957a592f6c289f77330cbb6f4311a07bd" + zenodo_industry_benchmark_systems["fname"]: zenodo_industry_benchmark_systems["known_hash"] }, ) @pytest.fixture def tyk2_protein_ligand_system(): - zenodo_restraint_data.fetch("industry_benchmark_systems.zip", processor=pooch.Unzip()) + pooch_industry_benchmark_systems.fetch( + "industry_benchmark_systems.zip", processor=pooch.Unzip() + ) cache_dir = pathlib.Path( pooch.os_cache("openfe") / "industry_benchmark_systems.zip.unzip/industry_benchmark_systems" ) @@ -120,7 +123,9 @@ def tyk2_protein_ligand_system(): @pytest.fixture def tyk2_rdkit_ligand(): - zenodo_restraint_data.fetch("industry_benchmark_systems.zip", processor=pooch.Unzip()) + pooch_industry_benchmark_systems.fetch( + "industry_benchmark_systems.zip", processor=pooch.Unzip() + ) cache_dir = pathlib.Path( pooch.os_cache("openfe") / "industry_benchmark_systems.zip.unzip/industry_benchmark_systems" ) diff --git a/src/openfe/tests/protocols/test_openmmutils.py b/src/openfe/tests/protocols/test_openmmutils.py index 7db0b2762..d6cfc96de 100644 --- a/src/openfe/tests/protocols/test_openmmutils.py +++ b/src/openfe/tests/protocols/test_openmmutils.py @@ -23,6 +23,7 @@ from pymbar.utils import ParameterError import openfe +from openfe.data._registry import POOCH_CACHE, zenodo_rfe_simulation_nc from openfe.protocols.openmm_rfe.equil_rfe_settings import ( IntegratorSettings, OpenMMSolvationSettings, @@ -40,7 +41,7 @@ HAS_NAGL, HAS_OPENEYE, ) -from openfe.tests.conftest import HAS_INTERNET, POOCH_CACHE +from openfe.tests.conftest import HAS_INTERNET @pytest.mark.parametrize( @@ -1033,22 +1034,13 @@ def test_openeye_import_error(self, monkeypatch, uncharged_mol): ) -RFE_OUTPUT = pooch.create( - path=POOCH_CACHE, - base_url="doi:10.5281/zenodo.15375081", - registry={ - "checkpoint.nc": "md5:3cfd70a4cbe463403d6ec7cca84fc31a", - "db.json": "md5:33c8c1a0b629a52dcc291beff59fabc6", - "hybrid_system.pdb": "md5:44a1e78294360037acf419b95be18fb3", - "simulation.nc": "md5:bc4e842b47de17704d804ae345b91599", - "simulation_real_time_analysis.yaml": "md5:68a7d81462c42353a91bbbe5e64fd418", - }, -) - - @pytest.fixture def simulation_nc(): - return pooch.retrieve(url="simulation.nc", path=POOCH_CACHE) + return pooch.retrieve( + url=zenodo_rfe_simulation_nc["base_url"] + zenodo_rfe_simulation_nc["fname"], + known_hash=zenodo_rfe_simulation_nc["known_hash"], + path=POOCH_CACHE, + ) @pytest.mark.slow diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 4260a55be..49342a3c2 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -5,8 +5,11 @@ import pytest from openfe.data import _downloader +from openfe.data._registry import zenodo_data_registry as api_test_data_registry from openfecli import OFECommandPlugin -from openfecli.utils import POOCH_CACHE, write +from openfecli.data._registry import POOCH_CACHE +from openfecli.data._registry import zenodo_data_registry as cli_test_data_registry +from openfecli.utils import write @click.command("test", short_help="Run the OpenFE test suite") @@ -31,7 +34,9 @@ def test(long, download_only): """ if download_only: - _downloader.retrieve_all_test_data(POOCH_CACHE) + _downloader.retrieve_all_test_data( + [cli_test_data_registry, api_test_data_registry], POOCH_CACHE + ) sys.exit(0) try: From d00f8915308941198250754117642f7db2c3fca6 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Fri, 6 Feb 2026 12:39:13 -0800 Subject: [PATCH 10/11] rename for clarity --- src/openfe/data/_downloader.py | 2 +- src/openfecli/commands/test.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/openfe/data/_downloader.py b/src/openfe/data/_downloader.py index 135321ce2..7bfb0d661 100644 --- a/src/openfe/data/_downloader.py +++ b/src/openfe/data/_downloader.py @@ -3,7 +3,7 @@ from ._registry import zenodo_data_registry -def retrieve_all_test_data(zenodo_registry: list[dict], path: str) -> None: +def retrieve_registry_data(zenodo_registry: list[dict], path: str) -> None: """Helper function for pulling all test data up-front. Parameters diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 49342a3c2..9e4c97c30 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -18,7 +18,7 @@ "--download-only", is_flag=True, default=False, - help="Download data to the cache (this is helpful if internet is flaky).", + help="Download data to the cache (this is helpful if internet is unreliable).", ) def test(long, download_only): """ @@ -34,8 +34,9 @@ def test(long, download_only): """ if download_only: - _downloader.retrieve_all_test_data( - [cli_test_data_registry, api_test_data_registry], POOCH_CACHE + click.echo(f"Checking for test data in cache location:\n{POOCH_CACHE}") + _downloader.retrieve_registry_data( + cli_test_data_registry + api_test_data_registry, POOCH_CACHE ) sys.exit(0) From 6fb3a78d08647de4d070aabca1c1a3c81efcb77c Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Fri, 6 Feb 2026 12:43:49 -0800 Subject: [PATCH 11/11] better docstring --- news/test-download-all.rst | 23 +++++++++++++++++++++++ src/openfecli/commands/test.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 news/test-download-all.rst diff --git a/news/test-download-all.rst b/news/test-download-all.rst new file mode 100644 index 000000000..f0c31b08a --- /dev/null +++ b/news/test-download-all.rst @@ -0,0 +1,23 @@ +**Added:** + +* Added ``openfe test --download-only`` flag, which caches all test data stored remotely. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/openfecli/commands/test.py b/src/openfecli/commands/test.py index 9e4c97c30..47cd06d9b 100644 --- a/src/openfecli/commands/test.py +++ b/src/openfecli/commands/test.py @@ -18,7 +18,7 @@ "--download-only", is_flag=True, default=False, - help="Download data to the cache (this is helpful if internet is unreliable).", + help="Download data to the cache if not already present (this is helpful if internet is unreliable). If all data exists in the cache, only the cache location is shown.", ) def test(long, download_only): """