Make forecast print methods modular (e.g. multivariate joint_across)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with print.forecast() in R/class-forecast.R and review how the generic method currently handles forecast type, forecast unit, and joint_across. Compare the closed #1074 approach with the fix/1043-multivariate-print-joint-across branch, including its tests and snapshots. Done means class-specific multivariate output can be added without duplicating the generic printing logic.
Written by the indexing model from the issue text.
Description
Background
In #1074 we explored adding dedicated print methods for multivariate forecast objects so the print output shows which columns are jointly forecasted (joint_across).
That PR was closed because its approach duplicated most of the generic print.forecast() logic rather than building on it.
This issue captures the useful ideas so we don't lose them, and reframes the work around making printing modular.
Note that joint_across printing is in principle already reachable via the generic method (R/class-forecast.R), so the real gap is structural, not a missing feature.
Goal
Make print for forecast objects modular so class-specific information (like joint_across for multivariate forecasts) can be added without copying the generic method.
Ideas to consider
- Split
print.forecast()so the generic, shared parts (forecast type, forecast unit) are reusable and class methods can add their own lines viaNextMethod()rather than re-implementing. - Add a thin
print.forecast_multivariate_sample()/print.forecast_multivariate_point()that only contributes the "Joint across:" line. - Extract the
joint_acrosscomputation (setdiff(get_forecast_unit(x), get_grouping(x))) into a small reusable helper. - Consider whether non-generic, class-specific output belongs in the generic method at all, and document the intended division.
Reference
- Original PR (closed): #1074
- Branch with a working prototype to salvage tests/snapshots from:
fix/1043-multivariate-print-joint-across - Earlier discussion: #1043
This was opened by a bot. Please ping @seabbs for any questions.
- Dominant language
- R
- Stars
- 67
- Forks
- 24
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 2
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 epiforecasts/scoringutils
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
epiforecasts/scoringutils#1264 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiforecasts/scoringutils#1265 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
epiforecasts/scoringutils#1260 ·
Maintainers usually reply within 1 day
-
Incorrect guidance in `NEWS.md` re `add_relative_skill()`?Possibly taken @nikosbosse claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
epiforecasts/scoringutils#1226 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
-
get_pit_histogram(): unsorted breaks produce negative densities; num_bins = 1 returns an empty tablePossibly taken @nikosbosse claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
epiforecasts/scoringutils#1219 ·
Maintainers usually reply within 1 day
All issues in epiforecasts/scoringutils
Similar issues
-
data_bio2rarify - doc - dimensions wrongPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
leppott/BioMonTools#162 ·
-
publications
Difficulty 1/5 Under an hour Newbie friendliness 85/100
epiforecasts/epiforecasts.github.io#161 ·
Maintainers usually reply within 1 day
-
Label `{sas}` chunk source as `sas` instead of `txt`, so it gets syntax highlightingPossibly taken @michaelmayer2 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microbiome/OMA#1031 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ThinkR-open/golem#1265 ·