CONTRIBUTING.md

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

# 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.



emjun/tisaner documentation built on Nov. 9, 2024, 6:32 p.m.