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

Update GH actions to use R 3.x #235

Closed
wants to merge 5 commits into from
Closed

Update GH actions to use R 3.x #235

wants to merge 5 commits into from

Conversation

damianooldoni
Copy link
Contributor

This PR adds an automated configuration OS/R version for R-CMD-CHECK action. In particular, we would like to check that users using the minimal R supported version (3.5) can install the package and use it without any error.

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8f98049) to head (b6b9caf).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #235   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          571       571           
=========================================
  Hits           571       571           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@damianooldoni
Copy link
Contributor Author

It seems that we need to set an higher minimal R version if we want to use readr and testthat

See https://github.com/frictionlessdata/frictionless-r/actions/runs/9856342939/job/27213129214?pr=235, in particular the error message:

  Error: 
  ! error in pak subprocess
  Caused by error: 
  ! Could not solve package dependencies:
  * deps::.:
    * Can't install dependency readr (>= 2.1.0) (>= 3.0.0)
    * Can't install dependency testthat (>= 3.0.0)
  * readr: Needs R >= 3.6
  * testthat: Needs R >= 3.6.0

I will check using 3.6 now.

@damianooldoni
Copy link
Contributor Author

R 3.6 seems also not working using the most recent versions of the dependencies. See error in action: https://github.com/frictionlessdata/frictionless-r/actions/runs/9856412491/job/27213351610?pr=235

In particular, the error message:

Error: 
  ! error in pak subprocess
  Caused by error: 
  ! Could not solve package dependencies:
  * deps::.:
    * Can't install dependency knitr (>= 3.0.0)
    * Can't install dependency rmarkdown (>= 3.0.0)
    * Can't install dependency testthat (>= 3.0.0)
  * knitr: Can't install dependency evaluate (>= 0.15)
  * evaluate: Needs R >= 4.0.0
  * rmarkdown: Can't install dependency evaluate (>= 0.13)
  * testthat: Can't install dependency evaluate (>= 0.21)

Still, notice that the packages generating the errors are suggested (Suggests section in DESCRIPTION), not essential for using the package.

Testing using 3.6.3, same as in camtraptor.

@damianooldoni
Copy link
Contributor Author

No, even using 3.6.3 doesn't solve the issue. See action https://github.com/frictionlessdata/frictionless-r/actions/runs/9856412491/job/27213351610?pr=235

In particular, see error message:

Error: 
  ! error in pak subprocess
  Caused by error: 
  ! Could not solve package dependencies:
  * deps::.:
    * Can't install dependency knitr (>= 3.0.0)
    * Can't install dependency rmarkdown (>= 3.0.0)
    * Can't install dependency testthat (>= 3.0.0)
  * knitr: Can't install dependency evaluate (>= 0.15)
  * evaluate: Needs R >= 4.0.0
  * rmarkdown: Can't install dependency evaluate (>= 0.13)
  * testthat: Can't install dependency evaluate (>= 0.21)

Again, packages generating the errors are not imported, but "only" suggested.

@damianooldoni
Copy link
Contributor Author

damianooldoni commented Jul 9, 2024

Even removing the minimal version of testthat (3.0.0) doesn't improve the situation. The problem is still the package evaluate, which is a dependency of knitr, rmarkdown and testthat.

I have just installed R 3.5 on my (Windows) machine and tried to install frictionless. It seems not possible. The problems are (at least) related with cli package which blocks the installations of dplyr and purrr. Notice that for this old version of R many packages need to be installed by source.

cli, by the way, run automatic R CMD CHECK tests for R 4.0.5 or higher. But in its DESCRIPTION mentions R 3.4 as minimal version. So, we are not the only having this discrepancy between nominal minimal version and the actual version.

@peterdesmet, @sannegovaert, @PietrH: I think we should at least warn the users to install R 4.0.0 or higher in README. Any thought?

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

I've just tried running R CMD CHECK on a freshly cloned version of this repo (3395464) , on R 3.6.4:

==> devtools::check()

