Create an environment setup script that loads dependencies that are helpful for running and debugging rTisane programs. For example, I have a env_setup.R
file that contains the following:
options(shiny.launch.browser = .rs.invokeShinyWindowExternal)
library(shiny)
library(plotly)
# For development
devtools::load_all()
- Use the
devtools
package.
library(devtools)
- Add a checkpoint in code
...
browser()
...
- In the console, run tests interactively. Without calling the below line of code, the
browser()
checkpoints are ignored.
rlang::with_interactive(test_active_file())
- Tip 1: Open any Shiny apps in the default web browser (e.g., Firefox, Chrome, etc.) and do not open in the RStudio browser.
# Add to ~/.Rprofile to prevent Shiny from opening new RStudio internal browser each time
options(shiny.launch.browser = .rs.invokeShinyWindowExternal)
Note: The code generation module relies on a separate Python package, tisanecodegenerator. If there are bugs in the code generator module, file issues here.