Skip to content

Commit 4090f5a

Browse files
authored
Merge pull request #291 from frictionlessdata/remote_zip
Remote zips are now supported
2 parents f3148f2 + 3ddaddd commit 4090f5a

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- {os: ubuntu-latest, r: 'release'}
2525
- {os: ubuntu-latest, r: 'oldrel-1'}
2626
# And minimum supported version in DESCRIPTION
27-
- {os: ubuntu-latest, r: '3.6.0'}
27+
- {os: ubuntu-latest, r: '4.1.0'}
2828

2929
env:
3030
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ URL: https://github.com/frictionlessdata/frictionless-r,
3232
https://docs.ropensci.org/frictionless/
3333
BugReports: https://github.com/frictionlessdata/frictionless-r/issues
3434
Depends:
35-
R (>= 3.6.0)
35+
R (>= 4.1.0)
3636
Imports:
3737
cli,
3838
dplyr,
@@ -58,4 +58,4 @@ Config/testthat/edition: 3
5858
Encoding: UTF-8
5959
LazyData: true
6060
Roxygen: list(markdown = TRUE)
61-
RoxygenNote: 7.3.2
61+
RoxygenNote: 7.3.3

NEWS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
* `resources()` is soft-deprecated, please use `resource_names()` instead (#282).
44
* `get_schema()` is soft-deprecated, please use `schema()` instead (#282).
5+
* `read_resource()` now supports reading from remote zip files, thanks to support in {vroom} (1.3.0) (#291).
6+
* frictionless now relies on R >= 4.1.0 (because of an indirect {vroom} dependency) (#291).
57

68
# frictionless 1.2.1
79

8-
* **frictionless now relies on R version 3.6.0 or higher**. Originally it stated version 3.5.0 or higher, but this was not tested and likely not true (#238).
10+
* frictionless now relies on R version 3.6.0 or higher. Originally it stated version 3.5.0 or higher, but this was not tested and likely not true (#238).
911
* `read_package()` now returns a warning rather than an error when a `datapackage.json` contains no resources. This allows use to create the JSON and then add resources with frictionless (#265).
1012
* `example_package()` now has a `version` parameter, allowing to load the example Data Package following the Data Package [v1](https://specs.frictionlessdata.io/) or [v2](https://datapackage.org/) specification (#249).
1113

man/frictionless-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-read_resource.R

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -579,17 +579,7 @@ test_that("read_resource() can read compressed files", {
579579
)
580580

581581
expect_identical(read_resource(p_local_zip, "deployments"), resource)
582-
# Remote zip not supported, see
583-
# https://github.com/tidyverse/readr/issues/1042#issuecomment-545103047
584-
expect_error(
585-
read_resource(p_remote_zip, "deployments"),
586-
regexp = paste(
587-
"Reading from remote `zip` compressed files is not supported,",
588-
" download the files locally first.",
589-
sep = "\n"
590-
),
591-
fixed = TRUE
592-
)
582+
expect_identical(read_resource(p_remote_zip, "deployments"), resource)
593583
expect_identical(read_resource(p_local_gz, "deployments"), resource)
594584
expect_identical(read_resource(p_remote_gz, "deployments"), resource)
595585
})

vignettes/data-resource.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,4 @@ package$resources[[2]]$encoding
239239

240240
[`compression`](https://specs.frictionlessdata.io/patterns/#specification-3) (a recipe) is ignored by `read_resource()` and not set by `add_resource()`.
241241

242-
Compression is derived from the provided `path` instead. If the `path` ends in `.gz`, `.bz2`, `.xz`, or `.zip`, the files are automatically decompressed by `read_resource()` (using default `readr::read_delim()` functionality). Only `.gz` files can be read directly from URL `path`s.
242+
Compression is derived from the provided `path` instead. If the `path` ends in `.gz`, `.bz2`, `.xz`, or `.zip`, the files are automatically decompressed by `read_resource()` (using default `readr::read_delim()` functionality).

0 commit comments

Comments
 (0)