sos-notebook
sos-notebook copied to clipboard
%sessioninfo magic should add versions to depended packages
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
...
If the library is actually loaded, sessioninfo would include it, right?
Well, I'm talking about SoS workflow in SoS notebook. eg,
(BTW there seems to be a bug in sos notebook or lab. I'm on the master
of both these packages)
They do not work with master of sos now.
I see. These (workflow and notebook) are two systems that do not work with each other.
I know. That's why I was asking if it is too much of a request to have the information added.
The problem is that sessioninfo needs live R (and others) sessions to work, and the workflow version does not. Let me think harder.
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))
).
Bump this one. Would be a nice point to make in justifying that SoS workflow with Jupyter IDE helps with reproducibility and book-keeping.
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
- Centralize workflow requirement
- Consistent with binder because they corresponds to binder requirement files and can be used to create binder environments
- Allow systematic way to create session info, rather than hacking the workflow.