Skip to content

Metadata#19

Open
Polkas wants to merge 8 commits into
mainfrom
metadata
Open

Metadata#19
Polkas wants to merge 8 commits into
mainfrom
metadata

Conversation

@Polkas
Copy link
Copy Markdown
Collaborator

@Polkas Polkas commented May 10, 2026

Add metadata argument to export_to() with JSON sidecar support

Introduces an opt-in metadata argument to export_to() that records set_cell() text values alongside exported files.

What's new

  • export_to() gains a metadata argument ("none" / "sidecar"). Passing "sidecar" writes a <file>.json sidecar next to the output — a flat JSON object for single-page exports, or a JSON array (one entry per page) for multi-page PDFs.
  • A gridify.export.metadata global option allows project-wide defaults (e.g. in .Rprofile).
  • Internal helpers extracted to gridify-utils.R: gridify_metadata(), gridify_to_json(), write_metadata_sidecar(), resolve_export_metadata().
  • jsonlite added as Suggests (not Imports) — only required when metadata = "sidecar" is used; a clear requireNamespace guard provides an install prompt otherwise.

Tests & docs

  • New test files: test_export_to.R, test_gridify_to_json.R.
  • New man pages for all internal helpers.
  • Vignettes (simple_examples, multi_page_examples) and NEWS.md updated.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 10, 2026

Codecov Report

❌ Patch coverage is 98.38710% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.48%. Comparing base (01b7233) to head (dd82292).

Files with missing lines Patch % Lines
R/gridify-utils.R 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   99.57%   99.48%   -0.09%     
==========================================
  Files           9        9              
  Lines         936      972      +36     
==========================================
+ Hits          932      967      +35     
- Misses          4        5       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Polkas Polkas marked this pull request as ready for review May 25, 2026 16:33
@Polkas Polkas closed this May 26, 2026
@Polkas Polkas reopened this May 26, 2026
Polkas added 2 commits May 26, 2026 18:02
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