-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (39 loc) · 1.69 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
## tell make where to look for targets and dependencies
## vpath %.jl testFiles
vpath %.ipynb julia:basic_statistics:worldBankData
vpath %.jl julia:basic_statistics:worldBankData
## list of targets
JL_FILES := iterators_comprehensions_and_map.jl \
julia_features.jl \
NA_missing_observations.jl
CURRENT := dynAssMgmt/dynamic_asset_management.jl
# path to tested notebook files
NBS_PATH := $(HOME)/research/ijuliaNb
DOCK_STABLE := juliafinmetrix/jfinm_stable
DOCK_DEV := juliafinmetrix/jfinm_stable
DOCK_HOME := /home/jovyan
DOCK_MOUNT := $(DOCK_HOME)/mount
default: current_stable
current_local: $(CURRENT)
julia -e 'cd("testFiles"); include("$<"); cd("..")'
current_stable: $(CURRENT)
docker run --rm -v $(NBS_PATH):$(DOCK_MOUNT) -w $(DOCK_MOUNT)/testFiles $(DOCK_STABLE) julia -e 'include("$<")'
current_dev: $(CURRENT)
docker run --rm -v $(NBS_PATH):$(DOCK_MOUNT) -w $(DOCK_MOUNT)/testFiles $(DOCK_DEV) julia -e 'include("$<")'
test_local: $(JL_FILES)
julia -e 'cd("test"); include("runall.jl")'
test_stable: $(JL_FILES)
docker run --rm -v $(NBS_PATH):$(DOCK_MOUNT) -w $(DOCK_MOUNT)/test $(DOCK_STABLE) julia -e 'include("runall.jl")';
test_dev: $(JL_FILES)
docker run --rm -v $(NBS_PATH):$(DOCK_MOUNT) -w $(DOCK_MOUNT)/test $(DOCK_DEV) julia -e 'include("runall.jl")';
INFO_TEXT := make allows testing with three different versions: local Julia version \(default\), jfinm_stable and jfinm_dev. In any case, make first converts all listed notebook files to julia files in directory testFiles/.
info:
echo $(INFO_TEXT) \
& echo \
& echo
CONVERTED_AND_MOVED:
clean:
cd testFiles; rm *; cd -
%.jl: %.ipynb clean
jupyter nbconvert --to python $<; \
mv $(basename $(<D)/$(<F)).py testFiles/$(*F).jl