-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from Appsilon/develop
main <- develop
- Loading branch information
Showing
95 changed files
with
3,333 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
.github | ||
.lintr | ||
tests/end2end | ||
pkgdown | ||
docs | ||
vignettes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Link to the Issue | ||
|
||
... | ||
|
||
### Definition of Done | ||
|
||
... | ||
|
||
### How to test changes | ||
|
||
... | ||
|
||
|
||
### Tasks for PR author | ||
|
||
- [ ] Test your change and ensure there is no regression | ||
- [ ] Change has a corresponding issue. ***Ensure it is linked in GitHub*** | ||
- [ ] Author of the change opened a pull request and assigned a reviewer | ||
|
||
### General policy: | ||
|
||
- If applicable - add instructions for testing | ||
- If there’s no issue, create it. Each issue needs to be well defined and described. | ||
- All interaction with a user, user-facing messages, plots, reports etc. are written from the perspective of the person using or receiving it. They are understandable and helpful to this person. If a user sees an error message, there is a call to action, i.e. the user knows what to do to fix it. | ||
- README, other documentation and code comments that we have is updated with all information related to the change. | ||
- All code has been peer-reviewed before merging into any main branch | ||
- All changes have been merged into the main branch we use for development. | ||
- Continuous integration checks (linter, unit tests, integration tests) are configured and pass. | ||
- Optional: unit tests added for all new or changed logic. | ||
- All task requirements satisfied. If not describe it here. The reviewer is responsible to verify each aspect of the task. | ||
- Change covers only things in task. Please create new PR if you want to fix something else. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
on: push | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
main: | ||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
runs-on: ${{ matrix.config.os }} | ||
|
||
timeout-minutes: 30 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-22.04, r: 'devel'} | ||
- {os: ubuntu-22.04, r: 'release'} | ||
- {os: ubuntu-22.04, r: 'oldrel'} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
|
||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: local::. # Necessary to avoid object usage linter errors. | ||
|
||
- name: R CMD check | ||
if: always() | ||
uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
error-on: '"note"' | ||
|
||
- name: Lint | ||
if: always() | ||
shell: Rscript {0} | ||
run: | | ||
lints <- lintr::lint_package() | ||
for (lint in lints) print(lint) | ||
quit(status = length(lints) > 0) | ||
- name: Spell Check | ||
if : always() | ||
shell: Rscript {0} | ||
run: | | ||
spell_check <- spelling::spell_check_package(use_wordlist = TRUE) | ||
if (nrow(spell_check) > 0) { | ||
print(spell_check) | ||
} | ||
quit(status = nrow(spell_check) > 0) | ||
- name: Test coverage | ||
if: matrix.config.os == 'ubuntu-22.04' && matrix.config.r == 'release' | ||
run: | | ||
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, local::. | ||
needs: website | ||
|
||
- name: Deploy to gh-pages branch | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
on: push | ||
|
||
name: package-usage-tests | ||
|
||
defaults: | ||
run: | ||
working-directory: ./tests/end2end/app/ | ||
|
||
jobs: | ||
main: | ||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
runs-on: ${{ matrix.config.os }} | ||
|
||
timeout-minutes: 30 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-22.04, r: 'devel'} | ||
- {os: ubuntu-22.04, r: 'release'} | ||
- {os: ubuntu-22.04, r: 'oldrel'} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
|
||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: local::. # Necessary to avoid object usage linter errors. | ||
|
||
- name: Install shiny.benchmark | ||
run: | | ||
Rscript -e "install.packages('remotes')" | ||
Rscript -e "remotes::install_local('../../../', quiet = TRUE)" | ||
- name: Create app structure | ||
run: | | ||
bash ./../setting_branches.sh | ||
- name: Check basic functionality - Cypress | ||
run: | | ||
Rscript ../run_tests.R cypress master,develop tests/cypress/ use_this_one_1 FALSE 1 | ||
- name: Check basic functionality - shinytest2 | ||
run: | | ||
Rscript ../run_tests.R shinytest2 master,develop tests/ use_this_one_1 FALSE 1 | ||
- name: Check if it fails when renv not present - Cypress | ||
run: | | ||
Rscript ./../run_tests.R cypress renv_missing,renv_shiny1,renv_shiny2 tests/cypress/ use_this_one_1 FALSE 1 | ||
- name: Check if it fails when renv not present - shinytest2 | ||
run: | | ||
Rscript ./../run_tests.R shinytest2 renv_missing,renv_shiny1,renv_shiny2 tests/ use_this_one_1 FALSE 1 | ||
- name: Check if it can handle renv - Cypress | ||
run: | | ||
Rscript ./../run_tests.R cypress renv_missing,renv_shiny1,renv_shiny2 tests/cypress/ use_this_one_1 TRUE 1 | ||
- name: Check if it can handle renv - shinytest2 | ||
run: | | ||
Rscript ./../run_tests.R shinytest2 renv_missing,renv_shiny1,renv_shiny2 tests/ use_this_one_1 TRUE 1 | ||
- name: Check if it can handle multiple files - Cypress | ||
run: | | ||
Rscript ./../run_tests.R cypress renv_shiny1,renv_shiny2 tests/cypress/,fake_folder/tests/cypress/ use_this_one_1 TRUE 1 | ||
- name: Check if it can handle multiple files - shinytest2 | ||
run: | | ||
Rscript ./../run_tests.R shinytest2 renv_shiny1,renv_shiny2 tests/,fake_folder/tests/ use_this_one_1 TRUE 1 | ||
- name: Check if we can replicate tests - Cypress | ||
run: | | ||
Rscript ./../run_tests.R cypress master,develop tests/cypress/ use_this_one_1 FALSE 2 | ||
- name: Check if we can replicate tests - shinytest2 | ||
run: | | ||
Rscript ./../run_tests.R shinytest2 master,develop tests/ use_this_one_1 FALSE 2 | ||
- name: Check if we can run tests based on file patterns - Cypress | ||
run: | | ||
Rscript ./../run_tests.R cypress master,develop tests/cypress/ use_this_one_[0-9] FALSE 1 | ||
- name: Check if we can run tests based on file patterns - shinytest2 | ||
run: | | ||
Rscript ./../run_tests.R shinytest2 master,develop tests/ use_this_one_[0-9] FALSE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,7 @@ vignettes/*.pdf | |
|
||
# R Environment Variables | ||
.Renviron | ||
|
||
# documentation page | ||
docs | ||
inst/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
linters: | ||
linters_with_defaults( | ||
line_length_linter = line_length_linter(100) | ||
) | ||
exclusions: | ||
c( | ||
"vignettes" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
Package: shiny.performance | ||
Title: Compare performance of several versions of a shiny app | ||
Version: 0.1.0 | ||
Package: shiny.benchmark | ||
Title: Benchmark the Performance of Shiny Applications | ||
Version: 0.1.1 | ||
Authors@R: | ||
c( | ||
person(given = "Douglas", family = "Azevedo", email = "douglas@appsilon.com", role = "aut"), | ||
person(given = "Pedro", family = "Silva", email = "pedro@appsilon.com", role = "aut"), | ||
person("Developers", "Appsilon", email = "support+opensource@appsilon.com", role = "cre"), | ||
person(family = "Appsilon Sp. z o.o.", role = "cph") | ||
person(given = "Douglas", family = "Azevedo", email = "opensource+douglas@appsilon.com", role = c("aut", "cre")), | ||
person(family = "Appsilon Sp. z o.o.", role = "cph", email = "opensource@appsilon.com") | ||
) | ||
Description: Compare performance of several versions of a shiny app based on commit hashs | ||
License: LGPL-3 + file LICENSE | ||
URL: https://github.com/Appsilon/shiny.performance | ||
SystemRequirements: yarn 1.22.17 or higher, cypress 9.4.1 or higher, xvfb | ||
Description: Compare performance between different versions of a Shiny application based on Git references. | ||
License: LGPL-3 | ||
URL: https://github.com/Appsilon/shiny.benchmark, https://github.com/Appsilon/shiny.benchmark | ||
BugReports: https://github.com/Appsilon/shiny.benchmark/issues | ||
SystemRequirements: yarn 1.22.17 or higher, Node 12 or higher | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
RoxygenNote: 7.2.3 | ||
VignetteBuilder: knitr | ||
Depends: | ||
R (>= 3.1.0) | ||
Suggests: | ||
covr, | ||
knitr, | ||
lintr, | ||
rcmdcheck, | ||
rmarkdown, | ||
mockr, | ||
spelling | ||
Imports: | ||
dplyr, | ||
ggplot2, | ||
glue, | ||
jsonlite, | ||
methods, | ||
progress, | ||
renv, | ||
shinytest2, | ||
stringr, | ||
testthat, | ||
fs | ||
Language: en-US |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(performance_tests) | ||
export(run_performance_test) | ||
importFrom(git2r,checkout) | ||
S3method(plot,shiny_benchmark) | ||
S3method(print,shiny_benchmark) | ||
S3method(summary,shiny_benchmark) | ||
export(benchmark) | ||
export(benchmark_cypress) | ||
export(benchmark_shinytest2) | ||
export(load_example) | ||
export(run_cypress_ptest) | ||
export(run_shinytest2_ptest) | ||
export(shiny_benchmark_class) | ||
exportClasses(shiny_benchmark) | ||
import(dplyr) | ||
import(ggplot2) | ||
importFrom(glue,glue) | ||
importFrom(jsonlite,write_json) | ||
importFrom(methods,new) | ||
importFrom(progress,progress_bar) | ||
importFrom(renv,activate) | ||
importFrom(renv,restore) | ||
importFrom(shinytest2,test_app) | ||
importFrom(stats,median) | ||
importFrom(stringr,str_trim) | ||
importFrom(testthat,ListReporter) | ||
importFrom(utils,globalVariables) | ||
importFrom(utils,menu) | ||
importFrom(utils,read.table) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 0.1.1 | ||
|
||
Adding a minimal example using `shinytest2` |
Oops, something went wrong.