Skip to content

Commit

Permalink
Update to use python client 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyu888 committed Nov 1, 2023
1 parent 27492e5 commit d0d32ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: synapser
Type: Package
Title: R Language Bindings for Synapse API
Version: 1.2.0
Version: 1.3.0
Date: 2022-01-18
Authors@R: c(
person("Bruce", "Hoff", role = c("aut", "cre"), email = "[email protected]"),
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
## synapser 1.3.0

### Improvements

* Python synapsePythonClient dependency updated to 3.1.1

## synapser 1.2.0

### Improvements

* Python synapsePythonClient dependency updated to 3.0.0
* Use `virtualenv` to install Python dependencies

## synapser 1.1.0

Expand Down
10 changes: 6 additions & 4 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# Ideally we would source tools/installPythonClient.R to not
# have to duplicate the synapseclient install code
# system2(paste("Rscript ", getwd(), "/tools/installPythonClient.R ", getwd(), sep=""))
PYTHON_CLIENT_VERSION <- '3.0.0'
reticulate::py_install(c("requests", "pandas", "pysftp", "jinja2", "markupsafe"))
reticulate::py_install(c(paste("synapseclient==", PYTHON_CLIENT_VERSION, sep="")), pip=T)
reticulate::py_run_string("import synapseclient")
PYTHON_CLIENT_VERSION <- '3.1.1'
reticulate::virtualenv_create('r-reticulate')
reticulate::use_virtualenv('r-reticulate')
reticulate::py_install(c("requests<3", "pandas~=2.0.0", "pysftp", "jinja2", "markupsafe"))
# reticulate::py_install(c(paste("synapseclient==", PYTHON_CLIENT_VERSION, sep="")), pip=T)
system('pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "synapseclient[pandas]"')
}
)

Expand Down
5 changes: 3 additions & 2 deletions tools/installPythonClient.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Author: bhoff
###############################################################################

PYTHON_CLIENT_VERSION <- '3.0.0'
PYTHON_CLIENT_VERSION <- '3.1.1'

args <- commandArgs(trailingOnly = TRUE)
baseDir<-args[1]
Expand All @@ -19,4 +19,5 @@ reticulate::use_virtualenv('r-reticulate')
# reticulate::py_run_string("import sys")
# reticulate::py_run_string(sprintf("sys.path.append(\"%s\")", file.path(baseDir, "inst", "python")))
reticulate::py_install(c("requests<3", "pandas~=2.0.0", "pysftp", "jinja2", "markupsafe"))
reticulate::py_install(c(paste("synapseclient==", PYTHON_CLIENT_VERSION, sep="")), pip=T)
#reticulate::py_install(c(paste("synapseclient==", PYTHON_CLIENT_VERSION, sep="")), pip=T)
system('pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "synapseclient[pandas]"')

0 comments on commit d0d32ac

Please sign in to comment.