-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (42 loc) · 1.14 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
default: install
build:
R CMD build .
FLAGS:=
CPPFLAGS:=
CXXFLAGS:=
install: exports
R CMD INSTALL --configure-args='CPPFLAGS="$(FLAGS) $(CPPFLAGS)" CXXFLAGS="$(FLAGS) $(CXXFLAGS)"' .
check:
R CMD build .
R CMD check transitr_*
document:
R -e "devtools::document()"
FILTER ?= ".+"
test:
R -e "devtools::load_all(); devtools::test(filter=\"${FILTER}\")"
clean:
./cleanup
DEBUG ?= ""
ifeq ($(DEBUG), "")
Rcmd = R
else
Rcmd = R -d "$(DEBUG)"
endif
run:
$(Rcmd) --slave -f scripts/run_model.R
startserver:
cd simulations && yarn start &
SIM ?= sim000
simulation:
$(Rcmd) --slave -f scripts/run_simulation.R --args $(SIM)
view:
R --slave -f scripts/track_simulations.R
coverage:
R -e "covr::report()"
exports:
R -e "Rcpp::compileAttributes()"
DRY?=n
syncSims:
rsync -avP$(DRY) --delete --exclude="sim1*" --exclude="sim0*" --exclude node_modules --exclude="*.zip" [email protected]:/data/transitr/simulations/ simulations
simprogress:
@tail -n 1 simulations/$(SIM)/eta_state.csv | xargs -I{} R --slave -e "as.POSIXct(read.csv(textConnection(commandArgs(trailing=TRUE)[1]), header=F)[[3]], origin='1970-01-01')" --args {}