Skip to content

manual: SpaDES.docs 0.2.0 stages chapters under the book root - #171

Closed
achubaty wants to merge 1 commit into
targetsfrom
ci/spades-docs-0.2.0-staging-targets
Closed

achubaty wants to merge 1 commit into
targetsfrom
ci/spades-docs-0.2.0-staging-targets

Conversation

@achubaty

Copy link
Copy Markdown
Collaborator

Draft — the manual has not been tackled on this branch yet. Groundwork.

SpaDES.docs 0.2.0 writes the generated <module>2.Rmd to a staging directory under the book root (_manual_rmds) instead of into each module's own directory, so _bookdown.yml has to list them from there.

Why the change was made upstream

The module directories are git submodules. Before this, a build wrote into 10 separate repositories, a failed build left a <module>2.Rmd in each one, and every module repo carries a .gitignore line to hide it. Each generated file also embedded an absolute host path.

There were 11 such files sitting in this repo's modules/ when the work started; they have been cleared.

This PR

file change
manual/_bookdown.yml 10 chapters ../modules/<M>/<M>2.Rmd → _manual_rmds/<M>2.Rmd
manual/.gitignore _manual_rmds/
manual/build.R cleanup is now unlink("_manual_rmds", recursive = TRUE)
DESCRIPTION SpaDES.docs (== 0.0.1.9002) → (== 0.2.0); Remotes → @v0.2.0

Verified upstream that this does not change the rendered book: the same chapters rendered from both locations produce byte-identical HTML, including relative images, cross-references and citations.

This branch makes it simpler than it would have been on development

development pins r-version: 4.2.3, and SpaDES.docs 0.2.0 needs R ≥ 4.3 — so migrating there would have required an R bump that invalidates the renv library. This branch is already on R 4.6.1, so that problem does not arise.

Still needs you

renv.lock pins SpaDES.docs 0.0.1.9002 at 757c320. Updating it means

renv::install("PredictiveEcology/SpaDES.docs@v0.2.0", lock = TRUE, prompt = FALSE)

which writes to the shared project library, so it is not done here. This PR and that install must land together — 0.0.1.9002 writes chapters where the new _bookdown.yml no longer looks, and 0.2.0 writes where the old one no longer looks.

Also in 0.2.0

Fixes this book benefits from: _bookdown.yml is parsed as YAML rather than by indentation; a module with no setup chunk no longer aborts the whole book; and a (ref:key) used mid-paragraph is no longer mistaken for a duplicate definition and deleted — Biomass_core.Rmd:612 has exactly one of those.

🤖 Generated with Claude Code

0.2.0 writes the generated <module>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) <noreply@anthropic.com>
@achubaty

Copy link
Copy Markdown
Collaborator Author

Superseded by #172, which landed the same _bookdown.yml staging change (byte-identical hunk), the same manual/.gitignore entry, and a more general build.R cleanup. The DESCRIPTION bump this PR carried was not lost: #172 pins SpaDES.docs 0.4.0 in both DESCRIPTION and renv.lock.

@achubaty achubaty closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant