Test suite upgrade: testthat edition 3, coverage ≥ 80%, numerical validation

Aperta
#215 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
r
Ambito
testing

Direzione di ricerca

This is a multi-part test effort rather than one change. Start by running the existing suite with devtools::test() and reading tests/testthat/util_models_detfun.R, which the issue asks to rename to helper-models.R. Pick one exported function from the list, such as beta_params, and write a moment round-trip test with set.seed(). Done means that test passes, the edition-3 changes are applied to that file, and coverage for the function is reported by Codecov.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

infrastructure

Suggested owner: Jorge Roa · Plan: Phase 2 (tests)

Goal

Tests that check numbers, not just that code runs. JOSS reviewers look for automated tests that confirm correctness.

Scope

  • Move to testthat edition 3:
    • Replace context() and expect_is() with expect_s3_class().
    • Rename tests/testthat/util_models_detfun.R to helper-models.R so it loads automatically.
  • set.seed() in every stochastic test.
  • Add tests for exported functions that have none:
    • beta_params, gamma_params, lnorm_params, dirichlet_params (moment round-trips)
    • number_ticks, print.icers
    • plot.evppi, plot.evsi
    • print.metamodel, summary.metamodel
    • two-way predict
    • calc_evsi(n_by_param = TRUE)
  • Numerical checks:
    • ICERs against the Hunink textbook example (hund_strat).
    • EVPI by hand from cancer_psa_data.
    • EVPPI/EVSI with a fixed seed.
    • gen_psa_samp moments for every distribution and parameterization, including truncated-normal, triangle, constant and bootstrap.
  • vdiffr snapshots for the main plots, with skip_on_cran(). Pin the ggplot2 version noted in the snapshots.

Acceptance

  • Codecov reports ≥ 80% line coverage.
  • No test depends on unseeded randomness.
  • CI passes on the 5-platform matrix.
Lingua principale
R
Stelle
43
Fork
14
Merge medio
4h 44m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DARTH-git/dampack

Tutte le issue di DARTH-git/dampack

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.