Skip to content

Commit

Permalink
Merge pull request #186 from netneurolab/liuzhenqi77-patch-1
Browse files Browse the repository at this point in the history
[FIX] fix nilearn interface update for fetch_single_file
  • Loading branch information
liuzhenqi77 authored Dec 13, 2024
2 parents 3770570 + ae2b1cd commit ae3c88a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion neuromaps/datasets/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def fetch_annotation(*, source=None, desc=None, space=None, den=None, res=None,
for dset in info:
fn = Path(data_dir) / 'annotations' / dset['rel_path'] / dset['fname']
if not fn.exists():
dl_file = _fetch_file(dset['url'], str(fn.parent), verbose=verbose,
dl_file = _fetch_file(dset['url'], fn.parent, verbose=verbose,
md5sum=dset['checksum'], session=session)
shutil.move(dl_file, fn)
data.append(str(fn))
Expand Down
5 changes: 5 additions & 0 deletions neuromaps/datasets/tests/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ def test_available_tags():
assert all(f in restricted for f in unrestricted)


def test_fetch_annotation_smoke():
"""Smoke test of fetching an annotation."""
annotations.fetch_annotation(source="abagen")


@pytest.mark.xfail
def test_fetch_annotation():
"""Test fetching an annotation."""
Expand Down

0 comments on commit ae3c88a

Please sign in to comment.