Skip to content

Commit

Permalink
Package maintenance for cran release
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Jul 11, 2024
1 parent 5b62c62 commit a06d49f
Show file tree
Hide file tree
Showing 36 changed files with 384 additions and 448 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
^\.idea$
^renv$
^renv\.lock$
sql
extras
man-roxygen
license_header_stub.txt
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: ResultModelManager
Title: Result Model Manager
Version: 0.5.8
Version: 0.5.9
Authors@R:
person("Jamie", "Gilbert", , "gilbert@ohdsi.org", role = c("aut", "cre"))
Description: Database data model management utilities for OHDSI packages.
License: Apache License (== 2.0)
Encoding: UTF-8
VignetteBuilder: knitr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Depends:
R (>= 4.1.0),
R6,
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ResultModelManager 0.5.9

Changes:

1. Changes made to make package CRAN compliant

# ResultModelManager 0.5.8

Bug fixes:
Expand Down
7 changes: 4 additions & 3 deletions R/DataModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -809,19 +809,20 @@ loadResultsDataModelSpecifications <- function(filePath) {
#' Another assumption of this function is that we're only attempting to
#' recast to a character data type and not try to handle different type
#' conversions.
#' @noRd
formatChunk <- function(pkValuesInDb, chunk) {
for (columnName in names(pkValuesInDb)) {
if (class(pkValuesInDb[[columnName]]) == "integer") {
if (inherits(pkValuesInDb[[columnName]], "integer")) {
pkValuesInDb[[columnName]] <- as.numeric(pkValuesInDb[[columnName]])
}

if (class(chunk[[columnName]]) == "integer") {
if (inherits(chunk[[columnName]], "integer")) {
chunk[[columnName]] <- as.numeric(chunk[[columnName]])
}


if (class(pkValuesInDb[[columnName]]) != class(chunk[[columnName]])) {
if (class(pkValuesInDb[[columnName]]) == "character") {
if (inherits(pkValuesInDb[[columnName]], "character")) {
chunk <- chunk |> dplyr::mutate_at(columnName, as.character)
} else {
errorMsg <- paste0(
Expand Down
14 changes: 7 additions & 7 deletions docs/404.html

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

14 changes: 7 additions & 7 deletions docs/LICENSE-text.html

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

23 changes: 10 additions & 13 deletions docs/articles/CreatingMigrations.html

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

25 changes: 11 additions & 14 deletions docs/articles/ExampleProject.html

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

Loading

0 comments on commit a06d49f

Please sign in to comment.