bnprks / BPCells

Scaling Single Cell Analysis to Millions of Cells
https://bnprks.github.io/BPCells
Other
166 stars 17 forks source link

[r] add automatic website building #144

Closed immanuelazn closed 3 weeks ago

immanuelazn commented 1 month ago

Creates a PR to html-docs whenever something is pushed to main, and performs the website building workflow indicated in Wiki/Tool Development Workflows Title of PR is Update docs for commit: <most_recent_commit_message>

Message of PR is the git log of the most recent commit. I am open to changing this to something that better describes the changes to documentation. Example of how this would look can be found here. This PR was created as a result of pushing this commit into my personal BPCells main branch.

We can also make it perform an automatic push to html-docs, if that is preferred. We can also set this up to be a manually triggered workflow.

immanuelazn commented 3 weeks ago

Getting selective changes for vignettes was much more involved than anticipated. Apparently, we can't use pkgdown::build_articles() with the approach of renaming the non-changed files' extensions, as this breaks the linking to index. Additionally, using lazy=TRUE doesn't work with resetting git modification times off the box, as we use worktrees to build our website.

I decided to build the selective article rendering with using pkgdown::build_article(), and that seems to work! I also created a script that can manually be run, and redo's website building.

immanuelazn commented 3 weeks ago

Demo of the new build process:

immanuelazn commented 3 weeks ago

Some comments:

bnprks commented 3 weeks ago

This looks great! Should be very useful to help keep the docs site updated. Ready to merge from my perspective

For my own curiosity (we can discuss offline at some point)

immanuelazn commented 3 weeks ago

Ah so that is my bad, I read that you need to have all external packages in a seperate header in your DESCRIPTION file. I looked through a few public repos and I couldn't find any that actually imported bioc packages through the same website header. This thought process was incorrect, and manual testing shows that it does indeed work. Good catch! PR with full rebuild shown here