Skip to content

Commit cd69fde

Browse files
authored
Merge pull request #174 from mi-erasmusmc/develop
Release v0.2.0
2 parents 07c7eb3 + bfaaaae commit cd69fde

34 files changed

Lines changed: 1010 additions & 664 deletions

‎.github/workflows/R-CMD-check.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
config:
22-
- {os: macos-latest, r: 'release'}
23-
- {os: windows-latest, r: 'release'}
24-
- {os: ubuntu-latest, r: 'release'}
22+
- {os: macos-latest, r: '4.4.1'}
23+
- {os: windows-latest, r: '4.4.1'}
24+
- {os: ubuntu-latest, r: '4.4.1'}
2525

2626
env:
2727
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

‎CRAN-SUBMISSION‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 0.1.4
2-
Date: 2026-09-17 15:58:15 UTC
3-
SHA: be98738b724c36bdf624f8a80479ed94e79e0852
1+
Version: 0.1.5
2+
Date: 2026-09-17 21:12:40 UTC
3+
SHA: 07c7eb36ade7c2f82c1f16b6596c22d7ae8babfd

‎DESCRIPTION‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: studyGenerics
22
Type: Package
33
Title: A Centralised Repository of Tested and Frequently Used Methods for
44
Observational Medical Outcomes Partnership Common Data Model Studies
5-
Version: 0.1.5
5+
Version: 0.2.0
66
Authors@R: c(
77
person(
88
"Cesar", "Barboza",
@@ -52,7 +52,6 @@ Imports:
5252
glue,
5353
stringr,
5454
zip,
55-
here,
5655
fs,
5756
usethis,
5857
dplyr,

‎NAMESPACE‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ importFrom(glue,
4646
glue,
4747
glue_collapse
4848
)
49-
importFrom(here,here)
5049
importFrom(jsonlite,toJSON)
5150
importFrom(renv,
5251
lockfile_read,

‎NEWS.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# studyGenerics 0.2.0
2+
3+
* `insertStructure()` update. It accepts the location and study number as an argument to fillout documentation.
4+
15
# studyGenerics 0.1.5
26

37
* Dependency on R >= 4.2.0 added to DESCRIPTION.

‎R/createResultsDir.R‎

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
#'
33
#' @description
44
#' Creates a subdirectory for results based on the database name within a
5-
#' specified output directory. If the output directory is not provided, the
6-
#' current working directory is used.
5+
#' specified output directory.
76
#'
87
#' @param outputDir Character string. The path to the main output folder.
9-
#' If NULL, defaults to the current working directory. Default NULL.
8+
#' This must be supplied explicitly.
109
#' @param dbname Character string. The name of the database, used to suffix
1110
#' the results folder (e.g., "results_dbname").
1211
#'
@@ -34,26 +33,23 @@
3433
#' )
3534
#' unlink(outputDir, recursive = TRUE)
3635
createResultsDir <- function(
37-
outputDir = NULL,
36+
outputDir,
3837
dbname
3938
) {
39+
if (missing(outputDir)) {
40+
cli::cli_abort("{.arg outputDir} must be supplied explicitly.")
41+
}
4042
# Set folder location for results ----
4143
cli::cli_alert_info(
4244
"Creating locations to save results"
4345
)
44-
if (is.null(outputDir)) {
45-
outputDir <- getwd()
46-
checkmate::assertDirectoryExists(
47-
outputDir
48-
)
46+
checkmate::assertCharacter(outputDir, len = 1, any.missing = FALSE)
47+
if (!dir.exists(outputDir)) {
48+
dir.create(outputDir, recursive = TRUE)
49+
checkmate::assertDirectoryExists(outputDir)
4950
} else {
50-
if (!dir.exists(outputDir)) {
51-
dir.create(outputDir)
52-
checkmate::assertDirectoryExists(outputDir)
53-
} else {
54-
outputDir <- normalizePath(outputDir)
55-
checkmate::assertDirectoryExists(outputDir)
56-
}
51+
outputDir <- normalizePath(outputDir)
52+
checkmate::assertDirectoryExists(outputDir)
5753
}
5854
resultsDirName <- glue::glue(
5955
"results_{dbname}"
@@ -73,4 +69,4 @@ resultsDirName <- glue::glue(
7369
resultsDirName = resultsDirName
7470
)
7571
)
76-
}
72+
}

0 commit comments

Comments
 (0)