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

feat: Run examples from any package #4005

Merged
merged 10 commits into from
Mar 21, 2024
Merged

feat: Run examples from any package #4005

merged 10 commits into from
Mar 21, 2024

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Mar 21, 2024

This PR makes it possible for any package to provide shiny examples in inst/examples-shiny and have them be runnable/discoverable via runExample().

This PR simply exposes package in the runExample() function signature, giving us the core feature described in #3907. The work in #3917 is still useful to make this feature more user-friendly and can be done in the next release. But we can get the core feature out in the wild so people can start to use it.

Note that for non-shiny packages, the examples directory must be inst/examples-shiny. The shiny.legacy.examples option only has takes effect when looking for examples in shiny itself.

Note: stacks on top of #4003. We can merge this into #4003 so we can merge the examples changes all at once.

@gadenbuie gadenbuie requested a review from cpsievert March 21, 2024 13:47
@gadenbuie gadenbuie changed the base branch from main to chore/rename-examples-dir March 21, 2024 14:14
R/runapp.R Outdated Show resolved Hide resolved
R/runapp.R Show resolved Hide resolved
R/runapp.R Show resolved Hide resolved
Base automatically changed from chore/rename-examples-dir to main March 21, 2024 15:58
@cpsievert cpsievert merged commit 43698f0 into main Mar 21, 2024
12 checks passed
@cpsievert cpsievert deleted the feat/run-examples-package branch March 21, 2024 17:07
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

Successfully merging this pull request may close these issues.

3 participants