Skip to content

Commit 67b5f0c

Browse files
authored
Merge pull request #71 from nipreps/enh/54-migrating-reportlet-interfaces-2
ENH: Finalize migration of reporting interfaces
2 parents 6404af3 + cc88653 commit 67b5f0c

File tree

14 files changed

+1464
-38
lines changed

14 files changed

+1464
-38
lines changed

.circleci/config.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,31 @@ jobs:
1616
- TEMPLATEFLOW_HOME: /tmp/templateflow
1717
steps:
1818
- checkout
19+
- run:
20+
name: Install uv
21+
command: pip install uv
22+
1923
- run:
2024
name: Install package
2125
command: pip install .[test]
2226

27+
- run:
28+
name: Git config - pacify datalad
29+
command: |
30+
git config --global user.name 'NiPreps Bot'
31+
git config --global user.email '[email protected]'
32+
2333
- restore_cache:
2434
keys:
2535
- apt-v0
2636
paths:
2737
- /var/lib/apt
2838

2939
- run:
30-
name: Install texlive
40+
name: Install texlive and git-annex
3141
command: |
3242
sudo apt-get update
33-
sudo apt-get install -y --no-install-recommends dvipng texlive texlive-latex-extra cm-super
43+
sudo apt-get install -y --no-install-recommends dvipng texlive texlive-latex-extra cm-super git-annex
3444
3545
- save_cache:
3646
key: apt-v0
@@ -48,12 +58,47 @@ jobs:
4858
command: |
4959
python -c "from templateflow.api import get; get('Fischer344', desc=None, suffix='T2w')"
5060
python -c "from templateflow.api import get; get('MNI152NLin6Asym', resolution=2, desc='LR', suffix='T1w')"
61+
python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, desc=None, suffix='T1w')"
62+
python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, desc='brain', suffix='mask')"
63+
python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, label='brain', suffix='probseg')"
64+
python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, desc='BrainCerebellumRegistration', suffix='mask')"
65+
python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, desc='4', suffix='dseg')"
66+
python -c "from templateflow.api import get; get('fsLR', density='32k', hemi=['R', 'L'], suffix='inflated', extension='surf.gii')"
5167
5268
- save_cache:
5369
key: tf-v0
5470
paths:
5571
- /tmp/templateflow
5672

73+
- restore_cache:
74+
keys:
75+
- data-v1-{{ .Branch }}-
76+
- data-v1-master-
77+
- data-v1-
78+
- run:
79+
name: Get test data from ds000003
80+
command: |
81+
mkdir -p /tmp/data
82+
pushd /tmp/data
83+
if [[ ! -d ds000003 ]]; then
84+
uvx --with=datalad-osf datalad install -r https://github.com/nipreps-data/ds000003.git
85+
fi
86+
uvx --with=datalad-osf datalad update -r --merge -d ds000003/
87+
uvx --with=datalad-osf datalad get -J 2 -r -d ds000003/ ds000003/*
88+
popd
89+
90+
- save_cache:
91+
key: data-v1-{{ .Branch }}-{{ epoch }}
92+
paths:
93+
- /tmp/data/ds000003
94+
95+
- run:
96+
name: Store FreeSurfer license file
97+
command: |
98+
mkdir -p /tmp/fslicense
99+
cd /tmp/fslicense
100+
echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IGxpY2Vuc2UudHh0Cg==" | base64 -d | sh
101+
57102
- run:
58103
name: Run unit tests
59104
no_output_timeout: 2h

nireports/conftest.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
os.environ["NO_ET"] = "1"
3737

3838
_datadir = (Path(__file__).parent / "tests" / "data").absolute()
39-
niprepsdev_path = os.getenv("TEST_DATA_HOME", str(Path.home() / ".cache" / "nipreps-dev"))
39+
niprepsdev_path = Path(os.getenv("TEST_DATA_HOME", Path.home() / ".cache" / "nipreps-dev"))
4040
test_output_dir = os.getenv("TEST_OUTPUT_DIR")
4141
test_workdir = os.getenv("TEST_WORK_DIR")
4242

@@ -58,8 +58,8 @@ def expand_namespace(doctest_namespace):
5858
doctest_namespace["os"] = os
5959
doctest_namespace["pytest"] = pytest
6060
doctest_namespace["Path"] = Path
61-
doctest_namespace["testdata_path"] = _datadir
62-
doctest_namespace["niprepsdev_path"] = niprepsdev_path
61+
doctest_namespace["test_data_package"] = _datadir
62+
doctest_namespace["test_data_home"] = niprepsdev_path
6363

6464
doctest_namespace["os"] = os
6565
doctest_namespace["Path"] = Path
@@ -79,10 +79,15 @@ def expand_namespace(doctest_namespace):
7979

8080

8181
@pytest.fixture
82-
def testdata_path():
82+
def test_data_package():
8383
return _datadir
8484

8585

86+
@pytest.fixture
87+
def test_data_home():
88+
return niprepsdev_path
89+
90+
8691
@pytest.fixture
8792
def workdir():
8893
return None if test_workdir is None else Path(test_workdir)

0 commit comments

Comments
 (0)