Skip to content

docs: Derive README.md from a README.Rmd - #565

Merged
krlmlr merged 18 commits into
mainfrom
claude/readme-rmd
Nov 28, 2026
Merged

krlmlr merged 18 commits into
mainfrom
claude/readme-rmd

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

The hand-written README.md kept this package out of the shared rendering pipeline. This PR adds a README.Rmd copied from it verbatim, prefixed with the output: cynkratemplate::readme_document front matter and the canonical generated-file comment, and re-renders with cynkratemplate::render_readme().

Rendering also writes index.md for pkgdown — the README.md without the code-of-conduct footer. Both README.Rmd and index.md are added to .Rbuildignore; R CMD build plus tar tzf confirms the tarball ships only README.md.

The rendered README.md differs from the hand-written one only in pandoc's gfm normalisations:

No word or code-block content changes, and every URL that was there is unchanged. No evaluated chunks were added — this is a faithful derivation, not new content.

Rendered twice with the current cynkratemplate, the second time in a differently named directory with another time zone and locale, both outputs are byte-identical to the committed file, and a further render changes nothing. The DBI article links resolve through DBI, which this package imports, so CI has what it needs to produce them. With README rendering in CI becoming the default, this is what CI will produce.

Stacking

This derivation logically belongs below the line-break work, but it is stacked on top of claude/readme-goals to avoid rewriting and force-pushing every branch in the open chain across four repositories.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m

@krlmlr
krlmlr force-pushed the claude/readme-goals branch from e839e0e to 5c7c58c Compare September 13, 2026 16:16
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from 5c7c58c to 28ac88d Compare September 13, 2026 16:30
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from 28ac88d to ed0a3fb Compare September 13, 2026 16:57
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from ed0a3fb to a504f7c Compare September 13, 2026 18:24
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from a504f7c to 5496d3f Compare September 13, 2026 18:37
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from 5496d3f to 41b1f4c Compare September 13, 2026 20:07
@krlmlr
krlmlr force-pushed the claude/readme-rmd branch 2 times, most recently from f006220 to 873b6b2 Compare September 13, 2026 20:30
@krlmlr
krlmlr added this pull request to stack #567 September 13, 2026 20:40
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from 41b1f4c to 73191bb Compare September 13, 2026 21:22
@krlmlr
krlmlr force-pushed the claude/readme-goals branch from 9dae5cf to 2eb8ea1 Compare September 13, 2026 21:42
krlmlr and others added 2 commits September 14, 2026 07:36
Scope drawn from the Title and Description in DESCRIPTION, the README's
own statement that the package is primarily useful for backend
developers, the vignette on incremental and external testing including
the note that not all tests can be satisfied, the tweaks() and skip
arguments, and the roxygen "Specification" sections in R/spec-*.R that
DBI inherits into its own help pages.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The hand-written `README.md` keeps the package out of the shared rendering pipeline,
so this adds a `README.Rmd` copied from it verbatim,
prefixed with the `cynkratemplate::readme_document` front matter and the canonical generated-file comment.

Rendering with `cynkratemplate::render_readme()` also writes `index.md` for pkgdown,
which is the `README.md` without the code-of-conduct footer.
Both `README.Rmd` and `index.md` are added to `.Rbuildignore` so neither ships in the tarball.

The rendered `README.md` differs from the hand-written one only in pandoc's gfm normalisations:
the generated-file comment, a blank line after `<!-- badges: start -->`,
` ```r ` written as ` ``` r `, and `---` written as a full-width row of hyphens.
No word, URL, or code-block content changes.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
krlmlr and others added 7 commits September 14, 2026 05:43
One of the items `usethis::use_tidy_upkeep_issue()` prescribes for 2023.
`pak::pak()` resolves system requirements and installs binaries where
they exist, so it does not need a compiler for pure-R dependencies the
way `install_github()` does.

The `# install.packages("pak")` comment is kept, matching what the
packages in this fleet that already use pak do. pak is not a dependency
of usethis, and only devtools imports it, so a reader with neither
installed still needs the line.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Two URLs make up the badge and they had drifted apart: the image is
served from the bare `codecov.io` host, the link opens the UI on
`app.codecov.io`. Both are brought to their current form.

The branch is dropped from the image URL rather than pinned to `main`. A
branch-pinned badge keeps reporting the branch it names, so it goes
stale silently the next time a branch is renamed -- which is how several
badges in this fleet came to report a branch that no longer exists.
Without one, codecov reports the default branch and the badge follows a
rename on its own.

The link moves to `/tree/main`, the address the `?branch=` query
redirects to.

    image  codecov.io/gh/<owner>/<repo>/graph/badge.svg
    link   app.codecov.io/gh/<owner>/<repo>/tree/main

The owner and repository are carried over from the URL being rewritten,
so this cannot retarget a badge at a different project.

The badge block is pass-through markdown, so `README.md` and `index.md`
carry the identical edit rather than a re-render.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Reformatting only, no wording changes: prose in README.md, the
vignette and the roxygen and inline comments under R/ now breaks at
sentence and clause boundaries rather than wrapping to a fixed width.

The payoff is sentence-level diffs. A reworded sentence touches one
line instead of reflowing the paragraph around it, so review sees the
change and not the rewrap.

man/*.Rd is regenerated because roxygen2 passes source line breaks
through to the .Rd. The rendered help is byte-identical -- checked with
tools::Rd2txt() over every topic -- as is the rendered README.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
A sentence that spans more than one line now starts at the beginning of
a line, and so does the sentence after it. Line breaks only, no wording
changes.

Where two sentences are separated by two spaces, the pair stays on one
long line: roxygen2 strips leading and trailing whitespace from
continuation lines, so a break at that gap would drop a space from the
rendered help.

man/*.Rd is regenerated because roxygen2 passes source line breaks
through to the .Rd. The rendered help is byte-identical -- checked with
tools::Rd2txt() over every topic.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Inside a roxygen block the first line of a paragraph, and every tag line,
keeps one space after `#'`; every continuation line of that paragraph now
has two. The paragraph structure of the source becomes visible without
reading ahead, and in packages that do not enable roxygen2 markdown the
extra space is what carries a sentence gap across a line break.

DBItest enables markdown (`Roxygen: list(markdown = TRUE)`), and commonmark
strips leading whitespace from a paragraph's continuation lines, so here
the indent reaches neither `man/*.Rd` nor the rendered help. The indent
alone regenerates nothing.

One continuation line landed on 141 columns once indented, and is broken
at a clause boundary to come back under the ceiling. That is the single
`man/*.Rd` change here, and `tools::Rd2txt()` renders it identically.

That also means the long lines this pass created cannot come apart again.
Where two sentences are separated by two spaces, the pair still has to
share one line -- under markdown no leading-space, trailing-space or
hard-break form survives into the `.Rd`, so breaking there would drop a
space from the rendered help.

The generated sources -- `R/spec-meta-bind*.R` apart from the three that
feed them, and `R/generics.R` -- are left untouched, as are the vendored
`R/compat-*.R`.

Reformatting only, no wording changes: the words either side of the diff
are identical once comment markers and whitespace are collapsed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The two-space continuation indent never reached the `.Rd`. DBItest sets
`Roxygen: list(markdown = TRUE)`, and commonmark strips the leading
whitespace of a continuation line before roxygen2 writes the topic, so the
indent changed no rendered output.

The sentence gap it was meant to carry now comes from roxygen2 itself
(krlmlr/roxygen2#8), which indents the line break after a sentence at the
point where the break is emitted. The source-level indent is redundant, so
it comes out.

This is `git revert` of the indent commit, not a substitution: that pass also
normalised pre-existing three-space tag continuations down to two, and the
revert puts them back at three. The one line the indent pass had to split,
because the extra space pushed it to 141 columns, is joined again, and the
split it caused in `man/spec_driver_constructor.Rd` goes with it. That is the
only `man/` change on either side.

The long joined lines the sembr pass created stay as they are. Undoing those
is a separate decision, and the roxygen2 fix is what will eventually let them
come apart.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The long joined lines existed to protect a sentence gap:
two spaces after a sentence period are content, Rd2txt() renders them literally, and a line break there drops one of them.
Joining the sentences onto one line was the only way to keep the gap.

The joins come out, so every sentence starts its own line again.

Reformatting only, no wording changes.

man/ is left to CI, which regenerates it from these sources.

A line break which follows the end of a sentence currently renders as one space rather than two.
Restoring that gap needs a patched roxygen2, which is a separate decision and a separate pull request,
so it is deliberately not part of this change.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
claude and others added 7 commits September 14, 2026 05:43
`R/spec-meta-bind{,-arrow,-stream,-arrow-stream}.R` are generated from
`R/spec-meta-bind-expr.R` by `tests/testthat/helper-dev.R`,
and they embed the feeder's prose as comments together with its source line numbers.
Reflowing the feeder moved that prose onto single lines and shifted 232 of those references,
so the generated files described a file that no longer looked like that.

Regeneration cannot happen on its own here:
`helper-dev.R` skips it when `CI` is set,
and triggers on a file modification time comparison that a fresh clone makes meaningless.
Left alone, the drift would surface as an unrelated diff in whoever next regenerates locally.

One change comes from the generator rather than from the sources:
`constructive` no longer emits `stringsAsFactors = FALSE`,
which is the default from R 4.0.0 onwards.
DESCRIPTION still declares `R (>= 3.2.0)`,
where the argument would have mattered.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The hand-written `README.md` keeps the package out of the shared rendering pipeline,
so this adds a `README.Rmd` copied from it verbatim,
prefixed with the `cynkratemplate::readme_document` front matter and the canonical generated-file comment.

Rendering with `cynkratemplate::render_readme()` also writes `index.md` for pkgdown,
which is the `README.md` without the code-of-conduct footer.
Both `README.Rmd` and `index.md` are added to `.Rbuildignore` so neither ships in the tarball.

The rendered `README.md` differs from the hand-written one only in pandoc's gfm normalisations:
the generated-file comment, a blank line after `<!-- badges: start -->`,
` ```r ` written as ` ``` r `, and `---` written as a full-width row of hyphens.
No word, URL, or code-block content changes.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Scope drawn from the Title and Description in DESCRIPTION, the README's
own statement that the package is primarily useful for backend
developers, the vignette on incremental and external testing including
the note that not all tests can be satisfied, the tweaks() and skip
arguments, and the roxygen "Specification" sections in R/spec-*.R that
DBI inherits into its own help pages.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
The format from cynkratemplate#135 now links inline code in prose to its reference page,
and this branch was rendered before that landed,
so the committed README.md no longer matched a fresh render.
With the README rendered in CI by default, the first run would have committed the links itself;
this commits exactly what that run produces, so the pull request stays a faithful render.

Only README.md changes: the links are added to prose and nothing else moves.
index.md is untouched, because pkgdown links the front page itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
@krlmlr
krlmlr removed this pull request from stack #567 November 28, 2026 08:09
@krlmlr
krlmlr changed the base branch from claude/readme-goals to main November 28, 2026 08:09
@krlmlr
krlmlr merged commit 4854ae4 into main Nov 28, 2026
9 of 10 checks passed
@krlmlr
krlmlr deleted the claude/readme-rmd branch November 28, 2026 08:12
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.

2 participants