Skip to content

feat: Copy table and plot .md files into the report folder - #62

Merged
joethorley merged 1 commit into
mainfrom
copy-md-files
Oct 27, 2026
Merged

joethorley merged 1 commit into
mainfrom
copy-md-files

Conversation

@joethorley

Copy link
Copy Markdown
Member

Closes #61.

When the report is knitted, sbr_tables() and sbr_figures() now also copy each table's and plot's rounded .md file into the local report folder (sbr_get_report()), next to the .csv, .yaml, .xlsx and .png files they already copy.

poisreport::report_to_directory() and report_to_client() copy the whole report folder recursively, so the .md files now also reach the project's SharePoint folder and the client transfer folder, with no change to poisreport.

Details

  • The .md files are copied whether or not md = TRUE, as the .csv is.
  • Objects without a .md file (saved with an older subfoldr2, or with options(sbf.save_md = FALSE)) are skipped without error.
  • Table .md files come from subfoldr2 >= 1.0.1.9022, which is already required. Plot .md files come from feat: Save rounded .md file of the ggplot data in sbf_save_plot() subfoldr2#218, which is on subfoldr2 main but not yet in a tagged version. The figure tests expect them, so they need subfoldr2 main (as Remotes installs on CI).

Before merging

  • Optionally require the subfoldr2 version that includes #218 once fledge bumps it, so the figure tests match the declared minimum.

Checks

  • Updated the expected report-folder file lists in test-tables.R and test-figures.R to include the .md files.
  • New tests check that the copied table and plot .md match the saved ones, and that a table saved without one is skipped.
  • devtools::test() with subfoldr2 main: 126 passed, 0 failed. The one warning ("No files found, so no files were dropped") predates this change.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joethorley
joethorley merged commit 0cadb6c into main Oct 27, 2026
9 checks passed
@joethorley
joethorley deleted the copy-md-files branch October 27, 2026 12:00
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.

Copy table and plot .md files into the report folder

1 participant