This project is setup as an R package, which means you can set it up to run in the same way you would any other R package that isn't on CRAN.
Run devtools::install_github("tarensanders/screen_viz")
to install the package locally.
Before you can run it, you will need to make sure that app can access data from Cloudstor. To do this, you need two things:
Shared/screenviz
on Cloudstor (ask Taren for access if you don't have it).CLOUD_USER
and CLOUD_PASS
.
See the Cloudstor documentation for how to create and app password.
The easiest way to edit your R environment is to use usethis::edit_r_environ()
, then restart the session.screenviz::screenviz_app()
.To make edits to the app, you need a slightly different workflow. Note that you still need the requirements (folder access and environment variables) to run the app.
devtools::install_deps()
and (optionally) devtools::install_dev_deps()
.devtools::check()
or devtools::install()
.devtools::load_all(); devtools::screenviz_app()
, or by sourcing app.R
.To make changes, you need to commit changes to a new branch and open a PR to merge to either main
or dev
.
You cannot make changes directly to main
.
Before opening a PR, make sure to run devtools::check()
and devtools::install()
to check for build errors.
If your change adds new functions, please try to include a test and ensure it runs with devtools::test()
.
PRs to main
or dev
will run R-CMD-CHECK
using GitHub actions, and when the pull request is merged it will automatically be deployed to either the live app or the dev version.
To update the non-article components of the site, run the following commands from the project root:
rmarkdown::render_site("docs")
Note that this won't rerun any of the files in docs/_articles
.
Those need to be rerendered before the site is updated.
The changes can then be pushed to GitHub to update the pages.
Note that the changes are only visible if made in the main
branch.
The steps for creating or updating an article are:
docs/_articles
with output: distill::distill_article
as the output.rmarkdown
, etc).The steps for a new non-article page are:
docs
folder with site: distill::distill_website
as the output. Regardless of if it is an article or just a page, the following steps are required:
_site.yml
to include a link in the navbar.rmarkdown::render_site("docs")
from the project root.main
, the GitHub pages will update automatically.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.