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

SYNR-1260 #147

merged 2 commits into from Apr 11, 2018

Conversation

kimyen
Copy link
Contributor

@kimyen kimyen commented Apr 5, 2018

No description provided.

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.

@brucehoff brucehoff merged commit 2b80978 into Sage-Bionetworks:develop Apr 11, 2018
@kimyen kimyen deleted the SYNR-1260 branch January 21, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants