Closed aaronwolen closed 7 years ago
wow. what sort of wizardry is this? It took me longer to write all the documentation files than it did to create the data. This is great. Two things on reviewing:
document_annotable()
doesn't yet exist. Map(document_annotable, recipes, names(recipes), type = "gene")
Error in system.file("inst/templates", paste0(type, ".R"), package = "annotables", :
no file found
Whoops, that's my fault. The problem is document_annotable()
is actually an annotables function so the annotables package needs to be loaded for it to work (sourcing utils.R won't be sufficient).
I didn't hit this error because I was using devtools to load the package (devtools::load_all()
, or ⌘+shift+L in Rstudio) before running the script.
In short, we can fix this by updating build-annotables.R to include devtools::load_all()
or assume an updated annotables is installed and add library(annotables)
.
I believe the latter is the less janky solution.
slick. merged, and added the load_all in 54b18cd5213cba6b3b87c47e03c71f16cb22746c
Manually writing/updating documentation files... are we animals? 😉
This adds a (unexported) function,
document_annotable()
, that uses mustache-based templates (located ininst/templates
) and annotable recipes to generate R scripts inR/
containing (hopefully) all relevant documentation info for a table.Note, this adds whisker as a suggested dependency.