Skip to content

Package API #95

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

Merged
merged 12 commits into from
Jul 18, 2025
Merged

Package API #95

merged 12 commits into from
Jul 18, 2025

Conversation

trannttoan
Copy link
Contributor

No description provided.

trannttoan added 12 commits July 8, 2025 12:22
- Reduce the sizes of the example data and estimate result for polling data
- Add get_possible_geos
- Remove magrittr pipe from export list
- Add icons to Shiny app navbar title and tab title
- Add cmdstan installation
@trannttoan trannttoan requested a review from Copilot July 18, 2025 09:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the "Package API" by restructuring the shinymrp package to provide a programmatic interface alongside the existing Shiny GUI. The changes establish a clear object-oriented workflow using R6 classes while consolidating documentation.

  • Major refactoring to introduce MRPWorkflow and MRPModel R6 classes for programmatic access
  • Consolidation of vignettes from multiple separate guides into comprehensive workflow documentation
  • Extensive test updates to align with new API parameter structure

Reviewed Changes

Copilot reviewed 63 out of 96 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vignettes/workflow.Rmd New comprehensive workflow vignette demonstrating the complete MRP analysis pipeline
vignettes/getting-started.Rmd Updated getting started guide with API examples and installation instructions
R/workflow.R New MRPWorkflow R6 class implementing the main workflow interface
R/model.R New MRPModel R6 class for individual model management and analysis
tests/testthat/test-fct_model.R Updated test parameters to match new API structure
Comments suppressed due to low confidence (4)

R/run_app.R:30

  • The documentation format is inconsistent. Should use ?golem::get_golem_options instead of \code{?golem::get_golem_options} for consistency with roxygen2 markdown format.
}

tests/testthat/test-fct_model.R:135

  • The new parameter structure suggests API changes, but the test coverage for error handling and edge cases with these new parameters may be insufficient. Consider adding tests for invalid parameter combinations.
    show_messages = FALSE,

R/workflow.R:21

  • [nitpick] The error message suggests using shinymrp::install_cmdstan() but this may not be clear to users. Consider providing more context about what CmdStan is and why it's required.
  if (is.null(cmdstanr::cmdstan_version(error_on_NA = FALSE))) {

@trannttoan trannttoan merged commit 39cddc9 into main Jul 18, 2025
4 checks passed
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.

1 participant