Updating frictionless documentation
Warning: Installed roxygen2 is older than the version used with this package
ℹ You have "7.2.3" but you need "7.3.2"
ℹ Loading frictionless
── Building ─────────────────────────────────────────────────────────────────────── frictionless ──
Setting env vars:
• CFLAGS    : -Wall -pedantic -fdiagnostics-color=always
• CXXFLAGS  : -Wall -pedantic -fdiagnostics-color=always
• CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
───────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/data/home/innovauth/[email protected]/test-frictionless/frictionless-r/DESCRIPTION’ ...
─  preparing ‘frictionless’:
✔  checking DESCRIPTION meta-information ...
─  installing the package to build vignettes
✔  creating vignettes (2.6s)
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘frictionless_1.1.0.9000.tar.gz’
   
── Checking ─────────────────────────────────────────────────────────────────────── frictionless ──
Setting env vars:
• _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
• _R_CHECK_CRAN_INCOMING_       : FALSE
• _R_CHECK_FORCE_SUGGESTS_      : FALSE
• NOT_CRAN                      : true
── R CMD check ─────────────────────────────────────────────────────────────────
─  using log directory ‘/data/home/innovauth/[email protected]/test-frictionless/frictionless.Rcheck’
─  using R version 3.6.3 (2020-02-29)
─  using platform: x86_64-pc-linux-gnu (64-bit)
─  using session charset: UTF-8
─  using options ‘--no-manual --as-cran’
✔  checking for file ‘frictionless/DESCRIPTION’
─  this is package ‘frictionless’ version ‘1.1.0.9000’
─  package encoding: UTF-8
✔  checking package namespace information ...
✔  checking package dependencies (6.1s)
✔  checking if this is a source package ...
✔  checking if there is a namespace
✔  checking for executable files ...
✔  checking for hidden files and directories
✔  checking for portable file names ...
✔  checking for sufficient/correct file permissions
✔  checking whether package ‘frictionless’ can be installed (1.8s)
✔  checking installed package size ...
✔  checking package directory
✔  checking for future file timestamps (334ms)
✔  checking ‘build’ directory ...
✔  checking DESCRIPTION meta-information ...
✔  checking top-level files ...
✔  checking for left-over files
✔  checking index information ...
✔  checking package subdirectories ...
✔  checking R files for non-ASCII characters ...
✔  checking R files for syntax errors ...
✔  checking whether the package can be loaded (378ms)
✔  checking whether the package can be loaded with stated dependencies ...
✔  checking whether the package can be unloaded cleanly ...
✔  checking whether the namespace can be loaded with stated dependencies ...
✔  checking whether the namespace can be unloaded cleanly (370ms)
✔  checking loading without being on the library search path (401ms)
✔  checking dependencies in R code (398ms)
✔  checking S3 generic/method consistency (793ms)
✔  checking replacement functions (347ms)
✔  checking foreign function calls (364ms)
N  checking R code for possible problems (2.7s)
   add_resource: no visible global function definition for ‘...names’
   Undefined global functions or variables:
     ...names
✔  checking Rd files ...
✔  checking Rd metadata ...
✔  checking Rd line widths ...
✔  checking Rd cross-references ...
✔  checking for missing documentation entries (364ms)
✔  checking for code/documentation mismatches (1.1s)
✔  checking Rd \usage sections (894ms)
✔  checking Rd contents ...
✔  checking for unstated dependencies in examples ...
✔  checking contents of ‘data’ directory ...
✔  checking data for non-ASCII characters ...
✔  checking data for ASCII and uncompressed saves ...
    WARNING
   ‘qpdf’ is needed for checks on size reduction of PDFs
