Skip to content

Commit 7cf097f

Browse files
committed
maint(ci): update circle and travis
make sure that the new masks are uploaded to the artifacts
1 parent 00fbf05 commit 7cf097f

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

.circleci/config.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ jobs:
285285
- regression-v2-{{ .Revision }}
286286
- restore_cache:
287287
keys:
288-
- masks-workdir-v1-{{ .Branch }}-{{epoch}}
289-
- masks-workdir-v1-{{ .Branch }}-
290-
- masks-workdir-v1-master-
291-
- masks-workdir-v1-
288+
- masks-workdir-v2-{{ .Branch }}-{{epoch}}
289+
- masks-workdir-v2-{{ .Branch }}-
290+
- masks-workdir-v2-master-
291+
- masks-workdir-v2-
292292
- run:
293293
name: Run regression tests on EPI masks
294294
no_output_timeout: 2h
@@ -305,14 +305,29 @@ jobs:
305305
coverage run -p --rcfile=setup.cfg \
306306
-m pytest --junit-xml=/tmp/masks/reports/regression.xml \
307307
niworkflows/func/tests/
308-
- save_cache:
309-
key: masks-workdir-v1-{{ .Branch }}-{{ epoch }}
310-
paths:
311-
- /tmp/masks/workdir
308+
- run:
309+
name: Package new masks
310+
when: always
311+
no_output_timeout: 10m
312+
command: |
313+
cd reports/
314+
tar cvfz /tmp/masks/fmriprep_bold_mask.tar.gz fmriprep_bold_mask/*/*.nii.gz
315+
- store_artifacts:
316+
path: /tmp/masks/fmriprep_bold_mask.tar.gz
317+
318+
- run:
319+
name: Clear reports folder & delete plot generator cache
320+
command: |
321+
rm -rf /tmp/masks/reports/fmriprep_bold_mask/
322+
find workdir/ -name "mask_diff_plot" -exec rm -rf {} +
312323
- store_artifacts:
313324
path: /tmp/masks/reports
314325
- store_test_results:
315326
path: /tmp/masks/reports
327+
- save_cache:
328+
key: masks-workdir-v2-{{ .Branch }}-{{ epoch }}
329+
paths:
330+
- /tmp/masks/workdir
316331

317332
- run:
318333
name: Coverage preparation
@@ -337,15 +352,6 @@ jobs:
337352
cp /tmp/masks/reports/coverage.xml .
338353
sed -i "s+/src/niworkflows+/tmp/src/niworkflows+g" coverage.xml
339354
python -m codecov --file coverage.xml --flags masks -e CIRCLE_JOB
340-
- run:
341-
name: Package new masks
342-
when: always
343-
no_output_timeout: 10m
344-
working_directory: /tmp/data
345-
command: |
346-
tar cfz /tmp/masks/fmriprep_bold_mask.tar.gz fmriprep_bold_mask/*/*.nii.gz
347-
- store_artifacts:
348-
path: /tmp/masks/fmriprep_bold_mask.tar.gz
349355
350356
test_package:
351357
machine:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ cache:
88
- $HOME/.cache/pip
99

1010
python:
11-
- 3.5
1211
- 3.6
1312
- 3.7
13+
- 3.8
1414

1515
env:
1616
global:

niworkflows/func/tests/test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_masking(input_fname, expected_fname):
7474
base_dir.mkdir(parents=True, exist_ok=True)
7575
bold_reference_wf.base_dir = str(base_dir)
7676

77-
out_fname = fname_presuffix(basename, suffix='_masks.svg', use_ext=False,
77+
out_fname = fname_presuffix(basename, suffix='_mask.svg', use_ext=False,
7878
newpath=str(newpath))
7979
newpath.mkdir(parents=True, exist_ok=True)
8080

0 commit comments

Comments
 (0)