Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #416

Merged
merged 27 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6ae6773
Update DESCRIPTION
jreps Aug 16, 2023
92047a8
remove python setup from action yml
egillax Aug 25, 2023
05d79ac
remove python setup from action yml
egillax Aug 25, 2023
d2c9277
Merge branch '406-hades_weekly_fail' of https://github.com/OHDSI/Pati…
egillax Aug 25, 2023
98cf353
update deprecated actions
egillax Aug 25, 2023
40aff5b
fix decision tree node deSerialization for sklearn>=1.3
egillax Aug 25, 2023
790f317
tell windows where miniconda is
egillax Aug 25, 2023
93bc937
separate workflow item for windows miniconda
egillax Aug 25, 2023
8950593
use bash to add windows path
egillax Aug 25, 2023
23bd6bb
Update R_CMD_check_Hades.yaml
egillax Aug 25, 2023
84602e7
Update R_CMD_check_Hades.yaml
egillax Aug 25, 2023
d9a609c
Update R_CMD_check_Hades.yaml
egillax Aug 25, 2023
0d32abd
prepare release
egillax Aug 25, 2023
2653c39
update python version mentioned in README
egillax Aug 25, 2023
5df21d7
merge 406-hotfix into develop
egillax Aug 28, 2023
5a08d8a
adding pages to website
jreps Sep 7, 2023
bf871cc
Merge branch 'develop' of https://github.com/OHDSI/PatientLevelPredic…
jreps Sep 7, 2023
820e05e
Update uploadToDatabase.R
jreps Sep 21, 2023
8fe8845
Update ConstrainedPredictors.Rmd
jreps Oct 9, 2023
559c7ef
Update ConstrainedPredictors.Rmd
jreps Oct 9, 2023
069958f
use python 3.11 when creating conda envs
egillax Oct 10, 2023
6ab80dd
Update R_CMD_check_Hades.yaml
egillax Oct 10, 2023
0fe1b78
Merge pull request #414 from OHDSI/413-python_fix
jreps Oct 11, 2023
e6a6c93
fixing issue 415
jreps Oct 11, 2023
392aef7
Merge branch 'develop' of https://github.com/OHDSI/PatientLevelPredic…
jreps Oct 11, 2023
e717a10
Merge branch 'main' into develop
jreps Oct 11, 2023
ecf0fa2
Update R_CMD_check_Hades.yaml
egillax Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ jobs:

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: "r-reticulate"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: PatientLevelPrediction
Type: Package
Title: Developing patient level prediction using data in the OMOP Common Data
Model
Version: 6.3.5
Date: 2023-08-15
Version: 6.3.6
Date: 2023-10-09
Authors@R: c(
person("Jenna", "Reps", email = "[email protected]", role = c("aut", "cre")),
person("Martijn", "Schuemie", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
PatientLevelPrediction 6.3.6
======================
- fix bug with ohdsi shiny modules version check (issue 415)

PatientLevelPrediction 6.3.5
======================
- Fix sklearnToJson to be compatible with scikit-learn>=1.3
Expand Down
5 changes: 3 additions & 2 deletions R/HelperFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
#'
#' @param envname A string for the name of the virtual environment (default is 'PLP')
#' @param envtype An option for specifying the environment as'conda' or 'python'. If NULL then the default is 'conda' for windows users and 'python' for non-windows users
#' @param condaPythonVersion String, Python version to use when creating a conda environment
#'
#' @export
configurePython <- function(envname='PLP', envtype=NULL){
configurePython <- function(envname='PLP', envtype=NULL, condaPythonVersion="3.11"){

if(is.null(envtype)){
if(getOs()=='windows'){
Expand All @@ -113,7 +114,7 @@
warning(paste0('Conda environment ', envname,' exists. You can use reticulate::conda_remove() to remove if you want to fresh config'))
} else {
ParallelLogger::logInfo(paste0('Creating virtual conda environment called ', envname))
location <- reticulate::conda_create(envname=envname, packages = "python", conda = "auto")
location <- reticulate::conda_create(envname=envname, packages = paste0("python==", condaPythonVersion), conda = "auto")

Check warning on line 117 in R/HelperFunctions.R

View check run for this annotation

Codecov / codecov/patch

R/HelperFunctions.R#L117

Added line #L117 was not covered by tests
}
packages <- c('numpy','scipy','scikit-learn', 'pandas','pydotplus','joblib')
ParallelLogger::logInfo(paste0('Adding python dependancies to ', envname))
Expand Down
2 changes: 1 addition & 1 deletion R/ViewShinyPlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
)
} else{
ohdsiModulesVersion <- strsplit(x = as.character(utils::packageVersion('OhdsiShinyModules')), split = '\\.')[[1]]
if(ohdsiModulesVersion[1]>=1 & ohdsiModulesVersion[2]>= 2){
if(paste0(ohdsiModulesVersion[1], ".", ohdsiModulesVersion[2])>= 1.2){

Check warning on line 157 in R/ViewShinyPlp.R

View check run for this annotation

Codecov / codecov/patch

R/ViewShinyPlp.R#L157

Added line #L157 was not covered by tests
config <- ParallelLogger::loadSettingsFromJson(
fileName = system.file(
'shinyConfigUpdate.json',
Expand Down
20 changes: 10 additions & 10 deletions R/uploadToDatabase.R
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ addCohort <- function(
targetDialect = targetDialect,
tableName = 'cohort_definition',
columnNames = c('cohort_name'),
values = c(paste0("'",cohortDefinition$cohortName,"'")),
values = c(paste0("'",gsub('\'', '', cohortDefinition$cohortName),"'")),
tempEmulationSchema = tempEmulationSchema
)

Expand All @@ -1157,12 +1157,12 @@ addCohort <- function(

if(addNew){
cohortDefinitionId <- result$cohortDefinitionId[result$json %in% json]
ParallelLogger::logInfo(paste0('Cohort ',cohortDefinition$cohortName,' exists in cohort_definition with cohort id', result$cohortDefinitionId[result$json %in% json]))
ParallelLogger::logInfo(paste0('Cohort ',gsub('\'', '', cohortDefinition$cohortName),' exists in cohort_definition with cohort id', result$cohortDefinitionId[result$json %in% json]))
} else{
ParallelLogger::logInfo(paste0('Adding cohort ',cohortDefinition$cohortName))
ParallelLogger::logInfo(paste0('Adding cohort ',gsub('\'', '', cohortDefinition$cohortName)))

data <- data.frame(
cohortName = cohortDefinition$cohortName,
cohortName = gsub('\'', '', cohortDefinition$cohortName),
cohortDefinitionId = cohortDefinition$cohortId,
json = json
)
Expand All @@ -1187,7 +1187,7 @@ addCohort <- function(
targetDialect = targetDialect,
tableName = 'cohort_definition',
columnNames = c('cohort_name', 'cohort_definition_id'),
values = c(paste0("'",cohortDefinition$cohortName,"'"), cohortDefinition$cohortId),
values = c(paste0("'",gsub('\'', '', cohortDefinition$cohortName),"'"), cohortDefinition$cohortId),
tempEmulationSchema = tempEmulationSchema
)

Expand All @@ -1202,18 +1202,18 @@ addCohort <- function(
targetDialect = targetDialect,
tableName = 'cohorts',
columnNames = c('cohort_definition_id','cohort_name'),
values = c(cohortDefinitionId, paste0("'",cohortDefinition$cohortName,"'")),
values = c(cohortDefinitionId, paste0("'",gsub('\'', '', cohortDefinition$cohortName),"'")),
tempEmulationSchema = tempEmulationSchema
)

if(nrow(result)>0){
ParallelLogger::logInfo(paste0('Cohort ',cohortDefinition$cohortName,' exists in cohorts with cohort id', result$cohortId))
ParallelLogger::logInfo(paste0('Cohort ',gsub('\'', '', cohortDefinition$cohortName),' exists in cohorts with cohort id', result$cohortId))
} else{
ParallelLogger::logInfo(paste0('Adding cohort ',cohortDefinition$cohortName))
ParallelLogger::logInfo(paste0('Adding cohort ',gsub('\'', '', cohortDefinition$cohortName)))

data <- data.frame(
cohortDefinitionId = cohortDefinitionId,
cohortName = cohortDefinition$cohortName
cohortName = gsub('\'', '', cohortDefinition$cohortName)
)
DatabaseConnector::insertTable(
connection = conn,
Expand All @@ -1235,7 +1235,7 @@ addCohort <- function(
targetDialect = targetDialect,
tableName = 'cohorts',
columnNames = c('cohort_definition_id','cohort_name'),
values = c(cohortDefinitionId, paste0("'",cohortDefinition$cohortName,"'")),
values = c(cohortDefinitionId, paste0("'",gsub('\'', '', cohortDefinition$cohortName),"'")),
tempEmulationSchema = tempEmulationSchema
)
}
Expand Down
8 changes: 8 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ navbar:
- reference
- articles
- tutorial
- benchmarks
- predictors
- bestpractice
- news
right: [hades, github]
Expand All @@ -39,6 +41,12 @@ navbar:
bestpractice:
text: Best Practices
href: articles/BestPractices.html
benchmarks:
text: Benchmarks
href: articles/BenchmarkTasks.html
predictors:
text: Predictors
href: articles/ConstrainedPredictors.html
news:
text: Changelog
href: news/index.html
Expand Down
4 changes: 3 additions & 1 deletion man/configurePython.Rd

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

Loading
Loading