✔  checking installed files from ‘inst/doc’ ...
✔  checking files in ‘vignettes’ ...
E  checking examples (675ms)
   Running examples in ‘frictionless-Ex.R’ failed
   The error most likely occurred in:
   
   > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
   > ### Name: add_resource
   > ### Title: Add a Data Resource
   > ### Aliases: add_resource
   > 
   > ### ** Examples
   > 
   > # Load the example Data Package
   > package <- example_package
   > 
   > # List resources
   > resources(package)
   [1] "deployments"  "observations" "media"       
   > 
   > # Create a data frame
   > df <- data.frame(
   +   multimedia_id = c(
   +     "aed5fa71-3ed4-4284-a6ba-3550d1a4de8d",
   +     "da81a501-8236-4cbd-aa95-4bc4b10a05df"
   +   ),
   +   x = c(718, 748),
   +   y = c(860, 900)
   + )
   > 
   > # Add resource "positions" to the Data Package, from the data frame
   > package <- add_resource(package, "positions", data = df)
   Error in ...names() : could not find function "...names"
   Calls: add_resource
   Execution halted
✔  checking for unstated dependencies in ‘tests’ ...
─  checking tests ...
E  Running ‘testthat.R’ [9s/19s] (19.4s)
   Running the tests in ‘tests/testthat.R’ failed.
   Last 13 lines of output:
     ── Error ('test-write_package.R:298'): write_package() retains custom properties set in add_resource() ──
     Error in `...names()`: could not find function "...names"
     Backtrace:
         ▆
      1. └─frictionless::add_resource(...) at test-write_package.R:298:3
     ── Error ('test-write_package.R:315'): write_package() will gzip file for compress = TRUE ──
     Error in `...names()`: could not find function "...names"
     Backtrace:
         ▆
      1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:315:3
     
     [ FAIL 31 | WARN 0 | SKIP 0 | PASS 319 ]
     Error: Test failures
     No deferred expressions to run
     Execution halted
✔  checking for unstated dependencies in vignettes ...
✔  checking package vignettes in ‘inst/doc’ ...
✔  checking re-building of vignette outputs (757ms)
✔  checking for detritus in the temp directory
   
   See
     ‘/data/home/innovauth/[email protected]/test-frictionless/frictionless.Rcheck/00check.log’
   for details.
   
── R CMD check results ──────────────────────────── frictionless 1.1.0.9000 ────
Duration: 40.2s

❯ checking examples ... ERROR
  Running examples in ‘frictionless-Ex.R’ failed
  The error most likely occurred in:
  
  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: add_resource
  > ### Title: Add a Data Resource
  > ### Aliases: add_resource
  > 
  > ### ** Examples
  > 
  > # Load the example Data Package
  > package <- example_package
  > 
  > # List resources
  > resources(package)
  [1] "deployments"  "observations" "media"       
  > 
  > # Create a data frame
  > df <- data.frame(
  +   multimedia_id = c(
  +     "aed5fa71-3ed4-4284-a6ba-3550d1a4de8d",
  +     "da81a501-8236-4cbd-aa95-4bc4b10a05df"
  +   ),
  +   x = c(718, 748),
  +   y = c(860, 900)
  + )
  > 
  > # Add resource "positions" to the Data Package, from the data frame
  > package <- add_resource(package, "positions", data = df)
  Error in ...names() : could not find function "...names"
  Calls: add_resource
  Execution halted

❯ checking tests ...
  See below...

❯ checking data for ASCII and uncompressed saves ... OK
   WARNING
  ‘qpdf’ is needed for checks on size reduction of PDFs

❯ checking R code for possible problems ... NOTE
  add_resource: no visible global function definition for ‘...names’
  Undefined global functions or variables:
    ...names

── Test failures ───────────────────────────────────────────────── testthat ────

