Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Consolidate vignettes: ~49-line metadata setup duplicated across 9 files

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

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):

  1. Deduplicate the setup. Factor the metadata build into a single shared source — e.g. a _setup.Rmd pulled into each vignette via a knitr child= chunk, or a tiny exported example_meta() helper — so there is one source of truth for the example metadata.

  2. 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 just ae_forestly() / format_ae_forestly() argument variations. Keep forestly.Rmd as 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_contained fix) — 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Merck/forestly

All issues in Merck/forestly

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.