gert::git_commit_all("Commit current changes")3 Containerizing and Publishing against specific Bioconductor release versions
3.1 For a {BiocBook} package not currently in Bioconductor
One can build against older Bioconductor releases as follows:
- Commit current changes before switching branches (should be in
develbranch)
- Create a new branch named
RELEASE_X_Yand checkout
gert::git_branch_create("RELEASE_3_17")- Push local
RELEASE_X_Yto Github
gert::git_push()
3.2 For a {BiocBook} package accepted in Bioconductor > 6 months ago
Once your package is accepted in Bioconductor, your repository will have access to a new remote named upstream, pointing to git@git.bioconductor.org. When Bioconductor releases a new version, your package will change version on the upstream remote, in a dedicated release branch RELEASE_X_Y. All details are available here.
To generate a Docker image and a version of the BiocBook website built on new Bioconductor releases, you can:
- Add the
Bioconductorremote to your local repository (this might already be set up)
gert::git_remote_add(name = 'upstream', url = 'git@git.bioconductor.org:packages/<YOUR-REPOSITORY>.git')- Create a new local
RELEASE_X_Ybranch
gert::git_branch_create("RELEASE_3_15")- Pull the
upstreamRELEASE_X_Ycommits
gert::git_pull("RELEASE_3_15", remote = "upstream")- Push the local
RELEASE_X_Ybranch tooriginremote (your own Github repository)
gert::git_push("RELEASE_3_15", remote = "origin")3.3 Serving the book to AI assistants
Each version of a BiocBook also serves an llms.txt file (e.g. devel/llms.txt), following the llms.txt proposal: a Markdown index of the book that AI assistants can read instead of crawling its HTML pages. It links to a Markdown copy of every page, e.g. pages/Chapter-4.llms.md next to pages/Chapter-4.html.
-
quarto>= 1.11 writes these files when the book’sllms-txtoption is on. Books created from template >= 1.1.0 switch it on through thellmsquartoprofile (inst/_quarto-llms.yml), whichvignettes/Makefileactivates whenever the installedquartosupports it (older versions reject the option). ThebiocbookGitHub workflow pins such aquartowith itsQUARTO_VERSIONsetting, and copies built by Bioconductor get these files once the Bioconductor builders runquarto>= 1.11. - After every render,
inst/assets/post-render.RcallsBiocBook::enrich_llms_txt(), which adds what an assistant needs to run the book’s code tollms.txt: the book package and its version, how to install it, itsDockerimage, itspythonenvironment and where the other versions of the book live. With an olderquarto, it writes a minimalllms.txtlisting the chapters.
To render these files locally:
bash
QUARTO_PROFILE=llms quarto render inst/3.4 Session info
sessioninfo::session_info()