CDCgov / ww-inference-model

An in-development R package and a Bayesian hierarchical model jointly fitting multiple "local" wastewater data streams and "global" case count data to produce nowcasts and forecasts of both observations
https://cdcgov.github.io/ww-inference-model/
Apache License 2.0
16 stars 2 forks source link

Run `R CMD check` on Windows and macOS as well as Ubuntu in CI #189

Closed dylanhmorris closed 1 week ago

dylanhmorris commented 2 weeks ago

This suggests it would be beneficial to run R CMD check in CI on macOS and `Windows as well as Ubuntu. I will create an issue.

Originally posted by @dylanhmorris in https://github.com/CDCgov/ww-inference-model/issues/187#issuecomment-2379798202

We will need to address #145, since the current snapshot test of MCMC output is architecture-specific.

gvegayon commented 2 weeks ago

@kaitejohnson, I think you are already addressing this in https://github.com/CDCgov/ww-inference-model/tree/189-add-windows-check?

kaitejohnson commented 2 weeks ago

Yes except it doesn't work! I think that install of cmdstanr on windows won't work. Perhaps there is a workaround, or perhaps we close this... https://www.maxmantei.com/2020/05/16/cmdstanr-windows/

In EpiNow2, they don't install cmdstanr on windows in R CMD check bc I think it doesn't work https://github.com/epiforecasts/EpiNow2/blob/ba7b48d10a3989580642e73f72087d7d76f2f4ea/.github/workflows/R-CMD-check.yaml#L69

gvegayon commented 2 weeks ago

It seems their script is failing to fetch the latest version of the package here. @seabbs, what about using gh cli directly? This would do the same thing:

gh api \
    -H "Accept: application/vnd.github+json" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    repos/stan-dev/cmdstan/releases/latest

And it would work across OSs.

seabbs commented 2 weeks ago

I think it could be good to use gh (though it adds more weight to action) but I am not sure that will solve the issue resolving the latest version. Worth a try though.

gvegayon commented 2 weeks ago

gh cli comes shipped with the runners. The only issue would be if you run it within a container.

seabbs commented 2 weeks ago

you are right! I implemented this today and it looks good to me (though it has long looked good to me and then transciently started to fail.. hopefully we are working through that now)

gvegayon commented 1 week ago

Closing this one as @kaitejohnson and @seabbs addressed Windows in #190 and OSX is now a separate issue in #204.