> library(testthat)
> library(frictionless)
> 
> test_check("frictionless")
[ FAIL 31 | WARN 0 | SKIP 0 | PASS 319 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-add_resource.R:6'): add_resource() returns a valid Data Package ──
Expected `check_package(add_resource(p, "new", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:7'): add_resource() returns a valid Data Package ──
Expected `check_package(add_resource(p, "new", df, schema))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:8'): add_resource() returns a valid Data Package ──
Expected `check_package(add_resource(p, "new", df_csv))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:9'): add_resource() returns a valid Data Package ──
Expected `check_package(add_resource(p, "new", df, title = "New", foo = "bar"))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:67'): add_resource() returns error when resource name contains invalid
           characters ──
Expected `check_package(add_resource(p, "n.ew", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:68'): add_resource() returns error when resource name contains invalid
           characters ──
Expected `check_package(add_resource(p, "n-ew", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:69'): add_resource() returns error when resource name contains invalid
           characters ──
Expected `check_package(add_resource(p, "n_ew", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:70'): add_resource() returns error when resource name contains invalid
           characters ──
Expected `check_package(add_resource(p, "n3w", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Failure ('test-add_resource.R:71'): add_resource() returns error when resource name contains invalid
           characters ──
Expected `check_package(add_resource(p, "n.3-w_10", df))` to run without any errors.
i Actually got a <simpleError>:
  Error in `...names()`:
  ! could not find function "...names"
── Error ('test-add_resource.R:176'): add_resource() returns error if ... arguments are unnamed ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-add_resource.R:176:3
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. └─frictionless::add_resource(...)
── Error ('test-add_resource.R:190'): add_resource() returns error if ... arguments are reserved ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-add_resource.R:190:3
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. └─frictionless::add_resource(p, "new", df, name = "custom_name")
── Error ('test-add_resource.R:227'): add_resource() adds resource ─────────────
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new_df", df) at test-add_resource.R:227:3
── Error ('test-add_resource.R:261'): add_resource() uses provided schema (list or path) or creates one ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new_df", df) at test-add_resource.R:261:3
── Error ('test-add_resource.R:287'): add_resource() can add resource from data frame, readable by
           read_resource() ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-add_resource.R:287:3
── Error ('test-add_resource.R:299'): add_resource() can add resource from local, relative, absolute,
           remote or compressed CSV file, readable by read_resource() ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "local", local_path) at test-add_resource.R:299:3
── Error ('test-add_resource.R:336'): add_resource() can add resource from CSV file with other delimiter,
           readable by read_resource() ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "df", test_path("data/df.csv")) at test-add_resource.R:336:3
── Error ('test-add_resource.R:353'): add_resource() sets correct properties for CSV resources ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "deployments", path) at test-add_resource.R:353:3
── Error ('test-add_resource.R:408'): add_resource() sets ... arguments as extra properties ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(...) at test-add_resource.R:408:3
── Error ('test-print.R:27'): print() informs about the resources and unclass() ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p1, "new", df) at test-print.R:27:3
── Error ('test-read_resource.R:5'): read_resource() returns a tibble ──────────
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-read_resource.R:5:3
── Error ('test-read_resource.R:246'): read_resource() can read newly added data (ignoring schema) ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-read_resource.R:246:3
── Failure ('test-read_resource.R:256'): read_resource() can read inline data (ignoring schema) ──
read_resource(p, "media") (`actual`) not identical to `expected_resource` (`expected`).

`actual$media_id` is an S3 object of class <factor>, an integer vector
`expected$media_id` is a character vector ('aed5fa71-3ed4-4284-a6ba-3550d1a4de8d', 'da81a501-8236-4cbd-aa95-4bc4b10a05df', '0ba57608-3cf1-49d6-a5a2-fe680851024d')

`actual$deployment_id` is an S3 object of class <factor>, an integer vector
`expected$deployment_id` is a character vector ('1', '1', '1')

`actual$observation_id` is an S3 object of class <factor>, an integer vector
`expected$observation_id` is a character vector ('1-1', '1-1', '1-1')

`actual$timestamp` is an S3 object of class <factor>, an integer vector
`expected$timestamp` is a character vector ('2020-09-28 02:14:59+02:00', '2020-09-28 02:15:00+02:00', '2020-09-28 02:15:01+02:00')

`actual$file_path` is an S3 object of class <factor>, an integer vector
`expected$file_path` is a character vector ('https://multimedia.agouti.eu/assets/aed5fa71-3ed4-4284-a6ba-3550d1a4de8d/file', 'https://multimedia.agouti.eu/assets/da81a501-8236-4cbd-aa95-4bc4b10a05df/file', 'https://multimedia.agouti.eu/assets/0ba57608-3cf1-49d6-a5a2-fe680851024d/file')
── Error ('test-write_package.R:91'): write_package() copies file(s) for path = local in local package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", test_path("data/df.csv")) at test-write_package.R:91:3
── Error ('test-write_package.R:118'): write_package() downloads file(s) for path = local in remote
           package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", test_path("data/df.csv")) at test-write_package.R:118:3
── Error ('test-write_package.R:145'): write_package() leaves as is for path = URL in local package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(...) at test-write_package.R:145:3
── Error ('test-write_package.R:166'): write_package() leaves as is for path = URL in remote package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(...) at test-write_package.R:166:3
── Error ('test-write_package.R:220'): write_package() creates file for data = df in local package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:220:3
── Error ('test-write_package.R:237'): write_package() creates file for data = df in remote package ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:237:3
── Error ('test-write_package.R:276'): write_package() sets correct properties for data frame resources ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:276:3
── Error ('test-write_package.R:298'): write_package() retains custom properties set in add_resource() ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(...) at test-write_package.R:298:3
── Error ('test-write_package.R:315'): write_package() will gzip file for compress = TRUE ──
Error in `...names()`: could not find function "...names"
Backtrace:
    ▆
 1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:315:3

[ FAIL 31 | WARN 0 | SKIP 0 | PASS 319 ]
Error: Test failures
No deferred expressions to run
Execution halted

2 errors ✖ | 1 warning ✖ | 1 note ✖
Error: R CMD check found ERRORs
Execution halted

Exited with status 1.

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

my session info

> sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.3 (2020-02-29)
 os       Ubuntu 16.04.7 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Europe/Brussels             
 date     2024-07-09Packages ───────────────────────────────────────────────────────────────────────────
 package     * version date       lib source        
 cli           3.6.2   2023-12-11 [2] CRAN (R 3.6.3)
 packrat       0.5.0   2018-11-14 [2] CRAN (R 3.6.0)
 sessioninfo   1.1.1   2018-11-05 [2] CRAN (R 3.6.0)
 withr         3.0.0   2024-01-16 [2] CRAN (R 3.6.3)

[1] /data/home/innovauth/pieter.huybrechts@inbo.be/R/x86_64-pc-linux-gnu-library/3.6
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library

This is on the lifewatch rstudio server, I'll try locally on Ubuntu LTS as well

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

We are dependent on R4.1.0:

USCbiostats/fmcmc#20 (comment)

Because of the function: ...names() was only introduced in R4.1.0:

if (...length() != length(...names())) {
cli::cli_abort(
"All arguments in {.arg ...} must be named.",
class = "frictionless_error_argument_unnamed"
)
}
properties <- ...names()

@peterdesmet peterdesmet requested review from PietrH and removed request for peterdesmet July 9, 2024 14:04
@peterdesmet peterdesmet changed the title Fix #233 Update GH actions to use R 3.x Jul 9, 2024
@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

I've now installed frictionless locally from a new R3.6.3 installation on a Ubuntu 20.04 LTS 3 machine:

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_BE.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=de_BE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_BE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_BE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] frictionless_1.1.0.9000

