Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
143 lines (113 loc) · 5.21 KB
/
Copy pathMakefile
File metadata and controls
143 lines (113 loc) · 5.21 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
SHELL=bash
## Globbed rather than listed by hand, so that added, renamed, and removed
## pages are picked up automatically. '?=' keeps this lazily expanded, so a
## generated blog.qmd is included as long as it exists by the time it is used.
FILES ?= $(wildcard *.qmd) $(wildcard now/*.qmd) $(wildcard roadmap/*.qmd)
PACKAGES ?= doFuture future futurize future.apply future.batchtools future.callr future.mirai future.mapreduce future.p2p future.tests future.tools futureverse globals listenv marshal parallelly progressify progressr rw
DOMAIN ?= futureverse.org
all: spell build
update_extensions:
quarto update extension shafayetShafee/bsicons
quarto update extension EmilHvitfeldt/timeline
quarto update extension r-wasm/quarto-live
spell:
hunspell -H $(FILES)
blog: blog.qmd
blog.qmd: blog.qmd.rsp
Rscript -e R.rsp::rfile "$<" --postprocess=FALSE
build: blog
module try-load pandoc quarto; \
quarto render
preview:
quarto preview
view:
xdg-open docs/index.html
stats: stats-revdep-over-time stats-parallel-frameworks stats-parallel-paradigms \
stats-parallel-families stats-parallel-hard-vs-soft \
stats-downloads stats-parallel-downloads
## Takes 5-15 minutes to download if starting out fresh
stats-revdep-over-time:
@Rscript -e "if (!requireNamespace('revdepcheck.extras', quietly = TRUE)) remotes::install_github('HenrikBengtsson/revdepcheck.extras')"
R_PROGRESSR_ENABLE=true Rscript R/revdep_over_time.R
## Takes ~5 minutes to download if starting out fresh
stats-parallel-frameworks:
@Rscript -e "pkgs <- c('readr', 'jsonlite', 'tidyr', 'ggrepel', 'scales'); avail <- sapply(pkgs, requireNamespace, quietly = TRUE); pkgs <- pkgs[!avail]; if (length(pkgs) > 0) install.packages(pkgs)"
R_PROGRESSR_ENABLE=true Rscript R/parallel_frameworks_over_time.R
## Shares the CRAN snapshot cache with stats-parallel-frameworks
stats-parallel-paradigms:
R_PROGRESSR_ENABLE=true Rscript R/parallel_paradigms_over_time.R
## Shares the CRAN snapshot cache with stats-parallel-frameworks
stats-parallel-families:
R_PROGRESSR_ENABLE=true Rscript R/parallel_families_over_time.R
## Reuses the weekly download cache built by stats-downloads
stats-parallel-downloads:
R_PROGRESSR_ENABLE=true Rscript R/parallel_families_downloads_over_time.R
## Shares the CRAN snapshot cache with stats-parallel-frameworks
stats-parallel-hard-vs-soft:
R_PROGRESSR_ENABLE=true Rscript R/parallel_hard_vs_soft_over_time.R
## Takes ~5 hours to download and compute if starting out fresh
stats-downloads:
@Rscript -e "pkgs <- c('cranlogs', 'readr', 'ISOweek'); avail <- sapply(pkgs, requireNamespace, quietly = TRUE); pkgs <- pkgs[!avail]; install.packages(pkgs)"
R_PROGRESSR_ENABLE=true Rscript R/cran_stats.R
stats-revdep:
Rscript -e "if (!requireNamespace('revdepcheck.extras')) remotes::install_github('HenrikBengtsson/revdepcheck.extras')"
R_PROGRESSR_ENABLE=true Rscript R/revdep.R
images/favicon.ico: images/logo.png
cd $(<D); \
convert $(<F) -resize 256x256 -transparent white favicon-256.png; \
convert favicon-256.png -resize 16x16 favicon-16.png; \
convert favicon-256.png -resize 32x32 favicon-32.png; \
convert favicon-256.png -resize 64x64 favicon-64.png; \
convert favicon-256.png -resize 128x128 favicon-128.png; \
convert favicon-16.png favicon-32.png favicon-64.png favicon-128.png favicon-256.png -colors 256 $(@F)
## INSTRUCTIONS:
## 1. Download first slide of Google Slides 'futureverse.org-site_preview_text' as a PNG (https://docs.google.com/presentation/d/1IE6--kN7ZrLutcroxvUrtu-2Fnr139iELN6R6fbwkeE/edit#slide=id.p)
## 2. Move file to images/
## 3. Call 'make site_preview'
site_preview: images/site_preview.png
images/site_preview.png: images/logo.png images/futureverse.org-site_preview_text.png
tf1=$$(mktemp --suffix=.png); \
tf2=$$(mktemp --suffix=.png); \
tf3=$$(mktemp --suffix=.png); \
convert "$(word 2,$^)" -trim "$$tf1"; \
h=$$(identify -format "%[fx:h]" "$$tf1") ;\
convert "$<" -trim -resize "x$${h}" "$$tf2"; \
montage "$$tf2" "$$tf1" -tile 2x1 -geometry +30+30 "$$tf3"; \
montage "$$tf3" -geometry 1200x628 "$$tf1"; \
mv "$$tf1" "$@"; \
rm "$$tf2" "$$tf3"
pkgdown-refresh:
@source ~/.bashrc.d/interactive=true/git-rpkgs.sh; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; pkgdown_refresh); \
done
pkgdown-build: pkgdown-ymlrsp
@export R_PROGRESSR_DEMO_DELAY=0; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; Rscript -e pkgdown.extras::build_site); \
done
pkgdown-deploy:
@source ~/.bashrc.d/interactive=true/git-rpkgs.sh; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; pkgdown_deploy) \
done
pkgdown-cname:
@for pkg in $(PACKAGES); do \
printf "Package $$pkg: "; \
(cd "../$${pkg}"; echo "$$pkg.$(DOMAIN)" > docs/CNAME) \
done
pkgdown-favicon:
@for pkg in $(PACKAGES); do \
if [ ! -d "../$$pkg/pkgdown/favicon" ]; then \
cp -R ".pkgdown/favicon" "../$$pkg/pkgdown/favicon"; \
(cd "../$$pkg"; git add "pkgdown/favicon/"; git commit pkgdown/favicon -m "pkgdown: add favicon"; git push); \
fi; \
done
pkgdown-ymlrsp: .pkgdown/_pkgdown.yml.rsp
for pkg in $(PACKAGES); do \
mkdir -p "../$$pkg/pkgdown"; \
cp "$<" "../$$pkg/pkgdown/_pkgdown.yml.rsp"; \
done