Release frictionless 1.2.0
Closed this issue · 2 comments
Prepare for release:
- Merge #246
-
git pull
- Check current CRAN check results
- Polish NEWS
-
urlchecker::url_check()
-
devtools::build_readme()
-
devtools::check(remote = TRUE, manual = TRUE)
-
devtools::check_win_devel()
-
revdepcheck::revdep_check(num_workers = 4)
- Update
cran-comments.md
-
git push
Submit to CRAN:
- Update
Date
inDESCRIPTION
-
usethis::use_version('minor')
- Run
cffr::cff_write()
(automatic) -
devtools::submit_cran()
ordevtools::release()
- Approve email
Wait for CRAN...
- Accepted 🎉
- Finish & publish blog post
-
usethis::use_github_release()
- Update Zenodo deposit
-
usethis::use_dev_version(push = TRUE)
- Announce
There is currently one error on CRAN:
> # Get the Table Schema for the resource "observations"
> schema <- get_schema(package, "observations")
Error in `purrr::map_chr()`:
ℹ In index: 1.
Caused by error in `check_path()`:
! Can't find file at
<https://raw.githubusercontent.com/frictionlessdata/frictionless-r/main/inst/extdata/observations_1.csv>.
Backtrace:
▆
1. └─frictionless::get_schema(package, "observations")
2. └─frictionless:::get_resource(package, resource_name)
3. └─purrr::map_chr(resource$path, ~check_path(.x, package$directory, safe = TRUE))
4. └─purrr:::map_("character", .x, .f, ..., .progress = .progress)
5. ├─purrr:::with_indexed_errors(...)
6. │ └─base::withCallingHandlers(...)
7. ├─purrr:::call_with_cleanup(...)
8. └─frictionless (local) .f(.x[[i]], ...)
9. └─frictionless:::check_path(.x, package$directory, safe = TRUE)
10. └─cli::cli_abort("Can't find file at {.url {path}}.", class = "frictionless_error_url_not_found")
11. └─rlang::abort(...)
Execution halted
With the comment:
Do remmber to look at any 'Additional issues'.
It seems we need to remind you of the CRAN policy:
'Packages which use Internet resources should fail gracefully with an informative message
if the resource is not available or has changed (and not give a check warning nor error).'This needs correction whether or not the resource recovers.
Solution
- The error is caused by this recent change, where
observations_1.csv
was replaced withobservations_1.tsv
. This was not caused by askip_if_offline()
because it is a function example, not a test - The example of
get_schema()
still calls observations, but the resource is now local. Here's how the example currently behaves without internet connection:
library(frictionless)
# Load the example Data Package
package <- example_package()
# Get the Table Schema for the resource "observations"
schema <- get_schema(package, "observations")
str(schema)
#> List of 4
#> $ fields :List of 7
#> ..$ :List of 3
#> .. ..$ name : chr "observation_id"
#> .. ..$ type : chr "string"
#> .. ..$ constraints:List of 2
#> .. .. ..$ required: logi TRUE
#> .. .. ..$ unique : logi TRUE
#> ..$ :List of 3
#> .. ..$ name : chr "deployment_id"
#> .. ..$ type : chr "string"
#> .. ..$ constraints:List of 1
#> .. .. ..$ required: logi TRUE
#> ..$ :List of 4
#> .. ..$ name : chr "timestamp"
#> .. ..$ type : chr "datetime"
#> .. ..$ format : chr "%Y-%m-%dT%H:%M:%S%z"
#> .. ..$ constraints:List of 1
#> .. .. ..$ required: logi TRUE
#> ..$ :List of 3
#> .. ..$ name : chr "scientific_name"
#> .. ..$ type : chr "string"
#> .. ..$ constraints:List of 1
#> .. .. ..$ required: logi FALSE
#> ..$ :List of 3
#> .. ..$ name : chr "count"
#> .. ..$ type : chr "integer"
#> .. ..$ constraints:List of 2
#> .. .. ..$ required: logi FALSE
#> .. .. ..$ minimum : int 1
#> ..$ :List of 3
#> .. ..$ name : chr "life_stage"
#> .. ..$ type : chr "string"
#> .. ..$ constraints:List of 2
#> .. .. ..$ required: logi FALSE
#> .. .. ..$ enum : chr [1:5] "adult" "subadult" "juvenile" "offspring" ...
#> ..$ :List of 3
#> .. ..$ name : chr "comments"
#> .. ..$ type : chr "string"
#> .. ..$ constraints:List of 1
#> .. .. ..$ required: logi FALSE
#> $ missingValues: chr [1:3] "" "NA" "NaN"
#> $ primaryKey : chr "observation_id"
#> $ foreignKeys :List of 1
#> ..$ :List of 2
#> .. ..$ fields : chr "deployment_id"
#> .. ..$ reference:List of 2
#> .. .. ..$ resource: chr "deployments"
#> .. .. ..$ fields : chr "deployment_id"
Created on 2024-08-26 with reprex v2.1.0
That should resolve running the tests on CRAN. For users, I think frictionless in general follows the rOpenSci guidelines for graceful HTTP and we "transform the error into a useful error" with check_patch()
There is also a NOTE on cran:
Result: NOTE
Found the following Rd file(s) with Rd \link{} targets missing package
anchors:
read_resource.Rd: tibble
Please provide package anchors for all Rd \link{} targets not in the
package itself and the base packages.
This is caused by:
frictionless-r/R/read_resource.R
Line 19 in bea468d
But has been fixed to:
frictionless-r/R/read_resource.R
Line 19 in f9185cb