Skip to content

Commit

Permalink
working: init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dchodge committed Dec 11, 2024
0 parents commit 16acf80
Show file tree
Hide file tree
Showing 41 changed files with 38,452 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if (file.exists("renv")) {
source("renv/activate.R")
} else {
# The `renv` directory is automatically skipped when deploying with rsconnect.
message("No 'renv' directory found; renv won't be activated.")
}

# Allow absolute module imports (relative to the app root).
options(box.path = getwd())
80 changes: 80 additions & 0 deletions .github/workflows/rhino-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Rhino Test
on:
# Run on pushes to 'main' branch
push:
branches:
- main
# Run on any opened pull request
pull_request:
# Run manually via GitHub Actions website
workflow_dispatch:
permissions:
contents: read
jobs:
main:
name: Run linters and tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup system dependencies
run: |
packages=(
# List each package on a separate line.
)
sudo apt-get update
sudo apt-get install --yes "${packages[@]}"
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: renv

- name: Setup R dependencies
uses: r-lib/actions/setup-renv@v2

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Lint R
if: always()
shell: Rscript {0}
run: rhino::lint_r()

- name: Lint JavaScript
if: always()
shell: Rscript {0}
run: rhino::lint_js()

- name: Lint Sass
if: always()
shell: Rscript {0}
run: rhino::lint_sass()

- name: Build JavaScript
if: always()
shell: Rscript {0}
run: rhino::build_js()

- name: Build Sass
if: always()
shell: Rscript {0}
run: rhino::build_sass()

- name: Run R unit tests
if: always()
shell: Rscript {0}
run: rhino::test_r()

- name: Run Cypress end-to-end tests
if: always()
uses: cypress-io/github-action@v6
with:
working-directory: .rhino # Created by earlier commands which use Node.js
start: npm run run-app
project: ../tests
wait-on: 'http://localhost:3333/'
wait-on-timeout: 60
5 changes: 5 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
linters:
linters_with_defaults(
defaults = box.linters::rhino_default_linters,
line_length_linter = line_length_linter(100)
)
3 changes: 3 additions & 0 deletions .renvignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Only use `dependencies.R` to infer project dependencies.
*
!dependencies.R
7 changes: 7 additions & 0 deletions .rscignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.github
.lintr
.renvignore
.Renviron
.rhino
.rscignore
tests
8 changes: 8 additions & 0 deletions app.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Rhino / shinyApp entrypoint. Do not edit.
#setwd("serosim_rhino/")
#rhino::build_sass()
#rhino::build_js()

library(devtools)
#install("../serosim")
rhino::app()
3 changes: 3 additions & 0 deletions app/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function showHelp() {
alert('Learn more about Rhino: https://appsilon.github.io/rhino/');

Check failure on line 2 in app/js/index.js

View workflow job for this annotation

GitHub Actions / Run linters and tests

Expected indentation of 2 spaces but found 4
}

Check failure on line 3 in app/js/index.js

View workflow job for this annotation

GitHub Actions / Run linters and tests

Newline required at end of file but not found
2 changes: 2 additions & 0 deletions app/logic/__init__.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Logic: application code independent from Shiny.
# https://go.appsilon.com/rhino-project-structure
Loading

0 comments on commit 16acf80

Please sign in to comment.