Skip to content

Commit

Permalink
Cleanups (#12)
Browse files Browse the repository at this point in the history
* ignore vignettes, update tests

* depend on nflreadr 1.3.0, closes #6

* use v2 gha

* switch ::: to ::

* update rproj to use magrittr pipe by default (to ensure compat 3.6.0)
  • Loading branch information
tanho63 authored Oct 17, 2022
1 parent 699a119 commit e8012c5
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 19 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^models$
^codecov\.yml$
^\.Renviron$
^vignettes$
8 changes: 4 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2

- name: Show testthat output
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pkgdown-pak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
needs: website
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Imports:
hardhat (>= 0.1.0),
janitor (>= 1.0.0),
magrittr (>= 1.0.0),
nflreadr (>= 1.1.3),
nflreadr (>= 1.3.0),
purrr (>= 0.3.0),
rappdirs (>= 0.3.0),
recipes (>= 0.1.16),
Expand Down
2 changes: 1 addition & 1 deletion R/ep_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @family main
#'
#' @export
ep_build <- function(season = nflreadr:::most_recent_season(), version = "latest"){
ep_build <- function(season = nflreadr::most_recent_season(), version = "latest"){

version <- rlang::arg_match0(version, c("latest", "v1.0.0"))

Expand Down
2 changes: 1 addition & 1 deletion R/ep_load.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @family main
#'
#' @export
ep_load <- function(season = nflreadr:::most_recent_season(),
ep_load <- function(season = nflreadr::most_recent_season(),
type = c("weekly","pbp_pass","pbp_rush"),
version = c("latest","v1.0.0")){

Expand Down
2 changes: 2 additions & 0 deletions ffopportunity.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace

UseNativePipeOperator: No
2 changes: 1 addition & 1 deletion man/ep_build.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ep_load.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/testthat/test-ep_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ test_that("ep_build and ep_load work", {
expect_equal(nrow(ep_2020$ep_weekly), nrow(ep_weekly))
expect_equal(nrow(ep_2020$ep_pbp_pass), nrow(ep_pbp_pass))
expect_equal(nrow(ep_2020$ep_pbp_rush), nrow(ep_pbp_rush))

})
10 changes: 7 additions & 3 deletions update/ep_update.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ update_ep <- function(season, version = "v1.0.0", folder_path){
upload_ep_data(folder_path, version)
invisible(NULL)
}

version <- "v1.0.0"
temp <- tempdir(check = TRUE)

try(piggyback::pb_new_release(repo = "ffverse/ffopportunity", tag = "latest-data"))
try(piggyback::pb_new_release(repo = "ffverse/ffopportunity", tag = glue::glue("{version}-data")))
temp <- tempdir()
update_ep(nflreadr:::most_recent_season(), version = "latest", folder_path = temp)
update_ep(nflreadr:::most_recent_season(), version = "v1.0.0", folder_path = temp)

update_ep(nflreadr::most_recent_season(), version = "latest", folder_path = temp)
update_ep(nflreadr::most_recent_season(), version = "v1.0.0", folder_path = temp)

unlink(temp, recursive = TRUE, force = TRUE)

0 comments on commit e8012c5

Please sign in to comment.