This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
62 lines (48 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Inputs from https://github.com/CellProfiler/examples/tree/master/ExampleHuman
EXAMPLE_CDN = https://github.com/CellProfiler/examples/archive/master.zip
# Public gold output files
S3_GOLD = https://s3.amazonaws.com/cellprofiler-examples/example-human-gold-standard
VERSION := 3.0.0
TAG := latest
.DEFAULT_GOAL: build
build:
docker build -t cellprofiler:$(TAG) --build-arg version=$(VERSION) .
.PHONY: input
input:
mkdir -p $@
output:
mkdir -m 777 -p $@
# The files to compare against after a run of CellProfiler
# Note that while Image.csv is also output, it is not compared against,
# because it contains hashes that change per-run.
output/gold: output
mkdir $@
AS_09125_050116030001_D03f00d0_Overlay.png: output/gold
curl -o $</$@ ${S3_GOLD}/$@
master.zip:
curl -LOk ${EXAMPLE_CDN}
data: master.zip
unzip $< -d input
mv input/examples-master/ExampleHuman/images/* input/
mv input/examples-master/ExampleHuman/ExampleHuman.cppipe input/
input/filelist.txt: data
echo 'file:///input/AS_09125_050116030001_D03f00d0.tif' >> $@
echo 'file:///input/AS_09125_050116030001_D03f00d1.tif' >> $@
echo 'file:///input/AS_09125_050116030001_D03f00d2.tif' >> $@
.PHONY: clean
clean:
rm -r input
rm -r output
rm master.zip
.PHONY: test
test: input output output/gold data input/filelist.txt AS_09125_050116030001_D03f00d0_Overlay.png
docker run \
--volume=`pwd`/input:/input \
--volume=`pwd`/output:/output \
cellprofiler:$(VERSION) \
--image-directory=/input \
--output-directory=/output \
--pipeline=/input/ExampleHuman.cppipe \
--file-list=/input/filelist.txt
# Compare gold files against output that was run.
diff -b output/AS_09125_050116030001_D03f00d0_Overlay.png output/gold/AS_09125_050116030001_D03f00d0_Overlay.png