Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #365

Merged
merged 17 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/deploy-shiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.2.1
use-public-rspm: true

- name: Set env vars (dev)
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/shiny-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
automatedTests:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
name: shiny-tests

strategy:
fail-fast: false
Expand All @@ -25,11 +25,10 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.2.1
use-public-rspm: true

- name: Cache R packages
Expand Down Expand Up @@ -77,4 +76,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-tests
path: tests
path: tests
7 changes: 3 additions & 4 deletions .github/workflows/tidyCode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
tidyCode:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
name: tidy-code

strategy:
fail-fast: false
Expand All @@ -25,11 +25,10 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.2.1
use-public-rspm: true

- name: Cache R packages
Expand Down Expand Up @@ -78,4 +77,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-tests
path: tests
path: tests
16 changes: 13 additions & 3 deletions .hooks/pre-commit.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat("Running commit hooks...",fill=TRUE)
shhh <- suppressPackageStartupMessages # It's a library, so shhh!
shhh(library(dplyr))
shhh(library(xfun))

shhh(library(dfeshiny))

error_flag <- FALSE

Expand All @@ -28,8 +28,6 @@ if(ncol(ign_files)>1){
}
}



suffixes <- "xlsx$|dat$|csv$|tex$|pdf$"

current_files <- data.frame(files = list.files("./", recursive = TRUE)) %>%
Expand Down Expand Up @@ -69,4 +67,16 @@ if (error_flag) {
quit(save = "no", status = 1, runLast = FALSE)
}

tidy_output <- tidy_code()
if(any(tidy_output)){
error_flag <- TRUE
}

if (error_flag) {
cat("Warning: Code did not appear to have been tidied.\nI've run tidy code for you,
please check your files and the dashboard still works and then re-stage and try committing again.")
quit(save = "no", status = 1, runLast = FALSE)
}


# End of hooks
3 changes: 2 additions & 1 deletion global.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ shhh(library(shiny))
shhh(library(shinyjs))
shhh(library(tools))
shhh(library(testthat))
shhh(library(shinytest))
shhh(library(shinytest2))
shhh(library(diffviewer))
shhh(library(shinyWidgets))
shhh(library(shinyGovstyle))
shhh(library(janitor))
Expand Down
Loading
Loading