Skip to content

Commit

Permalink
delete performance tests (#44)
Browse files Browse the repository at this point in the history
* delete performance tests

* submission docs

* type
  • Loading branch information
erblast authored Mar 2, 2023
1 parent f2620fa commit 5ed0aea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 42 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# simaerep 0.4.3
- skip all performance unit tests on CRAN
- delete performance unit tests (poisson faster than bootstrap) to accommodate CRAN request

# simaerep 0.4.2
- CRAN submission
Expand Down
14 changes: 13 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# resubmission simaerep 0.4.3
# resubmission 2 simaerep 0.4.3
- deleted unit tests which compared function performance when called with different parameters as requested.

Thanks, we see you added

skip_on_cran() # performance on ci/cd systems is not predictable

but it should not be doing the test anywhere, as WRE explains.

Best,
Uwe Ligges

# resubmission 1 simaerep 0.4.3

- fix CRAN url in README

Expand Down
10 changes: 0 additions & 10 deletions tests/testthat/test_sim_sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ test_that("sim_sites() - prob_low and pval must be between 0 - 1", {

})

test_that("sim_sites() - executing only poisson tests must be faster than using bootstrap simulations", {
skip_on_cran() # performance on ci/cd systems is not predictable
skip_on_ci()

t_prob_low <- system.time(sim_sites(df_site_test, df_visit_test, poisson_test = FALSE, prob_lower = TRUE))
t_ptest <- system.time(sim_sites(df_site_test, df_visit_test, prob_lower = FALSE, poisson_test = TRUE))

expect_true(t_prob_low["elapsed"] > t_ptest["elapsed"])

})

test_that("prep_for_sim() - ae vector for site must match number of patients at site", {

Expand Down
30 changes: 0 additions & 30 deletions tests/testthat/test_sim_studies.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,6 @@ test_that("sim_studies() - returned dataframe expect no NA and prob_low/pval 0 -

})

test_that("sim_studies() - executing only poisson tests must be faster than using bootstrap simulations", {
skip_on_cran() # performance on ci/cd systems is not predictable
skip_on_ci()

t_ptest <- system.time({
df_sim_study <- sim_studies(
df_site = df_site_test,
df_visit = df_visit_test,
r = 3,
parallel = FALSE,
poisson_test = TRUE,
prob_lower = FALSE
)
})

t_prob_low <- system.time({
df_sim_study <- sim_studies(
df_site = df_site_test,
df_visit = df_visit_test,
r = 3,
parallel = FALSE,
poisson_test = FALSE,
prob_lower = TRUE
)
})

expect_true(t_ptest["elapsed"] < t_prob_low["elapsed"])

})


test_that("sim_studies() with keep_ae = TRUE - retain individual site and study AE", {

Expand Down

0 comments on commit 5ed0aea

Please sign in to comment.