Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 1.47 KB

CONTRIBUTING.md

File metadata and controls

41 lines (35 loc) · 1.47 KB

General tips

Setting up local environment

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()

Debugging test cases

  1. Use the devtools package.
library(devtools)
  1. Add a checkpoint in code
...
browser()
...
  1. In the console, run tests interactively. Without calling the below line of code, the browser() checkpoints are ignored.
rlang::with_interactive(test_active_file())

Running Shiny apps

  • 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)

Tips to testing specific parts of the system

Code generation

Note: The code generation module relies on a separate Python package, tisanecodegenerator. If there are bugs in the code generator module, file issues here.