loaded via a namespace (and not attached):
 [1] fansi_1.0.6     tzdb_0.4.0      utf8_1.2.4      R6_2.5.1       
 [5] lifecycle_1.0.4 magrittr_2.0.3  pillar_1.9.0    rlang_1.1.4    
 [9] cli_3.6.3       vctrs_0.6.5     tools_3.6.3     readr_2.1.5    
[13] glue_1.7.0      hms_1.1.3       compiler_3.6.3  pkgconfig_2.0.3
[17] tibble_3.2.1   

I'll now continue with suggested packages and rerun R CMD CHECK

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

@damianooldoni Is right, I can't install roxygen2 because it requires knitr, and that requires evaluate which is not available for R 3.6.3

However, while the CRAN version of evalutate requires R4.0, the dev version on github only needs R3.6: r-lib/evaluate@e00724f

I was able to get evaluate installed with:

remotes::install_github("r-lib/evaluate")

As a note, we could maybe stop the CI from trying to install the suggested packages:

The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

I'm failing on ...names() again:

==> R CMD build frictionless-r

* checking for file ‘frictionless-r/DESCRIPTION’ ... OK
* preparing ‘frictionless’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘frictionless_1.1.0.9000.tar.gz’

==> R CMD check frictionless_1.1.0.9000.tar.gz

