Closed shaneporter closed 8 years ago
Maybe only if there is a dashboard JS asset? I am just thinking if the installation has > 5 extensions, then it'll be annoying....
But if the notebook has a dashboard, then it makes sense to be able to see it.
I meant on the RCAP Designer UI.
Oh, OK, sure, it makes sense.
Is it quite easy to add an OCAP that can return the version in the DESCRIPTION file?
Yes! The R code for this is:
getRCAPVersion <- function() {
packageDescription("rcloud.rcap", fields = "Version")
}
@paulinshek While this is good most of the time, it is technically not correct, because it is not the version of the loaded package, but the version of the package on the disk. If you re-installed it, you'll get a bad result. This is how to do it for the loaded package: http://stackoverflow.com/a/37369263/604364
Oh! Indeed.
So better way is:
getRCAPVersion <- function() {
asNamespace("rcap.rcloud")$`.__NAMESPACE__.`$spec[["version"]]
}
Can that be added to the develop branch please? Thanks!
I suppose you need an ocap for this.
Also, I would probably combine the two solutions, because the "correct" one is hackish, and might break later. So we would put it in a tryCatch
and fall back to the other solution.
Yes please.
Yep, I can do this tomorrow :)
Would be useful for RCAP to output its current version, much in the same way that the current RCloud version is visible.
(Emphasis mine.)