Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves the Python documentation from
/reference
to/reference/python
and adds/reference/r
with the R package documentation.Building the package docs is a bit bespoke:
We use
tools::pkg2HTML()
, a function new to R in 4.4.1. This function generates a single-page HTML document for a package.We then do a few back-and-forth transformations with the HTML to commonmark and back, with some mucking around with the HTML via
rvest
andxml2
to remove unneeded nodes and generally clean things up.In the end, we create a single page for each function. We then re-use the Python reference listing, but replace "Python" with "R". If the packages diverge, we could easily write
reference/r/index.qmd
by hand.I updated the Makefile to track all these bits:
Ideally we'd add redirects for the pages I moved from
reference/*.qmd
toreference/python/*.qmd
, but the package is young and those files are written automatically by quartodoc; I don't think it's worth it.I did think it was worth adding a page at
reference/
(which isn't linked to from anywhere) that gives anyone who lands there two cards to pick between the R and Python references.Finally, I also renamed
quarto/
todocs/
. It's a more immediately clear name and I think a better practice for these multilingual monorepos.