-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Milestone
Description
CohortMethod & SelfControlledCaseSeries produce a Results*.zip file at the end of execution which then required when uploading results. These modules currently have some code that attempts to create a Results.zip if one is not present since the CM/SCCS upload methods require this as input:
Strategus/R/Module-CohortMethod.R
Lines 106 to 137 in 5aff08e
| # TODO: This is something CM does differently. | |
| # Find the results zip file in the results sub folder | |
| resultsFolder <- private$jobContext$moduleExecutionSettings$resultsSubFolder | |
| zipFiles <- list.files( | |
| path = resultsFolder, | |
| pattern = "\\.zip$", | |
| full.names = TRUE | |
| ) | |
| if (length(zipFiles) > 0) { | |
| zipFileName <- zipFiles[1] | |
| } else { | |
| # Create a zip file from the results in the directory | |
| DatabaseConnector::createZipFile( | |
| zipFile = "results.zip", | |
| files = list.files(resultsFolder, pattern = ".*\\.csv$"), | |
| rootFolder = resultsFolder | |
| ) | |
| zipFileName <- file.path(resultsFolder, "results.zip") | |
| } | |
| # TODO: This function does not expose | |
| # a way to specify the database identifier file | |
| # which makes the purge problematic since I'm | |
| # not sure how it will know what to purge... | |
| CohortMethod::uploadResults( | |
| connectionDetails = resultsConnectionDetails, | |
| schema = resultsDataModelSettings$resultsDatabaseSchema, | |
| zipFileName = zipFileName, | |
| purgeSiteDataBeforeUploading = FALSE | |
| ) | |
| }, |
Specifically, "results.zip" gets written to the current directory (getwd()) while CohortMethod then tries to read it from resultsFolder which is a bug.
A separate, but related issue: should CM/SCCS produce a .zip file as part of execution that is then required for upload when running through Strategus?
Metadata
Metadata
Assignees
Labels
No labels