View source: R/test_diseasystore.R
test_diseasystore | R Documentation |
This function runs a battery of tests of the given diseasystore.
The supplied diseasystore must be a generator for the diseasystore, not an instance of the diseasystore.
The tests assume that data has been made available locally to run the majority of the tests. The location of the local data should be configured in the options for "source_conn" of the given diseasystore before calling test_diseasystore.
test_diseasystore(
diseasystore_generator = NULL,
conn_generator = NULL,
data_files = NULL,
target_schema = "test_ds",
test_start_date = NULL,
skip_backends = NULL,
...
)
diseasystore_generator |
( |
conn_generator |
( |
data_files |
( |
target_schema |
( |
test_start_date |
( |
skip_backends |
( |
... |
Other parameters passed to the diseasystore generator. |
NULL
(called for side effects)
withr::local_options("diseasystore.DiseasystoreEcdcRespiratoryViruses.pull" = FALSE)
conn_generator <- function(skip_backends = NULL) {
switch(
("SQLiteConnection" %in% skip_backends) + 1,
list(DBI::dbConnect(RSQLite::SQLite())), # SQLiteConnection not in skip_backends
list() # SQLiteConnection in skip_backends
)
}
test_diseasystore(
DiseasystoreEcdcRespiratoryViruses,
conn_generator,
data_files = "data/snapshots/2023-11-24_ILIARIRates.csv",
target_schema = "test_ds",
test_start_date = as.Date("2022-06-20"),
slice_ts = "2023-11-24"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.