Skip to content

Commit af729a6

Browse files
committed
TST download mapper for testing
1 parent bfdbc1a commit af729a6

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/run_tests.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ jobs:
2626
2727
- name: Install dependencies
2828
run: |
29+
pip install -U setuptools
30+
pip install -U wheel
31+
pip install git+https://github.com/gallantlab/pycortex.git
2932
pip install -e ."[github]"
33+
$CONDA/bin/conda install -c conda-forge git-annex=*=alldep*
3034
3135
- name: Lint with flake8
3236
run: |
@@ -36,10 +40,21 @@ jobs:
3640
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3741
flake8 . --count --exit-zero --ignore=E402,C901 --max-line-length=127 --statistics
3842
43+
- name: Config git-annex
44+
run: |
45+
# change of path not in effect before next action
46+
echo "${CONDA}/bin" >> $GITHUB_PATH
47+
# add back python to avoid using conda's
48+
echo $(dirname $(which python)) >> $GITHUB_PATH
49+
# add some git config for git-annex
50+
git config --global user.email "github-actions@example.com"
51+
git config --global user.name "Github Actions"
52+
3953
- name: Test with pytest
4054
run: |
55+
# run the tests
4156
pip install -q pytest pytest-cov codecov
42-
pytest --cov=./ --reruns 2
57+
pytest --cov=./
4358
4459
- name: Run codecov
4560
run: |

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
extras_require = {
3333
"docs": ["sphinx", "sphinx_gallery", "numpydoc"],
34-
"github": ["pytest", "pytest-rerunfailures"],
34+
"github": ["pytest"],
3535
}
3636

3737

voxelwise_tutorials/tests/test_mappers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@
1212
from voxelwise_tutorials.viz import plot_flatmap_from_mapper
1313
from voxelwise_tutorials.viz import plot_2d_flatmap_from_mapper
1414

15-
dataset_directory = '/data1/tutorials/vim-4/'
15+
from voxelwise_tutorials.io import get_data_home
16+
from voxelwise_tutorials.io import download_datalad
17+
18+
dataset_directory = get_data_home(dataset="shortclips")
1619
subject_id = "S01"
1720

21+
# download mapper if not already present
22+
download_datalad("mappers/S01_mappers.hdf", destination=dataset_directory,
23+
source="https://gin.g-node.org/gallantlab/shortclips")
24+
1825

1926
def test_flatmap_mappers():
2027

0 commit comments

Comments
 (0)