Skip to content

Commit ffde7c2

Browse files
committed
Merge branch 'master' into vimc-4912_calculate_impact
2 parents 5d762da + 0c7fb5e commit ffde7c2

13 files changed

+2454
-8
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
^\.Rproj\.user$
88
^TODO.md$
99
^.github$
10+
^vignettes_src$

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ docs
44
.Rhistory
55
.DS_Store
66
.idea
7+
vignettes_src/*.md
8+
vignettes_src/*.html

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Imports:
2323
vaultr
2424
Suggests:
2525
ggplot2,
26+
htmltools,
2627
knitr,
2728
mockery,
2829
testthat,

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,12 @@ pkgdown:
3636
website: pkgdown
3737
./scripts/update_web.sh
3838

39+
vignettes/internal-impact.Rmd: vignettes_src/internal-impact.Rmd
40+
./scripts/build_impact_vignette
41+
42+
vignettes: vignettes/using-vimpact.Rmd vignettes/vignette.Rmd
43+
${RSCRIPT} -e 'tools::buildVignettes(dir = ".")'
44+
mkdir -p inst/doc
45+
cp vignettes/*.html vignettes/*.Rmd inst/doc
46+
3947
.PHONY: all test document install vignettes

man/calculate_impact.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_burden_estimate_set_ids.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_coverage_data.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build_impact_vignette

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
# We can't run the internal-impact vignette on a computer that doesn't
3+
# have access to montagu DB (including CI) so we pre-compile it
4+
# ocassinally here. The version in vignettes_src should be edited,
5+
# then this script run to create the version in vignettes
6+
(cd vignettes_src && Rscript -e 'knitr::knit("internal-impact.Rmd")')
7+
header="DO NOT EDIT THIS FILE - see vignettes_src and make changes there"
8+
widget=' \
9+
```{r} \
10+
htmltools::tags$iframe( \
11+
src = "impact_comparisons.html", \
12+
width = "100%", \
13+
height = "400", \
14+
scrolling = "no", \
15+
seamless = "seamless", \
16+
frameBorder = "0", \
17+
`data-external` = "1" \
18+
)\
19+
```'
20+
sed -s 's/[[:space:]]*$//' vignettes_src/internal-impact.md |
21+
sed 's/\r//g' |
22+
sed "s/HEADER/$header/" |
23+
sed "s/<!-- WIDGET -->/$widget/" > vignettes/internal-impact.Rmd
24+
cp vignettes_src/impact_comparisons.html vignettes/impact_comparisons.html

vignettes/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.html
2+
!impact_comparisons.html
23
*.R

0 commit comments

Comments
 (0)