-
Notifications
You must be signed in to change notification settings - Fork 41
add --download-only option to openfe test #1814
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
db646fc
add boilerplate
atravitz af4eb69
define pooch cache at top level
atravitz 0d8a21f
try downloading one file
atravitz 6f8d351
Merge branch 'main' of github.com:OpenFreeEnergy/openfe into cli/add_…
atravitz 6ab2e61
Merge branch 'main' of github.com:OpenFreeEnergy/openfe into cli/add_…
atravitz 8ae413f
put pooch cache in utils
atravitz b942fa8
use dict
atravitz 999138e
add all cli data
atravitz 256e5a5
keep registry data all in one place
atravitz d1c935c
move downloader to openfe from openfecli
atravitz 56d0e32
add both registries to test
atravitz 28f2869
Merge branch 'main' of github.com:OpenFreeEnergy/openfe into cli/add_…
atravitz 1b89a90
Merge branch 'main' into cli/add_fetch_test_data
atravitz c737036
Merge branch 'main' of github.com:OpenFreeEnergy/openfe into cli/add_…
atravitz d00f891
rename for clarity
atravitz 6fb3a78
better docstring
atravitz e00863a
Merge branch 'main' into cli/add_fetch_test_data
atravitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| **Added:** | ||
|
|
||
| * Added ``openfe test --download-only`` flag, which caches all test data stored remotely. | ||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import pooch | ||
|
|
||
| from ._registry import zenodo_data_registry | ||
|
|
||
|
|
||
| def retrieve_registry_data(zenodo_registry: list[dict], 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_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, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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, | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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, | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: we moved to from figshare to zenodo here:
openfe/src/openfe/tests/protocols/test_openmmutils.py
Lines 1037 to 1038 in f7561cd
but this was left as a stragger no-op.