SpaDES.docs 0.3.0
Six new exported functions, promoted out of the manuals that were carrying near-identical copies of them, and a warning for the one failure mode that was silent.
The manuals' shared build code, promoted
fireSenseManual and LandR-Manual had near-identical build scripts -- their install.R files were byte-identical apart from comment wording. Four of these encode a defect that actually broke a build, so the fix now lives in one place with a test rather than as a comment copied between repositories.
collapseModuleBibs()merges the modules'references_*.bibfiles into the single bibliography bookdown wants, skipping files with no entries. A module that cites nothing yet ships a comments-only.bib, andRefManageR::ReadBib()fails on it -- enough to take down a whole manual over one placeholder.installModulePkgs()installs the packages a manual's modules declare, or withinstall = FALSEresolves the list without installing. It assigns the list before installing rather than piping it, becauseRequire::Install()callssubstitute()on its first parameter, so a piped expression asks the installer for a package literally calledpackages.stagePagesFiles()writes.nojekyll, and optionallyCNAME, into the rendered book directory. A deploy publishes the contents of that directory, so these never reach the site if written to the repository root.archiveManualPDF()copies a rendered PDF to a versioned name, and does nothing when no PDF was produced. It also refuses an empty version, sinceSys.getenv()of an unset variable is""and would archive<name>-v.pdfover the previous build.manualPaths()resolves a manual's root, rendered book,citationsandfiguresdirectories from_bookdown.yml. It errors rather than guessing whenoutput_diris unset, because guessing renders the book somewhere the deploy does not look.writePkgBib()anddownloadCSL()cover the remaining boilerplate.
RefManageR, rprojroot and SpaDES.core are Suggests, guarded at runtime, so none becomes a hard dependency.
prepManualRmds()
Now warns in both directions. It already warned when _bookdown.yml listed a chapter that was not prepared; the reverse was dropped silently, so a prepared-but-unlisted chapter was written, built cleanly, and was simply absent from the book. That barely mattered while every manual took its modules from git submodules, and stops being safe once a manual takes its module list from somewhere else.
Documentation
The vignette is now two, split by how a manual treats its modules:
- Building a project manual -- pins them, so the manual agrees with the results it describes (LandWeb).
- Building a continuously updated manual -- tracks them, so a documentation fix reaches the published site on its own (fireSenseManual, LandR-Manual).
Both worked examples use the functions above.
Also
Re-documented with roxygen2 8.1.0, in its own commit: no .Rd changes, and the NAMESPACE directives are identical before and after.