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

Đang mở
#215 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
r
Lĩnh vực
testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
R
Star
43
Fork
14
Merge trung bình
4 giờ 44 phút
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DARTH-git/dampack

Tất cả issue của DARTH-git/dampack

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.