Skip to content

Commit ffb6e40

Browse files
committed
start re-working Makefile for parallelism
1 parent c5d521f commit ffb6e40

File tree

1 file changed

+43
-27
lines changed

1 file changed

+43
-27
lines changed

Makefile

+43-27
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,62 @@
1+
IMPLEMENTATIONS=$(wildcard implementations/*)
2+
3+
4+
ifeq ($(TEST),)
5+
# If TEST is not set, by default build everything, generate
6+
# data for all implementations, and then run all pytests.
7+
8+
.PHONY: test
19
test: data
2-
pytest -v
10+
pytest -v -k W
11+
12+
else
13+
# Otherwise, focus on a single implementation.
14+
15+
.PHONY: test
16+
test: $(TEST)
17+
pytest -v -k $(TEST)
18+
19+
endif
320

421
data/reference_image.png:
522
python generate_reference_image.py
623

7-
.PHONY: jzarr
8-
jzarr: data/reference_image.png
9-
bash implementations/jzarr/generate_data.sh
24+
.PHONY: report
25+
report: data
26+
python test/test_read_all.py
27+
28+
#
29+
# Implementations
30+
#
31+
32+
.PHONY: implementations/jzarr
33+
implementations/jzarr: data/reference_image.png
34+
bash implementations/jzarr/driver.sh
1035

11-
.PHONY: n5java
12-
n5java: data/reference_image.png
36+
.PHONY: implementations/n5java
37+
implementations/n5java: data/reference_image.png
1338
bash implementations/n5-java/generate_data.sh
1439

15-
.PHONY: pyn5
16-
pyn5: data/reference_image.png
40+
.PHONY: implementations/pyn5
41+
implementations/pyn5: data/reference_image.png
1742
python implementations/generate_pyn5.py
1843

19-
.PHONY: z5py
20-
z5py: data/reference_image.png
44+
.PHONY: implementations/z5py
45+
implementations/z5py: data/reference_image.png
2146
python implementations/generate_z5py.py
2247

23-
.PHONY: zarr
24-
zarr: data/reference_image.png
48+
.PHONY: implementations/zarr-python
49+
implementations/zarr-python: data/reference_image.png
2550
python implementations/generate_zarr.py
2651

27-
.PHONY: zarrita
28-
zarrita: data/reference_image.png
52+
.PHONY: implementations/zarrita
53+
implementations/zarrita: data/reference_image.png
2954
python implementations/generate_zarrita.py
3055

31-
.PHONY: js
32-
js: data/reference_image.png
56+
.PHONY: implementations/js
57+
implementations/js: data/reference_image.png
3358
bash implementations/js/generate_data.sh
3459

35-
.PHONY: xtensor_zarr
36-
xtensor_zarr: data/reference_image.png
60+
.PHONY: implementations/xtensor_zarr
61+
implementations/xtensor_zarr: data/reference_image.png
3762
bash implementations/xtensor_zarr/generate_data.sh
38-
39-
.PHONY: data
40-
data: jzarr n5java pyn5 z5py zarr js xtensor_zarr zarrita
41-
42-
.PHONY: test
43-
44-
.PHONY: report
45-
report: data
46-
python test/test_read_all.py

0 commit comments

Comments
 (0)