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

SYNR-1260 #147

Merged
merged 2 commits into from Apr 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Expand Up @@ -11,8 +11,8 @@ Maintainer: Bruce Hoff <bruce.hoff@sageabse.org>
BugReports: https://github.com/Sage-Bionetworks/synapser/issues
Description: Provides R language bindings for Synapse RESTful web services.
License: Apache License 2.0
Imports: PythonEmbedInR
Depends: PythonEmbedInR(>= 0.2), R(>= 3.3), methods
Imports: PythonEmbedInR(>= 0.2)
Depends: R(>= 3.3), methods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should 'methods' be on the Depends line or the Imports line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be in Imports

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though practically it probably does not matter too much since methods is one of the base packages that is usually attached on startup anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package "methods" is on Depends: line because of https://sagebionetworks.jira.com/browse/SYNR-1148
This is because we use setGeneric in .onload. When running an R script containing the following code:

try(remove.packages('PythonEmbedInR'), silent=T)
try(remove.packages('synapser'), silent=T)
install.packages('synapser', repos=c("https://cran.cnr.berkeley.edu/", Sys.getenv('RAN')))
library('synapser')

Rscript does not load methods automatically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should call setGeneric() with its package prefix, i.e. methods::setGeneric(). All functions from other packages that aren’t imported into the synapser namespace need to be called in this way for R CMD check to pass anyway.

Suggests: testthat, knitr, rmarkdown
URL: https://www.sagebase.org
VignetteBuilder: knitr
Expand Down