diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 951604f..6f2cd1d 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -28,10 +28,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create conda environment - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: mfassignr-dev auto-update-conda: true diff --git a/tests/testthat/test-MFAssignCHO.R b/tests/testthat/test-MFAssignCHO.R index ddab119..146e835 100644 --- a/tests/testthat/test-MFAssignCHO.R +++ b/tests/testthat/test-MFAssignCHO.R @@ -1,10 +1,20 @@ +make_path <- function(mode, identifier) { + file.path("test-data", paste0(mode, "_cho_", identifier, ".rds")) +} + load_expected <- function(mode) { - unambig <- readRDS(file.path("test-data", paste0(mode, "_cho_unambig.rds"))) - ambig <- readRDS(file.path("test-data", paste0(mode, "_cho_ambig.rds"))) - none <- readRDS(file.path("test-data", paste0(mode, "_cho_none.rds"))) + unambig <- readRDS(make_path(mode, "unambig")) + ambig <- readRDS(make_path(mode, "ambig")) + none <- readRDS(make_path(mode, "none")) return(list(Unambig = unambig, Ambig = ambig, None = none)) } +update_expected <- function(actual, mode) { + saveRDS(actual$Ambig, file = make_path(mode, "ambig")) + saveRDS(actual$Unambig, file = make_path(mode, "unambig")) + saveRDS(actual$None, file = make_path(mode, "none")) +} + patrick::with_parameters_test_that("MFAssignCHO works", { peaks <- readRDS(file.path("test-data", paste0(mode, "_iso.rds"))) @@ -15,8 +25,6 @@ patrick::with_parameters_test_that("MFAssignCHO works", ) expected <- load_expected(mode) - # keys <- c("Ambig", "Unambig", "None") - # expect_equal(actual[keys], expected) expect_equal(actual$Ambig, expected$Ambig) expect_equal(actual$Unambig, expected$Unambig) diff --git a/tests/testthat/test-data/neg_cho_ambig.rds b/tests/testthat/test-data/neg_cho_ambig.rds index 89ac85a..ca70664 100644 Binary files a/tests/testthat/test-data/neg_cho_ambig.rds and b/tests/testthat/test-data/neg_cho_ambig.rds differ diff --git a/tests/testthat/test-data/neg_cho_none.rds b/tests/testthat/test-data/neg_cho_none.rds index 17687c6..13f24bb 100644 Binary files a/tests/testthat/test-data/neg_cho_none.rds and b/tests/testthat/test-data/neg_cho_none.rds differ diff --git a/tests/testthat/test-data/neg_cho_unambig.rds b/tests/testthat/test-data/neg_cho_unambig.rds index ab63e77..82362fb 100644 Binary files a/tests/testthat/test-data/neg_cho_unambig.rds and b/tests/testthat/test-data/neg_cho_unambig.rds differ diff --git a/tests/testthat/test-data/neg_recal_iso.rds b/tests/testthat/test-data/neg_recal_iso.rds index 6917971..a156ccc 100644 Binary files a/tests/testthat/test-data/neg_recal_iso.rds and b/tests/testthat/test-data/neg_recal_iso.rds differ diff --git a/tests/testthat/test-data/neg_recal_mono.rds b/tests/testthat/test-data/neg_recal_mono.rds index d6edada..b8b7646 100644 Binary files a/tests/testthat/test-data/neg_recal_mono.rds and b/tests/testthat/test-data/neg_recal_mono.rds differ diff --git a/tests/testthat/test-data/neg_recal_recallist.rds b/tests/testthat/test-data/neg_recal_recallist.rds index cdf9996..13b6065 100644 Binary files a/tests/testthat/test-data/neg_recal_recallist.rds and b/tests/testthat/test-data/neg_recal_recallist.rds differ diff --git a/tests/testthat/test-data/pos_recal_iso.rds b/tests/testthat/test-data/pos_recal_iso.rds index 53bf2cc..5fafd4a 100644 Binary files a/tests/testthat/test-data/pos_recal_iso.rds and b/tests/testthat/test-data/pos_recal_iso.rds differ diff --git a/tests/testthat/test-data/pos_recal_mono.rds b/tests/testthat/test-data/pos_recal_mono.rds index 19871e1..e83d46d 100644 Binary files a/tests/testthat/test-data/pos_recal_mono.rds and b/tests/testthat/test-data/pos_recal_mono.rds differ diff --git a/tests/testthat/test-data/pos_recal_recallist.rds b/tests/testthat/test-data/pos_recal_recallist.rds index 590d380..7597d32 100644 Binary files a/tests/testthat/test-data/pos_recal_recallist.rds and b/tests/testthat/test-data/pos_recal_recallist.rds differ