Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
Release v0.2.0
  • Loading branch information
anthonysena authored Sep 6, 2023
2 parents 866a293 + db0ba7e commit 177268a
Show file tree
Hide file tree
Showing 9 changed files with 1,131 additions and 1,561 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/Test_module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', rspm: "https://cloud.r-project.org"}
- {os: macOS-latest, r: 'release', rspm: "https://cloud.r-project.org"}
#- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: windows-latest, r: '4.2.3', rtools: '42', rspm: "https://cloud.r-project.org"}
- {os: macOS-latest, r: '4.2.3', rtools: '42', rspm: "https://cloud.r-project.org"}
- {os: ubuntu-20.04, r: '4.2.3', rtools: '42', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: windows-latest, r: 'release', rtools: '', rspm: "https://cloud.r-project.org"}
- {os: macOS-latest, r: 'release', rtools: '', rspm: "https://cloud.r-project.org"}
- {os: ubuntu-20.04, r: 'release', rtools: '', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
Expand All @@ -43,20 +46,22 @@ jobs:
CDM5_SQL_SERVER_USER: ${{ secrets.CDM5_SQL_SERVER_USER }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

rtools-version: ${{ matrix.config.rtools }}

- name: Install system requirements
if: runner.os == 'Linux'
run: |
sudo apt-get install -y make
sudo apt-get install -y default-jdk
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y libssl-dev
sudo apt-get install -y libglpk-dev
- uses: r-lib/actions/setup-renv@v2
with:
cache-version: 4
Expand Down
44 changes: 44 additions & 0 deletions Main.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,47 @@ execute <- function(jobContext) {


}


uploadResultsCallback <- function(jobContext) {
connectionDetails <- jobContext$moduleExecutionSettings$resultsConnectionDetails
moduleInfo <- ParallelLogger::loadSettingsFromJson("MetaData.json")
tablePrefix <- moduleInfo$TablePrefix
schema <- jobContext$moduleExecutionSettings$resultsDatabaseSchema

resultsFolder <- jobContext$moduleExecutionSettings$resultsSubFolder

conn <- DatabaseConnector::connect(connectionDetails)
on.exit(DatabaseConnector::disconnect(conn))

databaseSchemaSettings <- PatientLevelPrediction::createDatabaseSchemaSettings(
resultSchema = schema,
tablePrefix = tablePrefix,
targetDialect = connectionDetails$dbms
)

PatientLevelPrediction::insertCsvToDatabase(
csvFolder = resultsFolder,
conn = conn,
databaseSchemaSettings = databaseSchemaSettings,
modelSaveLocation = file.path(resultsFolder, 'dbmodels'),
csvTableAppend = ''
)

}

createDataModelSchema <- function(jobContext) {
connectionDetails <- jobContext$moduleExecutionSettings$resultsConnectionDetails
moduleInfo <- ParallelLogger::loadSettingsFromJson("MetaData.json")
tablePrefix <- moduleInfo$TablePrefix
schema <- jobContext$moduleExecutionSettings$resultsDatabaseSchema

PatientLevelPrediction::createPlpResultTables(
connectionDetails = connectionDetails,
targetDialect = connectionDetails$dbms,
resultSchema = schema,
deleteTables = F,
createTables = T,
tablePrefix = tablePrefix
)
}
2 changes: 1 addition & 1 deletion MetaData.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "PatientLevelPredictionModule",
"Version": "0.1.0",
"Version": "0.2.0",
"Dependencies": ["CohortGeneratorModule"],
"TablePrefix": "plp_"
}
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
PatientLevelPredictionModule 0.2.0
=======================

- Updated module to use HADES wide lock file and updated to use renv v1.0.2
- Added functions and tests for creating the results data model for use by Strategus upload functionality
- Added additional GitHub Action tests to unit test the module functionality on HADES supported R version (v4.2.3) and the latest release of R

PatientLevelPredictionModule 0.1.0
=======================

Expand Down
2 changes: 1 addition & 1 deletion SettingsFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
createPatientLevelPredictionModuleSpecifications <- function(modelDesignList) {
specifications <- list(
module = "PatientLevelPredictionModule",
version = "0.1.0",
version = "0.2.0",
remoteRepo = "github.com",
remoteUsername = "ohdsi",
settings = modelDesignList
Expand Down
Loading

0 comments on commit 177268a

Please sign in to comment.