-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic vignettes #51
Changes from all commits
6c07110
d421197
e7455b1
c9083de
777f496
a891c02
bfb54bd
06eab70
52f9f73
309efd0
2f9dcb9
129c019
cbfff82
e4c7cbd
86a6101
9dbb692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
url: https://mrc-ide.github.io/hipercow | ||
|
||
template: | ||
bootstrap: 5 | ||
|
||
articles: | ||
- title: General | ||
navbar: General | ||
contents: | ||
- hipercow | ||
- hello | ||
- packages | ||
- troubleshooting | ||
- details | ||
|
||
- title: Advanced topics | ||
navbar: Advanced topics | ||
contents: | ||
- administration | ||
|
||
reference: | ||
- title: Get started | ||
desc: >- | ||
Probably the order you'll work through when starting a new | ||
hipercow project; create a new root, configure it, test that it | ||
works, and provision any packages you need. | ||
contents: | ||
- hipercow_init | ||
- hipercow_configure | ||
- hipercow_configuration | ||
- hipercow_hello | ||
- hipercow_provision | ||
|
||
- title: Tasks | ||
desc: >- | ||
Create and interact with tasks | ||
|
||
- subtitle: Creation | ||
contents: | ||
- task_create_explicit | ||
- task_create_expr | ||
- task_create_script | ||
- task_create_bulk_expr | ||
|
||
- subtitle: Interaction | ||
contents: | ||
- task_status | ||
- task_result | ||
- task_wait | ||
- task_cancel | ||
|
||
- subtitle: Logs | ||
contents: | ||
- task_log_show | ||
- task_log_value | ||
- task_log_watch | ||
|
||
- title: Environments | ||
desc: >- | ||
Environments are the collections of packages and functions that | ||
we construct on a cluster machine and evaluate your tasks | ||
within. These functions let you create, update and delete these | ||
environments. | ||
contents: | ||
- starts_with("hipercow_environment") | ||
|
||
- title: Windows support | ||
desc: >- | ||
Functions for use with the windows cluster | ||
contents: | ||
- starts_with("windows_") | ||
|
||
- title: Advanced | ||
desc: >- | ||
Just leave it alone. | ||
contents: | ||
- hipercow_driver | ||
- task_eval | ||
- task_submit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CRAN's | ||
DIDE | ||
HPC | ||
ICT | ||
R's | ||
RStudio | ||
Rmd | ||
Rtools | ||
ZScaler | ||
alloc | ||
chmod | ||
cli | ||
cli's | ||
codecov | ||
com | ||
conan | ||
config | ||
didehpc | ||
etc | ||
hipercow's | ||
io | ||
lifecycle | ||
lockfile | ||
macOS | ||
mountname | ||
mountpoint | ||
pkgdepends | ||
reestablished | ||
renv | ||
rfiglet | ||
rlang | ||
src | ||
std | ||
traceback | ||
xkcd |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.html | ||
*.R |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
title: "Administration" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{Administration} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
Are you reading the right manual? If you are not sure, you are probably not! | ||
|
||
# Rebuilding the bootstrap library | ||
|
||
Ensure that the packages have built and are on the r-universe; this might take a little while (it rebuilds once an hour). Check on the [builds page](https://mrc-ide.r-universe.dev/builds) to see if it has updated. | ||
|
||
Install your own copy of hipercow as usual (you'll need `hipercow.windows` and `conan2` but these will be installed on use if you don't have them already). | ||
|
||
```r | ||
install.packages( | ||
"hipercow", | ||
repos = c("https://mrc-ide.r-universe.dev", "https://cloud.r-project.org")) | ||
``` | ||
|
||
Set your working directory to anywhere on a network share (home drives are fine for this). | ||
|
||
Trigger building the bootstrap with: | ||
|
||
```r | ||
library(hipercow) | ||
hipercow_init(".") | ||
|
||
for (version in c("4.2.3", "4.3.0")) { | ||
hipercow_configure("windows", r_version = version) | ||
hipercow.windows:::bootstrap_update() | ||
} | ||
``` | ||
|
||
# Testing a copy of hipercow on the cluster | ||
|
||
If you want to test a copy of hipercow on the cluster, you need to install a specific version of it somewhere it will be picked up. The simplest way of doing this is to install everything into a new bootstrap environment. | ||
|
||
Create a new development bootstrap library by running (as above, from a network location): | ||
|
||
```r | ||
hipercow::hipercow_init(".") | ||
hipercow::hipercow_configure("windows", r_version = "4.3.0") | ||
hipercow.windows:::bootstrap_update(development = "mrc-4827") | ||
``` | ||
|
||
Now you can use your new version, after setting the option `hipercow.development = TRUE`: | ||
|
||
``` | ||
library(hipercow) | ||
hipercow_init(".", "windows", r_version = "4.3.0") # needs to match above | ||
options(hipercow.development = TRUE) | ||
id <- task_create_expr(sessionInfo()) | ||
task_status(id) | ||
task_log_show(id) | ||
task_status(id) | ||
task_result(id) | ||
``` | ||
|
||
It is assumed that you have the development version installed locally yourself, which is likely the case. | ||
|
||
# Recreating the vignettes | ||
|
||
These need to be run in a network share so set an environment variable like | ||
|
||
``` | ||
HIPERCOW_VIGNETTE_ROOT=/path/to/share | ||
``` | ||
|
||
in your `.Renviron` indicating where we should work. We'll make lots of directories here. I'm still working on a nice way of unlocking the password automatically for non-windows use though, but things work fine within an interactive session at least. | ||
|
||
Each vignette can be built by running (ideally in a fresh session with the working directory as the package root) | ||
|
||
``` | ||
keyring::keyring_unlock() | ||
knitr::knit("vignettes_src/hello.Rmd", "vignettes/hello.Rmd") | ||
knitr::knit("vignettes_src/hipercow.Rmd", "vignettes/hipercow.Rmd") | ||
knitr::knit("vignettes_src/packages.Rmd", "vignettes/packages.Rmd") | ||
knitr::knit("vignettes_src/troubleshooting.Rmd", "vignettes/troubleshooting.Rmd") | ||
``` | ||
|
||
which generates a dummy Rmd file within vignettes/ for each version of the real vignette in `vignettes_src/` | ||
|
||
You may want to run `options(hipercow.development = TRUE)` to build using the development versions (see above). | ||
|
||
On the command line, `make vignettes` will run through all vignettes, but this seems to only work on some versions of make. | ||
|
||
# Installing Rtools | ||
|
||
(TODO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should talk about R versions somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a section now in Details