-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (32 loc) · 1.03 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
CHANNELS = $(addprefix -c ,$(shell tr '\n' ' ' <$(RECIPE_DIR)/channels)) -c local
METAJSON = $(RECIPE_DIR)/meta.json
RECIPEFILES = $(addprefix $(RECIPE_DIR)/,conda_build_config.yaml meta.yaml)
TARGETS = devshell env format lint meta package test typecheck unittest
export RECIPE_DIR := $(shell cd ./recipe && pwd)
spec = $(call val,name)$(2)$(call val,version)$(2)$(call val,$(1))
val = $(shell jq -r .$(1) $(METAJSON))
.PHONY: $(TARGETS)
all:
$(error Valid targets are: $(TARGETS))
devshell:
condev-shell || true
env: package
conda create -y -n $(call spec,buildnum,-) $(CHANNELS) $(call spec,build,=)
format:
@echo "=> Running formatters"
black src
isort src
cd src && docformatter . || test $$? -eq 3
lint:
recipe/run_test.sh lint
meta: $(METAJSON)
package: meta
conda build $(CHANNELS) --error-overlinking --override-channels $(RECIPE_DIR)
test:
recipe/run_test.sh
typecheck:
recipe/run_test.sh typecheck
unittest:
recipe/run_test.sh unittest
$(METAJSON): $(RECIPEFILES) src/iotaa/resources/info.json
condev-meta