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

Abierto
#215 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
r
Área
testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
R
Estrellas
43
Forks
14
Merge medio
4 h 44 min
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DARTH-git/dampack

Todos los issues de DARTH-git/dampack

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.