Skip to content

Commit

Permalink
Add local module renv.lock validator script to extras
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Jan 25, 2024
1 parent 5f54c59 commit 95b16d0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions extras/ValidateModuleLockFiles.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
rootDir <- "C:/git/OHDSI"
moduleList <- c(
"Characterization",
"CohortDiagnostics",
"CohortGenerator",
"CohortIncidence",
"CohortMethod",
"EvidenceSynthesis",
"PatientLevelPrediction",
"SelfControlledCaseSeries"
)

for (i in seq_along(moduleList)) {
repoPath <- file.path(rootDir, paste0(moduleList[i], "Module"))
if (dir.exists(repoPath)) {
cat("Checking ", repoPath, "\n")
cat(" -- Checking renv.lock file\n")
Strategus::validateLockFile(filename = file.path(repoPath, "renv.lock"))
cat(" -- Checking dev/renv.lock file\n")
Strategus::validateLockFile(filename = file.path(repoPath, "renv/profiles/dev/renv.lock"))
} else {
warning(paste0(repoPath, "NOT FOUND!!"))
}
}

0 comments on commit 95b16d0

Please sign in to comment.