sbpack-r is an R wrapper offering a functional interface for the Python package sbpack, which supports packing local or remote Common Workflow Language (CWL) apps and uploading them to Seven Bridges powered platforms.
Install sbpack-r from GitHub:
remotes::install_github("nanxstats/sbpack-r")
It depends on the Python package sbpack. Installed via pip:
reticulate::use_python("/usr/local/bin/python3") library("sbpack") "foo.cwl" %>% pack_to_file("bar.cwl") "https://example.com/foo.cwl" %>% pack_to_file("bar.cwl") "foo.cwl" %>% pack_to_sb("cgc", "user/project/app") "https://example.com/foo.cwl" %>% pack_to_sb("cgc", "user/project/app")
If you have already installed Python and sbpack, and want to develop sbpack-r in RStudio, simply create a file .Rprofile
under the package directory and set the Python binary path (Homebrew Python 3 path example below):
Sys.setenv(RETICULATE_PYTHON = "/usr/local/bin/python3")
The next time you open the project, the correct Python path and library path should be already set. For more technical details, see reticulate Python version configuration.