sos-notebook icon indicating copy to clipboard operation
sos-notebook copied to clipboard

%sessioninfo magic should add versions to depended packages

Open gaow opened this issue 6 years ago • 9 comments

Eg, if I have a workflow step in a notebook:

[flash]
depends: R_library("stephenslab/flash")

Then it should not be too much to ask %sessioninfo to display an R session summary with version of flash package, eg:

> library(flashr)
> sessionInfo()
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] flashr_0.6-1         RevoUtils_10.0.6     RevoUtilsMath_10.0.1

...

gaow avatar Sep 28 '18 20:09 gaow

If the library is actually loaded, sessioninfo would include it, right?

BoPeng avatar Sep 28 '18 20:09 BoPeng

Well, I'm talking about SoS workflow in SoS notebook. eg,

2018-09-28-15-27-33_scrot

(BTW there seems to be a bug in sos notebook or lab. I'm on the master of both these packages)

gaow avatar Sep 28 '18 20:09 gaow

They do not work with master of sos now.

BoPeng avatar Sep 28 '18 20:09 BoPeng

I see. These (workflow and notebook) are two systems that do not work with each other.

BoPeng avatar Sep 28 '18 20:09 BoPeng

I know. That's why I was asking if it is too much of a request to have the information added.

gaow avatar Sep 28 '18 20:09 gaow

The problem is that sessioninfo needs live R (and others) sessions to work, and the workflow version does not. Let me think harder.

BoPeng avatar Sep 28 '18 20:09 BoPeng

A dumb implementation would be to add a section to %sessioninfo output called "Workflow environment", call Rscript -e "library(ggplot2); sessionInfo()", capture the stdout and append it to this section. (need to hide the stderr or use suppressMessages(library(ggplot2))).

gaow avatar Sep 28 '18 20:09 gaow

Bump this one. Would be a nice point to make in justifying that SoS workflow with Jupyter IDE helps with reproducibility and book-keeping.

gaow avatar Oct 31 '18 00:10 gaow

It is even more difficult now because %run and %sosrun are executed by sos CLI outside of sos notebook. I tend to think we should implement things like Py_Requirements, Conda, R_Requirements that

  1. Centralize workflow requirement
  2. Consistent with binder because they corresponds to binder requirement files and can be used to create binder environments
  3. Allow systematic way to create session info, rather than hacking the workflow.

BoPeng avatar Oct 31 '18 03:10 BoPeng