Repository navigation
Document the _PACKAGE sentinel - #34
Conversation
…w, document()-level test
- The README example's prose contained a literal \details{} which, once
the example is copied and documented, sits inside the generated
\details section and makes tools::parse_Rd() warn about an unexpected
section header. Reworded; the copied example now parses clean.
- The @author table row claimed package-level support, but every
generator ignores tags$author in favor of the DESCRIPTION macros.
Row now says so.
- New tinytest fixture runs the full tinyrox::document() flow on a
_PACKAGE package: docType and both aliases present, NAMESPACE carries
only the real export, re-document is byte-identical, and prune_rd
leaves the package topic alone.
|
All three review findings addressed in cf9a707:
Still docs+tests only, so no version bump. |
Addresses #30.
Digging into #30 turned up that the requested feature already exists and meets every acceptance criterion in the issue. What was missing is documentation: neither README nor CLAUDE.md mentions the sentinel, which is why it read as unsupported.
Verified against the issue's own example (a subtitles-shaped test package, tinyrox 0.4.0.2):
"_PACKAGE"parses as package documentation, not an ordinary object (R/parse.R, since302b484)document()deterministically generatesman/subtitles-package.Rdwith packagedocTypesubtitlesandsubtitles-packageare emitted, so?subtitlesresolvesprune_rd = TRUEleaves the file aloneNAMESPACEis untouched (sentinel not exported)inst/tinytest/test_rd.Ralready carries_PACKAGEfixturesOne deliberate divergence from the issue text: title and description are not copied from the block. Since #11 (Dirk's preferred RAD style), they come from DESCRIPTION at render time via
\packageTitle{}/\packageDescription{}macros, with block paragraphs 3+ (or@details) filling\details{}. The new README section states this, including that the block's description paragraph is intentionally dropped.Docs-only, so no version bump per convention.