File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # A script which is for now very ad-hoc and to be ran outside of this codebase and
3
+ # assumes having two repos of heudiconv -- one under heudiconv and another heudiconv-master
4
+ # with virtualenvs setup inside under venvs/dev.
5
+ # Was used for https://github.com/nipy/heudiconv/pull/129
6
+
7
+ PS1=+
8
+ set -eu
9
+
10
+ outdir=${OUTDIR:= compare-versions/ $(basename $1 )}
11
+
12
+ RUN=echo
13
+ RUN=
14
+
15
+ # if [ -e $outdir ]; then
16
+ # # just fail if exists already
17
+ # echo "$outdir exists already -- remove if you want to run the comparison" >&2
18
+ # exit 1
19
+ # fi
20
+
21
+ mkdir -p $outdir
22
+
23
+ function run() {
24
+ heudiconvdir=" $1 "
25
+ out=$outdir /$2
26
+ shift
27
+ shift
28
+ source $heudiconvdir /venvs/dev/bin/activate
29
+ whichheudiconv=$( which heudiconv)
30
+
31
+ # just do full conversion
32
+ echo " Running $whichheudiconv with log in $out .log"
33
+ $RUN heudiconv --random-seed 1 -f $heudiconvdir /heuristics/dbic_bids.py -c dcm2niix -o $out --datalad --bids " $@ " > | $out .log 2>&1
34
+ }
35
+
36
+ run heudiconv rolando " $@ "
37
+ run heudiconv-master master --files " $@ "
38
+
39
+ cd $outdir
40
+ # git remote add rolando "$outdir/rolando"
41
+ # git fetch rolando
42
+ # git diff --stat rolando/master..
43
+ if diff -Naur --exclude=.git --ignore-matching-lines=' ^\s*id\s*=.*' rolando master > | diff.patch; then
44
+ echo " Results are identical"
45
+ else
46
+ echo " Results differ: $PWD /diff.patch"
47
+ cat diff.patch | diffstat
48
+ fi
49
+
You can’t perform that action at this time.
0 commit comments