Skip to content

Commit

Permalink
v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-burn committed Nov 26, 2024
1 parent a2a0952 commit c565b60
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^codecov\.yml$
^cran-comments\.md$
^data-raw
^sql
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: CohortConstructor
Title: Build and Manipulate Study Cohorts Using a Common Data Model
Version: 0.3.2.900
Version: 0.3.3
Authors@R: c(
person("Edward", "Burn", , "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9286-1128")),
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## R CMD check results

This is a new release.
This is a patch release due to a breaking change in a dependency.
2 changes: 1 addition & 1 deletion tests/testthat/test-addIndex.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

test_that("local tibble and duckdb test - will do nothing for these", {

skip_on_cran()
cdm <- omock::mockCdmReference() |>
omock::mockCdmFromTables(tables = list("cohort" = dplyr::tibble(
"cohort_definition_id" = 1,
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-collapseCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("simple example", {
skip_on_cran()
cdm <- omock::mockCdmReference() |>
omock::mockCdmFromTables(tables = list("cohort" = dplyr::tibble(
"cohort_definition_id" = 1L,
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-conceptCohort.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("expected errors and messages", {
skip_on_cran()
cdm <- omock::mockCdmReference() |>
omock::mockPerson() |>
omock::mockObservationPeriod()
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-intersectCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("intersect example - two cohorts", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 2)
cdm_local <- omopgenerics::insertTable(
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-matchCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("matchCohorts runs without errors", {
skip_on_cran()
cdm <- mockCohortConstructor(nPerson = 1000)

cdm$cohort1 <- cdm$cohort1 |>
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-requireCohortIntersect.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("requiring presence in another cohort", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4, seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-requireConceptIntersect.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("require flag in concept", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4, seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down
9 changes: 6 additions & 3 deletions tests/testthat/test-sampleCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("sampleCohort subsetting one cohort", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4, seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down Expand Up @@ -28,6 +29,7 @@ test_that("sampleCohort subsetting one cohort", {
})

test_that("sampleCohort subsetting multiple cohorts", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 10,seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down Expand Up @@ -57,6 +59,7 @@ test_that("sampleCohort subsetting multiple cohorts", {
})

test_that("sampleCohort subsetting all cohorts", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4,seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand All @@ -76,7 +79,8 @@ test_that("sampleCohort subsetting all cohorts", {
})

test_that("expected errors", {
cdm_local <- omock::mockCdmReference() |>
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4) |>
omock::mockObservationPeriod() |>
omock::mockCohort(name = c("cohort1"), numberCohorts = 3, seed = 2)
Expand All @@ -97,9 +101,8 @@ test_that("expected errors", {
PatientProfiles::mockDisconnect(cdm)
})


test_that("original cohort attributes unchanged", {

skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(nPerson = 20) |>
omock::mockObservationPeriod()
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-stratifyCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("simple stratification", {
skip_on_cran()
cdm <- omopgenerics::cdmFromTables(
tables = list(
"person" = dplyr::tibble(
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-subsetCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("subsetCohort works", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4, seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-unionCohorts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("unionCohorts works", {
skip_on_cran()
cdm_local <- omock::mockCdmReference() |>
omock::mockPerson(n = 4, seed = 1) |>
omock::mockObservationPeriod(seed = 1) |>
Expand Down

0 comments on commit c565b60

Please sign in to comment.