Skip to content
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

Use git-annex' VURL backend when doing a lazy download #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
5 changes: 4 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
- name: Set up system
run: |
sudo apt-get update -qq
sudo apt-get install git-annex
sudo wget -O- http://neuro.debian.net/lists/jammy.de-fzj.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com 0xA5D32F012649A5A9
sudo apt-get update -qq
sudo apt-get install git-annex-standalone
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
1 change: 1 addition & 0 deletions src/datalad_cds/download_cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __call__(
options = []
if lazy:
options.append("--fast")
options.append("--verifiable")
ds.repo.add_url_to_file(pathobj, url, batch=batch, options=options)
if save:
msg = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def test_download_cds_lazy(
)
assert (
os.readlink(dataset.pathobj / "download.grib")
== ".git/annex/objects/5J/pV/URL--cds&cv1-eyJkYXRhc2V0IjoicmVhbmFs-77566133ebfe9220aefbeed5a58b6972/URL--cds&cv1-eyJkYXRhc2V0IjoicmVhbmFs-77566133ebfe9220aefbeed5a58b6972"
== ".git/annex/objects/69/qm/VURL--cds&cv1-eyJkYXRhc2V0IjoicmVhbmFs-77566133ebfe9220aefbeed5a58b6972/VURL--cds&cv1-eyJkYXRhc2V0IjoicmVhbmFs-77566133ebfe9220aefbeed5a58b6972"
)
Loading