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

オープン
#215 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
R
スター
43
フォーク
14
平均マージ
4時間 44分
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DARTH-git/dampack のほかの issue

DARTH-git/dampack の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。