Repository navigation
test: fetch test data per file from a Hugging Face bucket - #14
ArthurZucker wants to merge 2 commits into
Conversation
Replaces download_script.py, which pulled the full 3.2 GB Zenodo archive before any test could run, with a session fixture that downloads only the files a test actually opens and caches them across runs. - delete download_script.py (92 lines) and the prepare-data CI job with its two actions/cache blocks - add tests/conftest.py exposing a data_path fixture - rewrite 55 hardcoded "./tests/data" paths, which also makes the suite independent of the working directory - swap the requests/tqdm test deps for huggingface_hub - update CONTRIBUTING.md and docs/installation.rst The fixtures stay archived on Zenodo (10.5281/zenodo.22249523); the bucket is a byte-identical working copy.
|
cc @simoncampredon-lang ! |
|
Hi @ArthurZucker, Thanks for the PR, and for contributing to pyIconeus! You’re right that downloading the full 3.2 GB archive was a real pain point. Per-file downloads with a local cache are a promising direction, and making the tests independent of the working directory is a nice bonus. We’re still evaluating the PR, and we’d like two changes at this stage:
Once these are addressed, we may come back with a few smaller remarks. Also, since the bucket currently lives in a personal namespace, hosting the test data under an Iconeus-owned HF organization will be a prerequisite for any merge. We’ll take care of that at the end of the review, so no action is needed from you on that point for now. Keeping PYICONEUS_TEST_BUCKET as an override will help with that. Would you be willing to update these? Thanks again! |
|
Hey! Thanks for the review! Both points addressed:
Hosting: if you add me to an You can also generate it yourself: hf auth login
hf repos create Iconeus/pyiconeus-test-data --repo-type dataset
hf upload Iconeus/pyiconeus-test-data ./tests/data . --repo-type dataset |
Hey!
Tried to play a bit with the data, think they belong well on the HF hub!
The updated code fetches test fixture on demand from a Hugging Face bucket instead of the 3.2 GB Zenodo zip
pytest tests/test_roi.pynow needs 1.8 MB and 7 s instead of a 3.22 GB download, which takes ~2.9 h at the 0.31 MB/s I measured pulling the archive single-stream from Zenodo.The bucket (ArthurZ/pyiconeus-test-data) is public, it's byte-identical to the Zenodo archive (same MD5), and I'd be glad to transfer it to an
Iconeusorg .