Skip to content

Commit

Permalink
fix: solving cran issues
Browse files Browse the repository at this point in the history
- wrapped long runtime examples into donttest
- merged latest changes from patch-branch
  • Loading branch information
kapsner committed Jul 20, 2023
2 parents dbb16cb + 13d53e1 commit b1344f3
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 9 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@

#### Other changes

- updated news.md
([dbb16cb](https://gitlab.miracum.org/miracum/dqa/dqastats/tree/dbb16cb29c084281ebc73494792ca51eb4dff095))
- updated dev-version
([91a749c](https://gitlab.miracum.org/miracum/dqa/dqastats/tree/91a749cf1232b86af3d499c60b3cbb06dfe68618))

Full set of changes:
[`v0.3.2...482ea46`](https://gitlab.miracum.org/miracum/dqa/dqastats/compare/v0.3.2...482ea46)
[`v0.3.2...dbb16cb`](https://gitlab.miracum.org/miracum/dqa/dqastats/compare/v0.3.2...dbb16cb)

## v0.3.2 (2023-01-23)

Expand Down
2 changes: 2 additions & 0 deletions R/completeness.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#' data system and the target data system.
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -125,6 +126,7 @@
#' headless = rv$headless,
#' logfile_dir = rv$log$logfile_dir
#' )
#' }
#'
#' @export
#'
Expand Down
2 changes: 2 additions & 0 deletions R/conformance.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#' }
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -154,6 +155,7 @@
#' headless = rv$headless,
#' logfile_dir = rv$log$logfile_dir
#' )
#' }
#'
#' @export
#'
Expand Down
5 changes: 5 additions & 0 deletions R/dataloading.R
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ load_database <- function(rv,
sql <- sql_statements[[i]]
}

# replace not-allowed AS for aliasing r_interediate in case of oracle statements
if (db_type == "oracle") {
sql <- gsub("AS r_intermediate", "r_intermediate", sql)
}

## The `sql_extended` is the same like the normal `sql` but extened with
## additional information needed to run the SQL, e.g. the commands
## to create a view which the `sql` utilizes:
Expand Down
2 changes: 2 additions & 0 deletions R/descriptive_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#' }
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -129,6 +130,7 @@
#' rv = rv,
#' headless = rv$headless
#' )
#' }
#'
#' @export
#'
Expand Down
2 changes: 2 additions & 0 deletions R/etl.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' data system.
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -123,6 +124,7 @@
#' )
#'
#' etl_checks(results = rv$results_descriptive)
#' }
#'
#' @export
#'
Expand Down
3 changes: 3 additions & 0 deletions R/format_value_conformance_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#' results for one data element.
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -165,6 +166,8 @@
#' }
#' }
#' )
#' }
#'
#' @export

format_value_conformance_results <- function(results, # nolint
Expand Down
2 changes: 2 additions & 0 deletions R/plausibility_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#' }
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -141,6 +142,7 @@
#' mdr = rv$mdr,
#' headless = rv$headless
#' )
#' }
#'
#' @export
#'
Expand Down
2 changes: 2 additions & 0 deletions R/reduce_cat.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#' with `levellimit`.
#'
#' @examples
#' \donttest{# runtime ~ 5 sec.
#' utils_path <- system.file(
#' "demo_data/utilities/",
#' package = "DQAstats"
Expand Down Expand Up @@ -129,6 +130,7 @@
#' data = rv$results_descriptive,
#' levellimit = 25
#' )
#' }
#'
#' @export
#'
Expand Down
2 changes: 2 additions & 0 deletions man/atemp_plausi_results.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/completeness.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/descriptive_results.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/etl_checks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/format_value_conformance_results.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/reduce_cat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/value_conformance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions vignettes/DQAstats2SHIPdataset.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ For further information on `dataquieR`, please refer to [https://dataquality.shi
# ) %>%
# data.table::data.table()
ship_fn <- file.path(tempdir(), "ship.RDS")
ship_url <- paste0(
"https://raw.githubusercontent.com/cran/dataquieR/",
"master/inst/extdata/ship.RDS"
)
download.file(
url = paste0(
"https://github.com/cran/",
"dataquieR/raw/master/inst/extdata/ship.RDS"
),
url = ship_url,
destfile = ship_fn
)
Sys.sleep(1)
ship_data <- readRDS(ship_fn) %>%
data.table::data.table()
Expand All @@ -65,20 +67,25 @@ data.table::fwrite(
x = ship_data,
file = file.path(tempdir(), ship_data_export_fn)
)
```


```{r}
# load the ship metadata
# ship_meta <- readRDS(
# system.file("extdata/ship_meta.RDS", package = "dataquieR")
# ) %>%
# data.table::data.table()
ship_meta_fn <- file.path(tempdir(), "ship_meta.RDS")
ship_meta_url <- paste0(
"https://raw.githubusercontent.com/cran/dataquieR/",
"master/inst/extdata/ship_meta.RDS"
)
download.file(
url = paste0(
"https://github.com/cran/",
"dataquieR/raw/master/inst/extdata/ship_meta.RDS"
),
url = ship_meta_url,
destfile = ship_meta_fn
)
Sys.sleep(1)
ship_meta <- readRDS(ship_meta_fn) %>%
data.table::data.table()
```
Expand Down

0 comments on commit b1344f3

Please sign in to comment.