nimare 0.5.0rc2__py3-none-any.whl → 0.5.1rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nimare/_version.py +3 -3
- nimare/reports/base.py +1 -1
- nimare/tests/test_extract.py +35 -5
- nimare/tests/test_reports.py +22 -0
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/METADATA +1 -1
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/RECORD +10 -10
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/LICENSE +0 -0
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/WHEEL +0 -0
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/entry_points.txt +0 -0
- {nimare-0.5.0rc2.dist-info → nimare-0.5.1rc1.dist-info}/top_level.txt +0 -0
nimare/_version.py
CHANGED
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2025-
|
11
|
+
"date": "2025-05-14T18:30:31-0500",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "0.5.
|
14
|
+
"full-revisionid": "0d38f6753997f345fc39e3eddb079655f87077b2",
|
15
|
+
"version": "0.5.1rc1"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
nimare/reports/base.py
CHANGED
nimare/tests/test_extract.py
CHANGED
@@ -2,10 +2,28 @@
|
|
2
2
|
|
3
3
|
import os
|
4
4
|
from glob import glob
|
5
|
+
from io import BytesIO
|
6
|
+
from unittest.mock import patch
|
5
7
|
|
6
8
|
import nimare
|
7
9
|
|
8
10
|
|
11
|
+
def mock_urlopen(url):
|
12
|
+
"""Mock URL opener that returns appropriate mock data based on file type."""
|
13
|
+
if "coordinates.tsv.gz" in url:
|
14
|
+
mock_data = b"x\ty\tz\n1\t2\t3\n4\t5\t6"
|
15
|
+
elif "metadata.tsv.gz" in url:
|
16
|
+
mock_data = b"id\ttitle\n1\tStudy 1\n2\tStudy 2"
|
17
|
+
elif "features.npz" in url:
|
18
|
+
mock_data = b"mock npz content"
|
19
|
+
elif "vocabulary.txt" in url:
|
20
|
+
mock_data = b"term1\nterm2\nterm3"
|
21
|
+
else:
|
22
|
+
mock_data = b"Mock file content"
|
23
|
+
return BytesIO(mock_data)
|
24
|
+
|
25
|
+
|
26
|
+
@patch("nimare.extract.extract.urlopen", side_effect=mock_urlopen)
|
9
27
|
def test_fetch_neurosynth(tmp_path_factory):
|
10
28
|
"""Smoke test for extract.fetch_neurosynth.
|
11
29
|
|
@@ -19,15 +37,20 @@ def test_fetch_neurosynth(tmp_path_factory):
|
|
19
37
|
source="abstract",
|
20
38
|
vocab="terms",
|
21
39
|
)
|
22
|
-
|
23
|
-
assert len(files) == 4
|
24
|
-
|
25
|
-
# One set of files found
|
40
|
+
# Check data_files structure
|
26
41
|
assert isinstance(data_files, list)
|
27
42
|
assert len(data_files) == 1
|
28
43
|
|
44
|
+
# Verify expected files in data_files
|
45
|
+
files_dict = data_files[0]
|
46
|
+
assert "coordinates" in files_dict
|
47
|
+
assert "metadata" in files_dict
|
48
|
+
assert "features" in files_dict
|
49
|
+
assert len(files_dict["features"]) == 1
|
50
|
+
|
29
51
|
|
30
|
-
|
52
|
+
@patch("nimare.extract.extract.urlopen", side_effect=mock_urlopen)
|
53
|
+
def test_fetch_neuroquery(mock_url, tmp_path_factory):
|
31
54
|
"""Smoke test for extract.fetch_neuroquery."""
|
32
55
|
tmpdir = tmp_path_factory.mktemp("test_fetch_neuroquery")
|
33
56
|
data_files = nimare.extract.fetch_neuroquery(
|
@@ -44,3 +67,10 @@ def test_fetch_neuroquery(tmp_path_factory):
|
|
44
67
|
# One set of files found
|
45
68
|
assert isinstance(data_files, list)
|
46
69
|
assert len(data_files) == 1
|
70
|
+
|
71
|
+
# Verify mock was called with expected URLs
|
72
|
+
assert mock_url.call_count > 0 # Should be called for each file download
|
73
|
+
for call in mock_url.call_args_list:
|
74
|
+
url = call[0][0]
|
75
|
+
assert "neuroquery/neuroquery_data/blob" in url
|
76
|
+
assert "?raw=true" in url
|
nimare/tests/test_reports.py
CHANGED
@@ -108,3 +108,25 @@ def test_reports_ibma_smoke(tmp_path_factory, testdata_ibma, aggressive_mask):
|
|
108
108
|
filename = "report.html"
|
109
109
|
outpath = op.join(hedges_dir, filename)
|
110
110
|
assert op.isfile(outpath)
|
111
|
+
|
112
|
+
|
113
|
+
def test_reports_ibma_multiple_contrasts_smoke(tmp_path_factory, testdata_ibma_multiple_contrasts):
|
114
|
+
"""Smoke test for IBMA reports for multiple contrasts."""
|
115
|
+
tmpdir = tmp_path_factory.mktemp("test_reports_ibma_smoke")
|
116
|
+
|
117
|
+
# Generate a report with z maps as inputs
|
118
|
+
stouffers_dir = op.join(tmpdir, "stouffers")
|
119
|
+
workflow = IBMAWorkflow(
|
120
|
+
estimator=Stouffers(aggressive_mask=True),
|
121
|
+
corrector="fdr",
|
122
|
+
diagnostics="jackknife",
|
123
|
+
voxel_thresh=3.2,
|
124
|
+
output_dir=stouffers_dir,
|
125
|
+
)
|
126
|
+
results = workflow.fit(testdata_ibma_multiple_contrasts)
|
127
|
+
|
128
|
+
run_reports(results, stouffers_dir)
|
129
|
+
|
130
|
+
filename = "report.html"
|
131
|
+
outpath = op.join(stouffers_dir, filename)
|
132
|
+
assert op.isfile(outpath)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
benchmarks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
benchmarks/bench_cbma.py,sha256=fg_EER8hohi6kD1Hno_uXsFntKuCLTvseu-6OqkHkoU,1382
|
3
3
|
nimare/__init__.py,sha256=HHIq3EimSZSf3zJSDwuTjBig1GbRwHGYfRLSqI3yleE,802
|
4
|
-
nimare/_version.py,sha256=
|
4
|
+
nimare/_version.py,sha256=wKqr4KLFDBfby4GFFBohLjmyONhzWdP50R86OZ2SCak,500
|
5
5
|
nimare/base.py,sha256=9DlcRB2mW759p7XqpKG3wRE-MmPsEPiYTbq6V1Yile4,7826
|
6
6
|
nimare/cli.py,sha256=Zvy5jN2KopH_MBke-gm8A0DbBZmIFGvnE1tjhbYib9I,3695
|
7
7
|
nimare/correct.py,sha256=2eI0jR6_odND-2CzSlaxRU2um6ccLSapd7ERAYteBnE,17110
|
@@ -41,7 +41,7 @@ nimare/meta/cbma/ale.py,sha256=ZNjXC4MXhfSHvrTRppY04NkGtz_Iri696k5QMuBog7o,39273
|
|
41
41
|
nimare/meta/cbma/base.py,sha256=-gJ4hW6_6T5oto3pre9GbWodHWRmPS2WZ1LJjB0BtMI,38382
|
42
42
|
nimare/meta/cbma/mkda.py,sha256=V5vSQodiLZoZhkYPhous0a_-1pZoRjAIL8gmGyyoezc,60397
|
43
43
|
nimare/reports/__init__.py,sha256=zGfrOPlMq2lTorKNEpyPblArFCnsvz3dRsvOHy_Ciag,428
|
44
|
-
nimare/reports/base.py,sha256=
|
44
|
+
nimare/reports/base.py,sha256=_PYM_zq5ATYden5CiuppURrZX_y54u_h5-DL5UFi_KM,23507
|
45
45
|
nimare/reports/default.yml,sha256=zTcWUlC9ntvacMcIIUAJPoFV8XrvPGqCH2uwovwB4Wc,6003
|
46
46
|
nimare/reports/figures.py,sha256=MCsjDR53475Jz1_anktKvNOh0qUNPMx-dfvP6Vy0uUc,19783
|
47
47
|
nimare/reports/report.tpl,sha256=ZweYiJF80zdaIwK1iawAl1pwmBZdPjpxXxY5C0U5yVs,5518
|
@@ -72,7 +72,7 @@ nimare/tests/test_decode_continuous.py,sha256=KmdkulIIBBpjbao-TdFTVFuRd6lUx_-3Qq
|
|
72
72
|
nimare/tests/test_decode_discrete.py,sha256=NL__uEvMori4HtmoZUVdj465lW4Qwr4ndgyOz5rB7dY,3293
|
73
73
|
nimare/tests/test_diagnostics.py,sha256=VrfR_8nQKn2VF7dFdnTM7ZQy3Ou5eHdpaLhml5T6Pb0,6467
|
74
74
|
nimare/tests/test_estimator_performance.py,sha256=tbK2Qr83rB0in-pB6MccnjLg4iHSyfilx-hTNDWQfe4,12749
|
75
|
-
nimare/tests/test_extract.py,sha256=
|
75
|
+
nimare/tests/test_extract.py,sha256=nPaL07G9paLRCJzPOv79jH3mhOPs2YvQdghoLfcDz5A,2348
|
76
76
|
nimare/tests/test_generate.py,sha256=LSh2APJsg87u2s2zydkrre3RVk_ZGpoB4d7uuvIPWYE,7318
|
77
77
|
nimare/tests/test_io.py,sha256=QKr_zRGu8tyrpiLoLAjCV9ektxCTHRlKPWgyJRqQ9T8,10397
|
78
78
|
nimare/tests/test_meta_ale.py,sha256=hccXSNzLGUgj6E4tCsiHZpuUFoBxXkP293-vtUS5jdE,11791
|
@@ -81,7 +81,7 @@ nimare/tests/test_meta_ibma.py,sha256=Yw4F0_pr3cpVSe7oeMlK0-btg1Uw58cenklOsIw87P
|
|
81
81
|
nimare/tests/test_meta_kernel.py,sha256=Edk6lOsnqokg86mp9jAkokA203K61R7pjJEmyEEzV7E,8450
|
82
82
|
nimare/tests/test_meta_mkda.py,sha256=9PuzNUKrTBjbCHdSnuOAToXbV7wp1O0TCdD537qGQkA,9206
|
83
83
|
nimare/tests/test_nimads.py,sha256=3yzCO8rmUVfEYAt3HNnJcyAENorJ5BOWdJXY3hjrdP0,9807
|
84
|
-
nimare/tests/test_reports.py,sha256=
|
84
|
+
nimare/tests/test_reports.py,sha256=KIihXTAsIntsEG6xk3crMFLoQGiI5EOr0mesCne48CA,4030
|
85
85
|
nimare/tests/test_stats.py,sha256=_GhpUC1u4hnFR2SZ-sHQqkJ5MwsyPsvwPEd2GkQmsHY,4030
|
86
86
|
nimare/tests/test_transforms.py,sha256=mzEnufefhybs4r_dfRY6zQUAShepPMwKFY7S5amq3cs,10378
|
87
87
|
nimare/tests/test_utils.py,sha256=JaJYexM_xJOa-Jhv5OdbQBZ-3IWba1-Dmf1-V580ACo,6443
|
@@ -111,9 +111,9 @@ nimare/workflows/cbma.py,sha256=2jYJs9kH7_LzFP6d7-oTHiTTgAFbtmiBNtBXSCSZPjg,7052
|
|
111
111
|
nimare/workflows/ibma.py,sha256=lAkWtqSqnZiUUV460Bh046U9LeGhnry3bl8BFi-tx7s,4289
|
112
112
|
nimare/workflows/macm.py,sha256=mVUBeKbTawhU93ApnkunZSUXZWo7qBPrM3dMGWfl0ik,2531
|
113
113
|
nimare/workflows/misc.py,sha256=OWgHlSAnRI0-5Seii-bd48piIYsfEAF_aNKGorH1yJQ,1827
|
114
|
-
nimare-0.5.
|
115
|
-
nimare-0.5.
|
116
|
-
nimare-0.5.
|
117
|
-
nimare-0.5.
|
118
|
-
nimare-0.5.
|
119
|
-
nimare-0.5.
|
114
|
+
nimare-0.5.1rc1.dist-info/LICENSE,sha256=PWPXnCGWh-FMiBZ61OnQ2BHFjPPlJJ7F0kFx_ryzp-M,1074
|
115
|
+
nimare-0.5.1rc1.dist-info/METADATA,sha256=z9_jAt6fncG6KjI6Fi_A3ktJyuY1gAAUEsU-cvZBn5U,4698
|
116
|
+
nimare-0.5.1rc1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
117
|
+
nimare-0.5.1rc1.dist-info/entry_points.txt,sha256=3w_hk9N2PWnKZkCaJyDlc0_kdn3rh35aiI21rSdvsuA,44
|
118
|
+
nimare-0.5.1rc1.dist-info/top_level.txt,sha256=XnOcEXMs0BxdI8t3_ksTl96T8hykn9L7-bxLLraVrTI,18
|
119
|
+
nimare-0.5.1rc1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|