* using log directory ‘/home/pieter/frictionless.Rcheck’
* using R version 3.6.3 (2020-02-29)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘frictionless/DESCRIPTION’ ... OK
* this is package ‘frictionless’ version ‘1.1.0.9000’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘frictionless’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
add_resource: no visible global function definition for ‘...names’
Undefined global functions or variables:
  ...names
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘frictionless-Ex.R’ failed
The error most likely occurred in:

> ### Name: add_resource
> ### Title: Add a Data Resource
> ### Aliases: add_resource
> 
> ### ** Examples
> 
> # Load the example Data Package
> package <- example_package
> 
> # List resources
> resources(package)
[1] "deployments"  "observations" "media"       
> 
> # Create a data frame
> df <- data.frame(
+   multimedia_id = c(
+     "aed5fa71-3ed4-4284-a6ba-3550d1a4de8d",
+     "da81a501-8236-4cbd-aa95-4bc4b10a05df"
+   ),
+   x = c(718, 748),
+   y = c(860, 900)
+ )
> 
> # Add resource "positions" to the Data Package, from the data frame
> package <- add_resource(package, "positions", data = df)
Error in ...names() : could not find function "...names"
Calls: add_resource
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’ ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
   1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:276:3
  ── Error ('test-write_package.R:298:3'): write_package() retains custom properties set in add_resource() ──
  Error in `...names()`: could not find function "...names"
  Backtrace:
      ▆
   1. └─frictionless::add_resource(...) at test-write_package.R:298:3
  ── Error ('test-write_package.R:315:3'): write_package() will gzip file for compress = TRUE ──
  Error in `...names()`: could not find function "...names"
  Backtrace:
      ▆
   1. └─frictionless::add_resource(p, "new", df) at test-write_package.R:315:3
  
  [ FAIL 31 | WARN 0 | SKIP 0 | PASS 319 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ...
 OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ...
  ‘frictionless.Rmd’using ‘UTF-8’... OK
 NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
* checking PDF version of manual without hyperrefs or index ... ERROR
Re-running with no redirection of stdout/stderr.
Hmm ... looks like a package
You may want to clean up by 'rm -Rf /tmp/RtmpwKed4p/Rd2pdfc3c0645733a9'
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  pdflatex is not available
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  pdflatex is not available
Error in running tools::texi2pdf()
* DONE
Status: 3 ERRORs, 1 WARNING, 1 NOTE

See
  ‘/home/pieter/frictionless.Rcheck/00check.log’
for details.


Exited with status 1.

@PietrH
Copy link
Member

PietrH commented Jul 9, 2024

It seems evalutate is dropping support for R versions lower than 4 by design: r-lib/evaluate#173

@peterdesmet
Copy link
Member

@damianooldoni we are abandoning this PR in favour of #240, which sets the minimum R requirement to 4.0.0 in alignment with tidyverse. ...names() which is only supported in R 4.1.0 onwards is replaced by a helper function @PietrH created.

I won't warn in README, but will indicate NEWS.md that R 4.0.0 is required.

@peterdesmet peterdesmet closed this Jul 9, 2024
@peterdesmet peterdesmet deleted the add-check-3.5 branch July 9, 2024 18:53
@damianooldoni
Copy link
Contributor Author

Ok, @peterdesmet! Thanks for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants