Changelog
Source:NEWS.md
mariner 0.2.0 (development)
Breaking Changes
-
Zip archives default into
zip_files/, not beside the source file.process_file()andprocess_files()resolve the project root from the input file’s directory, so a batch that spans two projects lands each bundle in its own folder. Passoutput_zip/output_dirfor the old behaviour. -
generate_reports()writes intoreports/rather than the working directory. -
Output names come from a
file_nameglue template,"Report-{chapter}_{problem_numbers}"by default. Aparams_dfwithout those columns used to give every row the nameReport-_.qmd, sonrows left one file. It is now an error that names the available columns. -
R Markdown support is removed.
generate_reports(),process_file()andprocess_files()take.qmdonly, and refuse a.Rmdwith a message. rmarkdown is no longer a dependency, and thesimple_reporttemplate no longer carries askeleton.Rmd.
New Features
A vendored Quarto PDF theme. mariner ships the theme, the fonts and the brand tokens. A report renders in Atkinson Hyperlegible Next, Lora and JetBrains Mono with the LaTeX geometry to match, and there is nothing to install separately.
Document markup. The spans
[x]{.defn},[x]{.term},[x]{.termref}and[x]{.emph}, and the blocks::: {.def}and::: {.thm}, mark defined terms and set off definitions and theorems in the brand colours. A.defnwith an identifier —[support]{.defn #support}— also plants a cross-reference target. Quarto’s callouts work alongside them.ggplot2 theming and scales.
theme_mariner(),mariner_set_theme(),mariner_colors()andmariner_pal(), pluscolourandfillscales in five families:scale_*_mariner_d(),_c(),_o(),_div()and_b().Project scaffolding.
mariner_setup_project()createsassets/,reports/andzip_files/, assembles the theme intoassets/, copies it beside the documents inreports/, drops in a starter report, and gitignores the build outputs. Run it twice and nothing changes.-
Project settings in
_mariner.yml.mariner_setup_project(author = )writes the project’s author to a_mariner.ymlat the root, andgenerate_reports()fills any template parameter of the same name from it. Precedence runs template default, then_mariner.yml, then theparams_dfcolumn, so a batch whose author does vary can still say so.The author was a constant column of
params_dfbefore this, and it had to be retyped on every call. A call that omitted it produced a batch of PDFs that carried the template’s placeholder on every title page, from a render that succeeded.mariner_setup_project()now says so when no author is set.The file is not a
mariner:key inside_quarto.yml: a_quarto.ymlat the root turns the directory into a Quarto project, which changes where Quarto resolves the extension from and breaks font lookup. The folders are also created on attach.
library(mariner)creates the three directories in an interactive session whose working directory looks like a project root — seemariner_looks_like_project(). It does not assemble the theme. Turn it off withoptions(mariner.auto_setup = FALSE).New
mariner_check_setup()answers “will a report render on this machine?” in one call: Quarto and its version, a LaTeX engine, whether the fonts are installed rather than merely bundled, whether zip can write, the project folders, whether the theme beside the documents is complete, and the packages the template loads. Each line carries a fix to paste. Nothing is installed or changed.New
reporttemplate, replacingsimple_report, withmariner_templates()andmariner_template_path()to find it.New
includeargument onprocess_file()andprocess_files()selects which of"source","script","output"and"intermediates"reach the archive. All four by default.New
assets_dirargument points at the extensionmariner_setup_project()built, so a batch of fifty reports stages the theme from one place.New
mariner_dirs()returns the three project paths and is the single source every default path resolves through.mariner_project_root()resolves the root, andoptions(mariner.project_root = ...)overrides it.
Bug Fixes
A project scaffolded by
mariner_setup_project()is now found again.mariner_project_root()recognised only an.Rproj, a_quarto.ymlor aDESCRIPTION, so in a plain directory the scaffolder and the renderer disagreed about where the project was: setup createdzip_files/beside the three folders, whileprocess_file()walked up fromreports/ch1.qmd, found no marker, fell back toreports/itself, and wrotereports/zip_files/. A directory holding all three mariner folders is now a root in its own right – at the directory you are in, and further up only when the search climbed out ofassets/,reports/orzip_files/. Those folders are created for you, so an abandoned set in a parent directory does not capture a new project started beneath it.The staged theme link is removed on Windows. Teardown used
unlink(recursive = FALSE), which Windows refuses on a directory reparse point —mismatch between the tag specified in the request and the tag present in the reparse point— so every render warned and left the link standing for the recursive delete on the next line. It now goes throughfs::link_delete(), and a link that cannot be removed is reported rather than deleted recursively.A missing input file says where to look.
process_file("Report-1_1.qmd")from the project root reported only that the file did not exist. It now addsDid you mean 'reports/Report-1_1.qmd'?when the name resolves there.generate_reports()parses the YAML instead of rewriting it with a regex. The old approach broke on a param whose default was empty ornull, on list- and multi-line values, and on a---inside the document. It also dropped aparams_dfcolumn with no counterpart in the template. Unmatched columns now warn once, naming both what was passed and what the template declares.process_file()stages the theme beside the document it renders, so a report usingformat: mariner-pdffinds its fonts. It symlinks fromassets/where the platform allows and copies where it does not.Fonts are registered inside each parallel worker. A
multisessionworker is a fresh process, so its figures used to fall back to the device default — in parallel runs only, with nothing to show for it.A
_files/directory now travels with a document whose name has a space in it. Quarto names its output after a sanitised form of the input stem, soreport with spaces.qmdrenders toreport-with-spaces.pdfand the match against<input stem>_filesclassed the directory as an intermediate. The defaultincludebundled it either way, butinclude = c("source", "output")shipped an HTML document without its dependencies.Windows font installation could not have worked.
mariner_install_fonts()quoted itsreg addarguments withshQuote()’s POSIX default, andsystem2()on Windows goes throughcmd.exe, which does not strip single quotes. Every registry write was refused. Windows ignores a font file the registry does not name, so the fonts appeared to install and did nothing.The Windows registry value now carries the font’s own full name (
Lora Regular (TrueType)) rather than one derived from the filename (Lora-Regular (TrueType)). That is what Windows writes, and it stops a later install through Explorer from leaving a duplicate entry.On Linux without
fc-cache,mariner_install_fonts()says so. The fonts install either way, but they are not picked up at once, and the previous silence left no route from “restart R” to the cause.Bundling moved from
utils::zip()tozip::zip(). The old backend shelled out to an externalzipbinary that a stock Windows install does not have, and it added to an existing archive rather than replacing it, so re-running a batch could leave stale files in a bundle.
Minor Changes
- User-facing output from
generate_reports(),process_file()andprocess_files()goes through cli.process_files()names the files that failed rather than counting them. - A render happens in an
fs::path_real()-resolved scratch directory, so the path the Quarto CLI receives is the one the filesystem agrees on: symlinks resolved, Windows 8.3 short names expanded. -
systemfonts (>= 1.1.0) is now required.
match_font()is soft-deprecated there and would print a deprecation warning in the middle of a setup report. -
progressr and tinytex added to
Suggests; tidyverse and conflicted restored to it. A test now checks that every package the starter template loads is declared, so the list cannot fall behind the template. -
LazyData: trueremoved — there is nodata/.
mariner 0.1.3
This version introduces support for Quarto (.qmd) files, which is now the default.
Major Changes
-
Quarto Support: The package workflow now fully supports Quarto files.
-
generate_reports()will now look forskeleton.qmdin the template directory and use it by default. It falls back toskeleton.Rmdif a Quarto skeleton is not found. -
process_file()now checks the file extension and usesquarto::quarto_render()for.qmdfiles andrmarkdown::render()for.Rmdfiles. - The
simple_reporttemplate now includes bothskeleton.qmdandskeleton.Rmd.
-
Minor Changes
- Unit tests have been updated to test for
.qmdand.Rmdfile handling in bothgenerate_reports()andprocess_file(). - Added CI setup with GitHub Actions to test against R 4.5, install Quarto, and run covr.
mariner 0.1.2
- Improve default template in skeleton directory for report generation.
- Update documentation to reflect new template structure.
- Expanded unit tests for
generate_reports()to cover template variations.
mariner 0.1.1
- Expand testing suite for all functions.
- Add parallel processing support in
process_files()using future and furrr.
mariner 0.1.0
- Initial release.
- Added
generate_reports()to create parameterized R Markdown files from a template. - Added
process_file()to render and bundle a single.Rmdfile into a.ziparchive.