Skip to content

Commit f635ab8

Browse files
committed
Use Makefile patterns
1 parent ffb6e40 commit f635ab8

File tree

2 files changed

+11
-42
lines changed

2 files changed

+11
-42
lines changed

Makefile

+9-40
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
IMPLEMENTATIONS=$(wildcard implementations/*)
22

3-
43
ifeq ($(TEST),)
54
# If TEST is not set, by default build everything, generate
65
# data for all implementations, and then run all pytests.
@@ -10,53 +9,23 @@ test: data
109
pytest -v -k W
1110

1211
else
13-
# Otherwise, focus on a single implementation.
12+
# Otherwise, focus on a single implementation, only generating
13+
# its data and using the "-k W-" keyword to limit which pytests
14+
# get run
1415

1516
.PHONY: test
16-
test: $(TEST)
17-
pytest -v -k $(TEST)
17+
test: implementations/$(TEST)
18+
pytest -v -k W-$(TEST)
1819

1920
endif
2021

2122
data/reference_image.png:
2223
python generate_reference_image.py
2324

25+
.PHONY: $(IMPLEMENTATIONS)
26+
implementations/%: data/reference_image.png
27+
bash $^/driver.sh
28+
2429
.PHONY: report
2530
report: data
2631
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
35-
36-
.PHONY: implementations/n5java
37-
implementations/n5java: data/reference_image.png
38-
bash implementations/n5-java/generate_data.sh
39-
40-
.PHONY: implementations/pyn5
41-
implementations/pyn5: data/reference_image.png
42-
python implementations/generate_pyn5.py
43-
44-
.PHONY: implementations/z5py
45-
implementations/z5py: data/reference_image.png
46-
python implementations/generate_z5py.py
47-
48-
.PHONY: implementations/zarr-python
49-
implementations/zarr-python: data/reference_image.png
50-
python implementations/generate_zarr.py
51-
52-
.PHONY: implementations/zarrita
53-
implementations/zarrita: data/reference_image.png
54-
python implementations/generate_zarrita.py
55-
56-
.PHONY: implementations/js
57-
implementations/js: data/reference_image.png
58-
bash implementations/js/generate_data.sh
59-
60-
.PHONY: implementations/xtensor_zarr
61-
implementations/xtensor_zarr: data/reference_image.png
62-
bash implementations/xtensor_zarr/generate_data.sh

test/test_read_all.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def create_params():
220220
if write_attrs:
221221
write_attrs = ' (' + write_attrs + ')'
222222
ids.append(
223-
f"read {writing_library}{write_attrs} {fmt} using "
224-
f"{reading_library}, {codec}"
223+
f"W-{writing_library}{write_attrs} {fmt}_R-"
224+
f"{reading_library}_{codec}"
225225
)
226226
return argnames, params, ids
227227

0 commit comments

Comments
 (0)