Add titlepage_pdf() wrapper, helper, docs, and tests - #306
Open
jkylearmstrong wants to merge 2 commits into
Open
jkylearmstrong wants to merge 2 commits into
jkylearmstrong wants to merge 2 commits into
Conversation
Add a public titlepage_pdf() that uses the nmfs-opensci/quarto_titlepages extension to render PDF title pages. Refactor preparation into prepare_titlepage_dir(), add image support, add unit and integration tests, and document find_quarto. Fix roxygen warnings and update tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why: Provide an R wrapper to render PDF title/cover pages using the nmfs-opensci/quarto_titlepages Quarto extension so package users can programmatically create cover pages from R.
Approach: Adds a public titlepage_pdf() function and an internal prepare_titlepage_dir() helper. The helper prefers example qmds from the installed template (example_1/2/3) and falls back to documented article qmd or a generated minimal .qmd. Image support and no_prompt behavior (auto-true in non-interactive sessions) were implemented. Documentation (roxygen) for find_quarto was added and roxygen warnings fixed. Unit and integration tests were added/updated.
Notes/Reviewers: The change prefers rendering template-provided example QMD files to ensure deterministic PDF output in tests. The integration tests are designed to skip when Quarto or LaTeX are unavailable. No external behavior changes expected for other functions.
Files changed: R/titlepage.R, R/titlepage-utils.R, R/quarto.R (docs), R/publish.R (docs), man/, tests/testthat/
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com