Consolidate vignettes: ~49-line metadata setup duplicated across 9 files
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- r
- Domain
- documentation
Research direction
Start with the eight customize-* vignette files and forestly.Rmd; compare their metadata setup blocks and identify the topic-specific sections to preserve. Read the vignette build configuration and the guidance for knitr child documents before choosing how to share the setup. Done means the setup has one source of truth, the customization topics are consolidated as proposed, and the vignettes still build.
Written by the indexing model from the issue text.
Description
Problem
The metadata-construction section is duplicated almost verbatim across the vignettes. Every customize-* vignette opens with an identical "Step 1: build your metadata" section — the full meta_adam() → define_plan() → define_population() → define_observation() → define_parameter() (×4) → meta_build() pipeline — before a short topic-specific "Step 2". forestly.Rmd builds the same metadata as well.
Evidence
- 8
customize-*vignettes +forestly.Rmd= 9 copies of the same ~49-line setup. - The "Step 1" block is byte-identical across 6 of them; the other two (
customize-ae-specific-columns,customize-listing-columns) differ only by offset / one stray blank line. - Each
customize-*page contributes only ~40 genuinely unique lines (its "Step 2").
Any change to the example metadata API or data must currently be edited in 9 places, and the near-empty pages add navigation noise.
Proposal
Two complementary moves (either alone helps; together is best):
-
Deduplicate the setup. Factor the metadata build into a single shared source — e.g. a
_setup.Rmdpulled into each vignette via a knitrchild=chunk, or a tiny exportedexample_meta()helper — so there is one source of truth for the example metadata. -
Merge the 8
customize-*pages into one "Customize the display" vignette with a section per topic (color, digits, x-limits, diff label, widths, SOC-only, toggle buttons, listing columns). They are all justae_forestly()/format_ae_forestly()argument variations. Keepforestly.Rmdas the main end-to-end tutorial.
Option 1 removes all 9 duplicated copies; option 2 additionally collapses 8 thin pages into one cohesive, navigable article.
Notes
- Coordinate with #171 (vignette
self_containedfix) — both touch the same vignette YAML/structure, so it is natural to do them together.
- Dominant language
- R
- Stars
- 23
- Forks
- 6
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Merck/forestly
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
Allow numerical filtering for percentagesPossibly taken @yihui claimed this 7 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Merck/forestly#166 · 1 assignee ·
Maintainers usually reply within 2 days
-
Add `ae_listing_label = ...` to `prepare_ae_forestly()`Possibly taken @fukuhiro2023 claimed this 19 days ago. Open
Merck/forestly#152 · 1 assignee ·
Maintainers usually reply within 2 days
-
A lot of if-else in `format_ae_listing()`Possibly taken @fukuhiro2023 claimed this 20 days ago. Open
Merck/forestly#148 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
hubverse-org/hubUtils#317 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Rapporteket/NORIC#318 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mountainMath/canpumf#31 · 2 comments ·