Skip to content

Commit

Permalink
Remove :::s
Browse files Browse the repository at this point in the history
Co-authored-by: Milan Malfait <[email protected]>
  • Loading branch information
stefpiatek and milanmlft authored Sep 12, 2024
1 parent 034465c commit 480fa4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-raw-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ extract_bundle_details <- function(path) {
}

assert_bundle_has_name <- function(bundle) {
bundle_name_file <- omopbundles:::get_raw_dir(bundle$domain, "bundle_names.csv")
bundle_name_file <- get_raw_dir(bundle$domain, "bundle_names.csv")
bundle_names <- read_csv(bundle_name_file, show_col_types = FALSE)

expect_true(bundle$id %in% bundle_names$id,
glue::glue("{bundle$id} should at least one name in: {bundle$domain}/bundle_names.csv"))
}

test_that("All raw bundles have at least one name", {
raw_dir <- omopbundles:::get_raw_dir()
raw_dir <-get_raw_dir()

Check warning on line 20 in tests/testthat/test-raw-data.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test-raw-data.R,line=20,col=11,[infix_spaces_linter] Put spaces around all infix operators.

concept_files <- Sys.glob(file.path(raw_dir, "*", "bundles", "*.csv"))
bundle_ids <- purrr::map(concept_files, extract_bundle_details)
Expand All @@ -27,13 +27,13 @@ test_that("All raw bundles have at least one name", {


test_that("All raw bundle names map to a bundle file that has at least one concept", {
bundles <- omopbundles:::raw_bundles()
bundles <- raw_bundles()

# Ensure bundles dataframe is not empty
expect_true(nrow(bundles) > 0)

apply(bundles, 1, function(bundle) {
concepts <- omopbundles:::raw_concept_by_bundle(bundle["domain"], bundle["id"])
concepts <- raw_concept_by_bundle(bundle["domain"], bundle["id"])

# Check that at least one concept
expect_true(nrow(concepts) > 0)
Expand Down

0 comments on commit 480fa4c

Please sign in to comment.