Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: move shinystan from Imports to Suggests? #623

Open
etiennebacher opened this issue May 31, 2024 · 0 comments
Open

Request: move shinystan from Imports to Suggests? #623

etiennebacher opened this issue May 31, 2024 · 0 comments

Comments

@etiennebacher
Copy link

etiennebacher commented May 31, 2024

Summary:

rstanarm imports shinystan, meaning that all packages that import rstanarm (or suggest it and install the suggested packages in CI) also have to install a whole lot of shiny-related packages. This can cause issues in CI and for other package maintainers.

Description:

Hello, I don't use rstanarm but I maintain a package that Suggests it (datawizard). Recently, there were some failures in CI due to installation errors for QuickJSR. I was a bit intrigued because our package has nothing to do with Javascript and doesn't use any shiny-related packages. It turned out that QuickJSR was installed because shinystan is also installed, and that's because we suggest rstanarm:

pak::pkg_deps_explain("datawizard", "QuickJSR", dependencies = TRUE)
#> ℹ Loading metadata database✔ Loading metadata database ... done
#> datawizard -> brms -> rstan -> QuickJSR
#> datawizard -> rstanarm -> rstan -> QuickJSR
#> datawizard -> rstanarm -> shinystan -> rstan -> QuickJSR

(note that QuickJSR is also installed by rstan but this encouraged me to open this issue)

As I said before, I never used rstanarm before but it seems to me that shinystan isn't so important here. From what I can see shinystan is only imported to provide a method for objects of class stanreg. However, this doesn't require importing shinystan, suggesting it would be enough using s3_register() (see in particular the section "Usage in other packages").

I didn't find a trivial way to compute how many mandatory dependencies would be removed if shinystan was moved from Imports to Suggests, but I'd assume this number is quite high given all the dependencies of shiny that would no longer need to be installed.

library(deepdep)

dd <- deepdep("rstanarm", depth = 2)
plot_dependencies(dd)

Is this something you would consider?

Reproducible Steps:

N/A

RStanARM Version:

2.32.1

R Version:

4.4.0

Operating System:

Windows 10 x64 (build 19045)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant