Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 38cf7db

Browse files
committed
removed with,r fs, and dplyr from dependencies
1 parent 4d67e62 commit 38cf7db

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

DESCRIPTION

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ RoxygenNote: 7.2.0
1212
Imports:
1313
rappdirs,
1414
janitor,
15-
vroom,
16-
withr,
17-
fs,
18-
dplyr
15+
vroom
1916
Suggests:
2017
knitr,
18+
fs,
2119
rmarkdown,
20+
withr,
2221
testthat (>= 3.0.0)
2322
Config/testthat/edition: 3
2423
URL: https://github.com/QuartzSoftwareLLC/tidyiddr

man/cache_download.Rd

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/setup.R

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
library(fs)
2-
library(dplyr)
32
dir_fixture <- function(dir = file_temp(), env = parent.frame()) {
43
op <- options(tidyiddr_cache_dir = dir)
54
withr::defer(options(op), envir = env)

tests/testthat/test_cache_download.R

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ test_that("caches to memory and disk by default", {
55
dir <- dir_fixture()
66
cache_download(url)
77
memory_name <- (paste0(janitor::make_clean_names(url), ".memory"))
8-
memory_name %>%
9-
exists() %>%
8+
memory_name |>
9+
exists() |>
1010
expect_true()
11-
dir %>%
12-
list.files() %>%
11+
dir |>
12+
list.files() |>
1313
expect_length(1)
1414
})
1515

1616
test_that("can turn of cache to disk with params", {
1717
dir <- dir_fixture()
1818
cache_download(url, use_disk = FALSE)
19-
dir %>%
20-
list.files() %>%
19+
dir |>
20+
list.files() |>
2121
expect_length(0)
2222
})
2323

@@ -26,8 +26,8 @@ test_that("can turn off cache to disk with options", {
2626
op <- options(tidyiddr_use_cache = F)
2727
withr::defer(options(op))
2828
cache_download(url)
29-
dir %>%
30-
list.files() %>%
29+
dir |>
30+
list.files() |>
3131
expect_length(0)
3232
})
3333

@@ -37,14 +37,14 @@ test_that("cache busting works", {
3737
a <- data.frame(a = 1, b = 3, c = 5)
3838
write.csv(a, url, row.names = FALSE)
3939
aread <- cache_download(url)
40-
aread %>%
41-
as.data.frame() %>%
40+
aread |>
41+
as.data.frame() |>
4242
expect_equal(a)
4343
b <- data.frame(b = 2, a = 1, c = 3)
4444
write.csv(b, url, row.names = FALSE)
4545
bread <- cache_download(url, bust_cache = T)
4646

47-
bread %>%
48-
as.data.frame() %>%
47+
bread |>
48+
as.data.frame() |>
4949
expect_equal(b)
5050
})

0 commit comments

Comments
 (0)