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

runExample() improvements #3907

Open
schloerke opened this issue Oct 2, 2023 · 3 comments
Open

runExample() improvements #3907

schloerke opened this issue Oct 2, 2023 · 3 comments
Assignees

Comments

@schloerke
Copy link
Collaborator

Prior PR #1458 that sparked conversation.
(Note: PR closed when HEAD branch was moved.)

Goal

Adopt some plumber::plumb_api() functionality for shiny::runExample():

  • Package has value, no example name: Provides all examples for package
  • No example name, no package name: Provides all examples for all installed packages
  • For now, no edit parameter.
  • Printing method
  • Use "shiny" as subfolder within inst to distinguish from generically named "examples" folder
    • Keep examples as is. Packages like {shinytest2} depend on it being there.
    • Ask team for new core / bslib examples to fill inst/shiny apps

Code to alter from:

@gadenbuie
Copy link
Member

This issue proposes shiny as the directoy

  • Use "shiny" as subfolder within inst to distinguish from generically named "examples" folder

In #3917, Karan used shiny-examples

examples_dir <- system.file("shiny-examples", package = package)

and I generally agree with him -- but I think we should name this folder examples-shiny.

I think shiny is too generic and there are lots of reasons someone might want to include a bare shiny folder in their package. But examples-shiny sorts with the original examples folder and makes its purpose very clear.

@cpsievert
Copy link
Collaborator

I think this can be closed now?

@gadenbuie
Copy link
Member

I think this can be closed now?

I thought there was still some planned work around user conveniences. My implementation was kind of bare-bones compared to what Karan had started.

@cpsievert cpsievert reopened this Mar 23, 2024
@cpsievert cpsievert changed the title Add support for runExample(package=) runExample() improvements Mar 23, 2024
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

4 participants