I am in the process of supporting cmdstanr in brms and would love to support in already in a CRAN releasable version even if cmdstanr is not yet on CRAN. I found a possible solution using the 'drat' package, which is explained in
https://stackoverflow.com/questions/33335321/include-non-cran-package-in-cran-package
and
Hosting cmdstanr on drat should be easy to achieve by simpling uploading the packages' source version on https://github.com/ghrr/drat (after opening an issue there).
Would this be an option for you or do you have other suggestions how to support cmdstanr in CRAN packages before its own CRAN release?
That seems simple to achieve and I would be for it. I have limited experience with CRAN and R packages so I think @jgabry should say what he thinks. I would gladly help!
Thank you! I have no experience with drat but it is maintained by someone well known in the R community so it should probably work out well. We would also need to store posterior there cmdstanr depends on it.
I would not include cmdstanr in any tests so that nothing can fail because cmdstanr changes. It just needs to be findable by CRAN so that it doesn't complain that a package is suggested but not available for checking.
I think this seems like a good option. Maybe we do it when we do the beta release?
Great! Doing it at the time of the beta release sounds like a sensible idea!
Jonah Gabry notifications@github.com schrieb am Mo., 18. Mai 2020, 18:56:
I think this seems like a good option. Maybe we do it when we do the beta
release?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630310969,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADCW2AALHTEFMV4QQH5WX7LRSFSCNANCNFSM4NCLHJMA
.
Shall we already inform Dirk about our plan to submit cmdstanr (and
posterior) at that point?
Paul Buerkner paul.buerkner@gmail.com schrieb am Mo., 18. Mai 2020, 19:02:
Great! Doing it at the time of the beta release sounds like a sensible
idea!Jonah Gabry notifications@github.com schrieb am Mo., 18. Mai 2020,
18:56:I think this seems like a good option. Maybe we do it when we do the beta
release?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630310969,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADCW2AALHTEFMV4QQH5WX7LRSFSCNANCNFSM4NCLHJMA
.
Does putting the packages on drat commit us to keeping them on drat forever
even once on CRAN? That is, will we have to release to both drat and CRAN
every time we do a release in the future? If so, is it worth doing that?
Maybe it is, just curious.
On Mon, May 18, 2020 at 1:03 PM Paul-Christian Bürkner <
[email protected]> wrote:
Shall we already inform Dirk about our plan to submit cmdstanr (and
posterior) at that point?Paul Buerkner paul.buerkner@gmail.com schrieb am Mo., 18. Mai 2020,
19:02:Great! Doing it at the time of the beta release sounds like a sensible
idea!Jonah Gabry notifications@github.com schrieb am Mo., 18. Mai 2020,
18:56:I think this seems like a good option. Maybe we do it when we do the
beta
release?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630310969
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ADCW2AALHTEFMV4QQH5WX7LRSFSCNANCNFSM4NCLHJMA.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630314990,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3PQQ2QXGGXWBTD4FQOBRLRSFS5XANCNFSM4NCLHJMA
.
I dont think there is any commitment involved in keeping it on drat. But I
dont know for sure. Would you be ok with me writing Dirk and informing him
about our plans? I would then also ask him about the question you raised.
Jonah Gabry notifications@github.com schrieb am Mo., 18. Mai 2020, 19:08:
Does putting the packages on drat commit us to keeping them on drat forever
even once on CRAN? That is, will we have to release to both drat and CRAN
every time we do a release in the future? If so, is it worth doing that?
Maybe it is, just curious.On Mon, May 18, 2020 at 1:03 PM Paul-Christian Bürkner <
[email protected]> wrote:Shall we already inform Dirk about our plan to submit cmdstanr (and
posterior) at that point?Paul Buerkner paul.buerkner@gmail.com schrieb am Mo., 18. Mai 2020,
19:02:Great! Doing it at the time of the beta release sounds like a sensible
idea!Jonah Gabry notifications@github.com schrieb am Mo., 18. Mai 2020,
18:56:I think this seems like a good option. Maybe we do it when we do the
beta
release?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630310969
,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AALHTEFMV4QQH5WX7LRSFSCNANCNFSM4NCLHJMA
>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630314990
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AB3PQQ2QXGGXWBTD4FQOBRLRSFS5XANCNFSM4NCLHJMA.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-630317442,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADCW2AGHS2Z3LAEQM64QJY3RSFTPBANCNFSM4NCLHJMA
.
Sure, thanks!
Hey guys, just FYI, drat is not a "place" rather it is a package that simplifies the creation/management of CRAN-_like_ repositories. so you use drat to create your _own_ repositories that R tooling like install.packages() understands.
As such the commitment is the completely on you to decide what/how to support.
You can see how other groups, like ropensci does it. An old blog post: https://ropensci.org/blog/2015/08/04/a-drat-repository-for-ropensci/
We have some tooling you can poke around in that helps even further:
https://github.com/metrumresearchgroup/pkgpub
For example, this function https://github.com/metrumresearchgroup/pkgpub/blob/master/R/release.R#L4
will allow you to build a CRAN-like repository given you have just tagged your repository.
At somepoint, if you want to automate it, you can get some inspiration from our CI system, where we autopublish packages on tag https://github.com/metrumresearchgroup/pkgpub/blob/master/.drone.yml#L49
Hope this gives some breadcrumbs of help
Thank you @dpastoor! This is super helpful!
Lets just start with a Github-hosted repository and add posterior & cmdstanr for now. If we end up having a bunch of packages and the repo becomes unmanagable we can move to a self-hosted solution as I mentioned in the proposal.
@jgabry when you have a few minutes, can you create a new repository on stan-dev and give me permissions to it? I will take care of the rest. We can name it /rpackages-repo or whatever. I already talked to Nic and he can setup a subdomain redirect for https://packages.mc-stan.org to that location (I am guessing no one opposes that).
The first step will be to publish packages manually then make a Github Action that will enable publishing an R package when a commit on the repository is tagged.
Also, I can probably publish posterior 0.0.3 right? That is current master (commit https://github.com/jgabry/posterior/commit/74dd1736085eb0e77b5d8469d93a003b6e6044a5).
Yes you can use posterior 0.0.3!
Rok Češnovar notifications@github.com schrieb am Di., 9. Juni 2020, 09:18:
Also, I can probably publish posterior 0.0.3 right? That is current master
(commit jgabry/posterior@74dd173
https://github.com/jgabry/posterior/commit/74dd1736085eb0e77b5d8469d93a003b6e6044a5
).—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/cmdstanr/issues/168#issuecomment-641084806,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADCW2AGMFOHAXFQWUQDJNJLRVXO6BANCNFSM4NCLHJMA
.
Ok cool, will create the repo now!
@rok-cesnovar @paul-buerkner Just created https://github.com/stan-dev/r-packages and added a placeholder readme (feel free to replace). You should both have permissions (let me know if not).
Ok, that was easier than I thought. Posterior is live:
install.packages("posterior", repos = c("https://mc-stan.org/r-packages"))
For now, its only a source package, need to setup Github Actions to build Win/Mac binaries.
@rok-cesnovar Do we also need to remove the Remotes: jgabry/posterior field from cmdstanr's description file now that we have Additional_repositories?
Yes, good call, removed it just now.
I just tried this out for cmdstanr, and it works nicely! Can I recommend adding getOption("repos")? install.packages only considers the repositories specified in repos = .... For instance, I didn't have the dependency vroom installed, so my first attempt failed.
Demo:
install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
Fantastic. Thanks @karldw!
Most helpful comment
Hey guys, just FYI, drat is not a "place" rather it is a package that simplifies the creation/management of CRAN-_like_ repositories. so you use drat to create your _own_ repositories that R tooling like install.packages() understands.
As such the commitment is the completely on you to decide what/how to support.
You can see how other groups, like ropensci does it. An old blog post: https://ropensci.org/blog/2015/08/04/a-drat-repository-for-ropensci/
We have some tooling you can poke around in that helps even further:
https://github.com/metrumresearchgroup/pkgpub
For example, this function https://github.com/metrumresearchgroup/pkgpub/blob/master/R/release.R#L4
will allow you to build a CRAN-like repository given you have just tagged your repository.
At somepoint, if you want to automate it, you can get some inspiration from our CI system, where we autopublish packages on tag https://github.com/metrumresearchgroup/pkgpub/blob/master/.drone.yml#L49
Hope this gives some breadcrumbs of help