From 87621c27303c478878d93394a97be8e13eca8f1f Mon Sep 17 00:00:00 2001 From: Alex Chubaty Date: Fri, 18 Sep 2026 00:56:03 -0600 Subject: [PATCH] manual: SpaDES.docs 0.2.0 stages chapters under the book root 0.2.0 writes the generated 2.Rmd to a staging directory under the book root instead of into each module's own directory, so _bookdown.yml lists them from there. The module directories are git submodules, so before this a build wrote into 10 separate repositories, a failed build left a file in each, and every module repo carried a .gitignore line to hide it. Each generated file also embedded an absolute host path. Cleanup is now removing one directory. renv.lock still pins SpaDES.docs 0.0.1.9002; it needs renv::install("PredictiveEcology/SpaDES.docs@v0.2.0", lock = TRUE, prompt = FALSE), not run here because it writes to the shared project library. This branch's R 4.6.1 already satisfies 0.2.0's R >= 4.3 requirement. Co-Authored-By: Claude Opus 5 (1M context) --- DESCRIPTION | 4 ++-- manual/.gitignore | 3 +++ manual/_bookdown.yml | 20 ++++++++++---------- manual/build.R | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 658708f2..17750037 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -379,7 +379,7 @@ Imports: sp (== 2.2-1), SpaDES.config (== 1.0.7.9004), SpaDES.core (== 3.1.2.9016), - SpaDES.docs (== 0.0.1.9002), + SpaDES.docs (== 0.2.0), SpaDES.project (== 1.0.1.9364), SpaDES.tools (== 2.1.2), SparseGrid (== 0.8.2), @@ -480,7 +480,7 @@ Remotes: PredictiveEcology/Require@0473223cdf73c1a8da6d8ec3a7e3b12b0cbb0da3, PredictiveEcology/SpaDES.config@4cfb472340bf2c7dffb13b50647909134304f6b1, PredictiveEcology/SpaDES.core@03157570ef4560b7d1503f9bdbead3cd62545560, - PredictiveEcology/SpaDES.docs@757c320e8cf1537c8e50a2032241d05a87f3e0b9, + PredictiveEcology/SpaDES.docs@v0.2.0, PredictiveEcology/SpaDES.project@a77288bf9cce81bd7cd92ef9c6f92e21cfebbd84, PredictiveEcology/SpaDES.tools@7f06f55a26f41b83e1a2d48f7572bfe0f33aace9, r-lib/remotes@6c988cca5d5dc10f0825eb36872360618238539a, diff --git a/manual/.gitignore b/manual/.gitignore index 798873d5..9233e616 100644 --- a/manual/.gitignore +++ b/manual/.gitignore @@ -4,3 +4,6 @@ libs/ LandWeb_manual_files/ LandWeb_manual.Rmd !tables/* + +## generated chapters (SpaDES.docs::prepManualRmds) +_manual_rmds/ diff --git a/manual/_bookdown.yml b/manual/_bookdown.yml index 2939ab6c..cf5cdcda 100644 --- a/manual/_bookdown.yml +++ b/manual/_bookdown.yml @@ -12,22 +12,22 @@ rmd_files: - 01-getting-started.Rmd - 02-running-landweb.Rmd - 03-section-study-areas.Rmd - - ../modules/LandWeb_preamble/LandWeb_preamble2.Rmd + - _manual_rmds/LandWeb_preamble2.Rmd - 04-section-vegetation-submodel.Rmd - - ../modules/Biomass_speciesFactorial/Biomass_speciesFactorial2.Rmd - - ../modules/Biomass_speciesParameters/Biomass_speciesParameters2.Rmd - - ../modules/Biomass_speciesData/Biomass_speciesData2.Rmd - - ../modules/Biomass_borealDataPrep/Biomass_borealDataPrep2.Rmd - - ../modules/Biomass_core/Biomass_core2.Rmd - - ../modules/Biomass_regeneration/Biomass_regeneration2.Rmd + - _manual_rmds/Biomass_speciesFactorial2.Rmd + - _manual_rmds/Biomass_speciesParameters2.Rmd + - _manual_rmds/Biomass_speciesData2.Rmd + - _manual_rmds/Biomass_borealDataPrep2.Rmd + - _manual_rmds/Biomass_core2.Rmd + - _manual_rmds/Biomass_regeneration2.Rmd - 05-section-fire-submodel.Rmd - - ../modules/LandMine/LandMine2.Rmd + - _manual_rmds/LandMine2.Rmd - 06-section-model-outputs.Rmd - - ../modules/burnSummaries/burnSummaries2.Rmd + - _manual_rmds/burnSummaries2.Rmd ## NRV_summary supersedes the retired LandWeb_output / timeSinceFire / LandWeb_summary modules, ## whose chapters were removed here (their module dirs no longer exist, so prepManualRmds() could ## not generate them and the build failed). - - ../modules/NRV_summary/NRV_summary2.Rmd + - _manual_rmds/NRV_summary2.Rmd - 07-section-web-app.Rmd - 08-section-modifying-landweb.Rmd - 99-references.Rmd diff --git a/manual/build.R b/manual/build.R index 52387d32..0208a7c6 100644 --- a/manual/build.R +++ b/manual/build.R @@ -79,5 +79,5 @@ withr::with_dir(normalizePath(manDir), { file.copy(from = dirname(pdfArchiveDir), to = docsDir, recursive = TRUE) ## remove temporary .Rmds - file.remove(.copyModuleRmds) + unlink("_manual_rmds", recursive = TRUE) })