Last updated on 2025-03-06 01:51:18 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 2.1.3 | 8.45 | 178.29 | 186.74 | OK | |
r-devel-linux-x86_64-debian-gcc | 2.1.3 | 4.54 | 117.97 | 122.51 | OK | |
r-devel-linux-x86_64-fedora-clang | 2.1.3 | 306.29 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 2.1.3 | 314.40 | OK | |||
r-devel-macos-arm64 | 2.1.3 | 232.00 | OK | |||
r-devel-macos-x86_64 | 2.1.3 | 442.00 | OK | |||
r-devel-windows-x86_64 | 2.1.3 | 11.00 | 327.00 | 338.00 | OK | |
r-patched-linux-x86_64 | 2.1.3 | OK | ||||
r-release-linux-x86_64 | 2.1.3 | 7.49 | 80.38 | 87.87 | ERROR | |
r-release-macos-arm64 | 2.1.3 | 232.00 | OK | |||
r-release-macos-x86_64 | 2.1.3 | 311.00 | OK | |||
r-release-windows-x86_64 | 2.1.3 | 11.00 | 334.00 | 345.00 | OK | |
r-oldrel-macos-arm64 | 2.1.3 | OK | ||||
r-oldrel-macos-x86_64 | 2.1.3 | 323.00 | OK | |||
r-oldrel-windows-x86_64 | 2.1.3 | 13.00 | 381.00 | 394.00 | ERROR |
Version: 2.1.3
Check: examples
Result: ERROR
Running examples in ‘PubChemR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: download
> ### Title: Download Content from PubChem and Save to a File
> ### Aliases: download
>
> ### ** Examples
>
> # Download JSON file for the compound "aspirin" into "Aspirin.JSON"
> # A folder named "Compound" will be created under current directory"
> download(
+ filename = "Aspirin",
+ outformat = "json",
+ path = "./Compound",
+ identifier = "aspirin",
+ namespace = "name",
+ domain = "compound",
+ overwrite = TRUE
+ )
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Calls: download ... request_fetch.write_memory -> <Anonymous> -> raise_libcurl_error
Execution halted
Flavor: r-release-linux-x86_64
Version: 2.1.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [0m/26m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(PubChemR)
>
> # Functions used globally in package tests (testthat) ----
> allSuccess <- function(object){
+ all(unlist(lapply(object$result, "[[", "success")))
+ }
>
> testRequest <- function(object, ...){
+ test_that(paste0("pulling via '", request_args(object, "namespace"), "' is succesfull"), {
+ expect_true(allSuccess(object))
+ })
+
+ test_that("prints output to the R Console", {
+ expect_output(print(object))
+ })
+ }
>
> # Set 'skipTests' FALSE to run test codes. This is set TRUE to skip
> # all tests on GitHub actions since some of PubChem requests were incomplete due to
> # timeout and/or API related issues. BUILD & CHECK actions on GitHub returns error
> # even if all tests were passed on local installations of R.
> skipTests <- FALSE
>
> if (!skipTests){
+ test_check("PubChemR")
+ }
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10002 milliseconds
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10002 milliseconds
Error in value[[3L]](cond) :
Failed to retrieve sources for the specified domain: Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Error in value[[3L]](cond) :
Failed to retrieve sources for the specified domain: Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 3.2 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1.4 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 3.3 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10006 milliseconds
Request failed [ERROR]. Retrying in 2.7 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 5.9 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 2.9 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1.2 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 2.4 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 3.5 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 3.9 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1.6 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10002 milliseconds
Request failed [ERROR]. Retrying in 4.1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 3.3 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10001 milliseconds
Request failed [ERROR]. Retrying in 1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1.5 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached [pubchem.ncbi.nlm.nih.gov]: Resolving timed out after 10000 milliseconds
Request failed [ERROR]. Retrying in 1 seconds...
Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
'path' is not specified. Saving files into a temporary folder.
Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
Failed to retrieve synonyms for identifier 'aspirin': <text>:1:9: unexpected symbol
1: Timeout was
^
Failed to retrieve synonyms for identifier 'ibuprofen': <text>:1:9: unexpected symbol
1: Timeout was
^
Failed to retrieve synonyms for identifier 'aspirin': <text>:1:9: unexpected symbol
1: Timeout was
^
Failed to retrieve synonyms for identifier '2244': <text>:1:9: unexpected symbol
1: Timeout was
^
Failed to retrieve synonyms for identifier 'dncr': <text>:1:9: unexpected symbol
1: Timeout was
^
[ FAIL 87 | WARN 18 | SKIP 0 | PASS 93 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-00_globals.R:66:3'): succesfully returned primary class of given object ──
primaryClass(instance(tmp)) (`actual`) not equal to "PubChemInstance" (`expected`).
`actual`: "NULL"
`expected`: "PubChemInstance"
── Error ('test-00_globals.R:83:3'): slot details successfully printed ─────────
<subscriptOutOfBoundsError/error/condition>
Error in `x[[1]]`: subscript out of bounds
Backtrace:
▆
1. ├─testthat::expect_output(printSlotDetails(find_last_layer(pview$result))) at test-00_globals.R:83:3
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─testthat::capture_output_lines(code, print, width = width)
5. │ │ └─testthat:::eval_with_output(code, print = print, width = width)
6. │ │ ├─withr::with_output_sink(path, withVisible(code))
7. │ │ │ └─base::force(code)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. ├─PubChemR:::printSlotDetails(find_last_layer(pview$result))
11. └─PubChemR:::find_last_layer(pview$result)
── Error ('test-00_globals.R:90:3'): section details successfully printed ──────
Error in `UseMethod("section")`: no applicable method for 'section' applied to an object of class "NULL"
Backtrace:
▆
1. ├─PubChemR::section(pview, "S1") at test-00_globals.R:90:3
2. └─PubChemR:::section.PugViewInstance(pview, "S1")
3. ├─base::do.call("section", call_args)
4. └─PubChemR::section(object = NULL, .id = "S1", .verbose = FALSE)
── Failure ('test-download.R:51:5'): overwrite file if it already exists. ──────
identical(ctime, mtime) is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-download.R:119:3'): create 'path' if it does not exist. ──────
all(file.exists(json_file), file.exists(sdf_file)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_aids.R:24:5'): AIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_aids.R:24:5
2. └─testthat::expect_true(...) at test-get_aids.R:5:3
── Failure ('test-get_aids.R:24:5'): AIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_aids.R:24:5
2. └─testthat::expect_true(...) at test-get_aids.R:5:3
── Failure ('test-get_aids.R:24:5'): AIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_aids.R:24:5
2. └─testthat::expect_true(...) at test-get_aids.R:5:3
── Failure ('test-get_aids.R:53:3'): pulling aids for multiple identifiers with undefined input. ──
aids$result[[1]]$success is not TRUE
`actual` is NULL
`expected` is a logical vector (TRUE)
── Failure ('test-get_aids.R:54:3'): pulling aids for multiple identifiers with undefined input. ──
aids$result[[2]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_aids.R:63:3'): undefined/incorrect identifier returns error ──
aids$result[[1]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_aids.R:64:3'): undefined/incorrect identifier returns error ──
!is.null(aids$result[[1]]$error) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_all_sources.R:9:3'): get all sources for 'substance' ─────
inherits(tmp, "try-error") is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_all_sources.R:10:3'): get all sources for 'substance' ────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_all_sources.R:20:3'): get all sources for 'assay' ────────
inherits(tmp, "try-error") is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_all_sources.R:21:3'): get all sources for 'assay' ────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_assays.R:12:3'): pulling assays via an unknown 'namespace' ──
allSuccess(tmp) is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_assays.R:21:3'): instance() returns an object of class 'PubChemInstance' ──
"PubChemInstance" %in% class(instance(assay)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_assays.R:22:3'): instance() returns an object of class 'PubChemInstance' ──
`print\(instance\(assay\)\)` does not match "An object of class 'PubChemInstance'".
Actual value: "NULL"
Backtrace:
▆
1. └─testthat::expect_output(print(instance(assay)), "An object of class 'PubChemInstance'") at test-get_assays.R:22:3
2. └─testthat::expect_match(...)
3. └─testthat:::expect_match_(...)
── Error ('test-get_assays.R:26:3'): retrieve() returns selected slots as expected for an assay ──
Error in `retrieve.PubChemInstanceList(assay, .slot = "aid", .which = "1234",
.to.data.frame = TRUE)`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-get_assays.R:26:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::retrieve(assay, .slot = "aid", .which = "1234", .to.data.frame = TRUE)
5. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Error ('test-get_assays.R:50:3'): retrieve() returns error when unknown/undefined slots or identifiers are provided. ──
Error in `retrieve.PubChemInstanceList(assay, .which = "1234")`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_warning(retrieve(assay, .which = "1234")) at test-get_assays.R:50: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. ├─PubChemR::retrieve(assay, .which = "1234")
8. └─PubChemR:::retrieve.PubChemInstanceList(assay, .which = "1234")
── Error ('test-get_assays.R:61:3'): checking the effect of '.verbose' argument in retrieve() function ──
Error in `retrieve.PubChemInstanceList(assay, .slot = "comment", .verbose = TRUE)`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_output(retrieve(assay, .slot = "comment", .verbose = TRUE)) at test-get_assays.R:61:3
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─testthat::capture_output_lines(code, print, width = width)
5. │ │ └─testthat:::eval_with_output(code, print = print, width = width)
6. │ │ ├─withr::with_output_sink(path, withVisible(code))
7. │ │ │ └─base::force(code)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. ├─PubChemR::retrieve(assay, .slot = "comment", .verbose = TRUE)
11. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Failure ('test-get_cids.R:24:5'): CIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_cids.R:24:5
2. └─testthat::expect_true(...) at test-get_cids.R:12:3
── Failure ('test-get_cids.R:24:5'): CIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_cids.R:24:5
2. └─testthat::expect_true(...) at test-get_cids.R:12:3
── Failure ('test-get_cids.R:47:3'): pulling cids for multiple identifiers with undefined input. ──
cids$result[[1]]$success is not TRUE
`actual` is NULL
`expected` is a logical vector (TRUE)
── Failure ('test-get_cids.R:48:3'): pulling cids for multiple identifiers with undefined input. ──
cids$result[[2]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_cids.R:57:3'): undefined/incorrect identifier returns error ──
cids$result[[1]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_cids.R:58:3'): undefined/incorrect identifier returns error ──
!is.null(cids$result[[1]]$error) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_compounds.R:12:3'): pulling compounds via an unknown 'namespace' ──
allSuccess(tmp) is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_compounds.R:38:3'): handling undefined/unknown/incorrect compounds. returns error. ──
tmp$result[[1]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_compounds.R:39:3'): handling undefined/unknown/incorrect compounds. returns error. ──
!is.null(tmp$result[[1]]$error) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_compounds.R:44:3'): instance() returns an object of class 'PubChemInstance' ──
"PubChemInstance" %in% class(instance(compounds)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_compounds.R:45:3'): instance() returns an object of class 'PubChemInstance' ──
`print\(instance\(compounds\)\)` does not match "An object of class 'PubChemInstance'".
Actual value: "NULL"
Backtrace:
▆
1. └─testthat::expect_output(print(instance(compounds)), "An object of class 'PubChemInstance'") at test-get_compounds.R:45:3
2. └─testthat::expect_match(...)
3. └─testthat:::expect_match_(...)
── Error ('test-get_compounds.R:50:3'): retrieve() returns selected slots as expected for a compound ──
Error in `retrieve.PubChemInstanceList(compounds, .slot = "id", .which = "2244",
.to.data.frame = TRUE)`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-get_compounds.R:50:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::retrieve(...)
5. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Error ('test-get_compounds.R:74:3'): retrieve() returns error when unknown/undefined slots or identifiers are provided. ──
Error in `retrieve.PubChemInstanceList(compounds, .which = "1234")`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_warning(retrieve(compounds, .which = "1234")) at test-get_compounds.R:74: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. ├─PubChemR::retrieve(compounds, .which = "1234")
8. └─PubChemR:::retrieve.PubChemInstanceList(compounds, .which = "1234")
── Error ('test-get_compounds.R:84:3'): checking the effect of '.verbose' argument in retrieve() function ──
Error in `retrieve.PubChemInstanceList(compounds, .slot = "id", .verbose = TRUE,
.combine.all = TRUE)`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_invisible(...) at test-get_compounds.R:84:3
2. │ └─base::withVisible(call)
3. ├─PubChemR::retrieve(...)
4. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Failure ('test-get_properties.R:16:3'): instance() returns first item from complete list when .which=FALSE ──
request_args(tmp, "identifier") == "2244" is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_properties.R:24:3'): all requested properties returned successfully. ──
all(propNamesRequested %in% propNamesReturned) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_properties.R:38:3'): .slot vector of length >1 returns warning and accepts the first element in .slot ──
(all(is.data.frame(tmp), nrow(tmp) == 1, ncol(tmp) == 2)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Error ('test-get_properties.R:44:3'): .which is ignored when '.combine.all = TRUE' ──
Error in `retrieve.PubChemInstanceList(props, .combine.all = TRUE, .which = "1234")`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-get_properties.R:44:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::retrieve(props, .combine.all = TRUE, .which = "1234")
5. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Failure ('test-get_properties.R:61:3'): pulling compounds via an unknown 'namespace' ──
allSuccess(tmp) is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_properties.R:70:3'): instance() returns an object of class 'PubChemInstance' ──
"PubChemInstance" %in% class(instance(props)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_properties.R:71:3'): instance() returns an object of class 'PubChemInstance' ──
`print\(instance\(props\)\)` does not match "An object of class 'PubChemInstance'".
Actual value: "NULL"
Backtrace:
▆
1. └─testthat::expect_output(print(instance(props)), "An object of class 'PubChemInstance'") at test-get_properties.R:71:3
2. └─testthat::expect_match(...)
3. └─testthat:::expect_match_(...)
── Error ('test-get_properties.R:75:3'): retrieve() returns selected slots as expected for a compound ──
Error in `retrieve.PubChemInstanceList(props, .slot = "MolecularWeight",
.which = "1234", .to.data.frame = TRUE)`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-get_properties.R:75:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::retrieve(...)
5. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Error ('test-get_properties.R:89:3'): retrieve() returns error when unknown/undefined slots or identifiers are provided. ──
Error in `retrieve.PubChemInstanceList(props, .which = "1234", .slot = "unkown_slot")`: All instances in the object contain NULL results. Please check if the data was retrieved correctly.
Backtrace:
▆
1. ├─testthat::expect_null(retrieve(props, .which = "1234", .slot = "unkown_slot")) at test-get_properties.R:89:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::retrieve(props, .which = "1234", .slot = "unkown_slot")
5. └─PubChemR:::retrieve.PubChemInstanceList(...)
── Failure ('test-get_pug_rest.R:3:3'): pubChemData() works properly ───────────
is.array(pubChemData(tmp)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:27:3'): tests for SDF output successful ───────
tmp$success is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:28:3'): tests for SDF output successful ───────
{
...
} is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:31:3'): tests for SDF output successful ───────
tmp$fileDetails$Name == "files_downloaded.SDF" is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:35:3'): tests for SDF output successful ───────
file.exists(file.path(tmp2$fileDetails$Path, tmp2$fileDetails$Name)) is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:50:3'): test for PNG output successful ────────
all(tmp$success, is.array(tmp$result)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:51:3'): test for PNG output successful ────────
all(tmp2$success, is.array(tmp$result)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:53:3'): test for PNG output successful ────────
{
...
} is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:65:3'): test for CSV output successful ────────
tmp$success is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:66:3'): test for CSV output successful ────────
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:73:3'): test for CSV output successful ────────
{
...
} is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:84:3'): test for TXT output successful ────────
tmp$success is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:85:3'): test for TXT output successful ────────
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:89:3'): test for TXT output successful ────────
{
...
} is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_rest.R:100:3'): test for JSON output successful ──────
tmp$success is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:101:3'): test for JSON output successful ──────
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_pug_rest.R:105:3'): test for JSON output successful ──────
{
...
} is not TRUE
`actual`:
`expected`: TRUE
── Failure ('test-get_pug_view.R:11:3'): multiple identifiers are not allowed. ──
tmp$success is not TRUE
`actual`: FALSE
`expected`: TRUE
── Error ('test-get_pug_view.R:36:3'): sectionList() returns a tibble with number of rows equal to the number of setions ──
Error in `UseMethod("sectionList")`: no applicable method for 'sectionList' applied to an object of class "NULL"
Backtrace:
▆
1. ├─PubChemR::sectionList(pview2) at test-get_pug_view.R:36:3
2. └─PubChemR:::sectionList.PugViewInstance(pview2)
3. ├─base::do.call("sectionList", call_args)
4. └─PubChemR::sectionList(object = NULL)
── Error ('test-get_pug_view.R:44:5'): extracting specific section lists form complete list. ──
Error in `UseMethod("sectionList")`: no applicable method for 'sectionList' applied to an object of class "NULL"
Backtrace:
▆
1. ├─testthat::expect_true(...) at test-get_pug_view.R:43:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─PubChemR::sectionList(...) at test-get_pug_view.R:44:5
5. └─PubChemR:::sectionList.PugViewInstance(...)
6. ├─base::do.call("sectionList", call_args)
7. └─PubChemR::sectionList(object = NULL, .pattern = `<chr>`, .match_type = "contain")
── Error ('test-get_pug_view.R:54:3'): a series of tests on sectionList() ──────
Error in `UseMethod("section")`: no applicable method for 'section' applied to an object of class "NULL"
Backtrace:
▆
1. ├─PubChemR::section(pview2) at test-get_pug_view.R:54:3
2. └─PubChemR:::section.PugViewInstance(pview2)
3. ├─base::do.call("section", call_args)
4. └─PubChemR::section(object = NULL, .id = "S1", .verbose = FALSE)
── Error ('test-get_pug_view.R:73:3'): print sections in a nested way ──────────
Error in `UseMethod("section")`: no applicable method for 'section' applied to an object of class "NULL"
Backtrace:
▆
1. ├─testthat::expect_output(...) at test-get_pug_view.R:73:3
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─testthat::capture_output_lines(code, print, width = width)
5. │ │ └─testthat:::eval_with_output(code, print = print, width = width)
6. │ │ ├─withr::with_output_sink(path, withVisible(code))
7. │ │ │ └─base::force(code)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. ├─PubChemR::section(section(pview2, .verbose = TRUE), .verbose = TRUE)
11. ├─PubChemR::section(pview2, .verbose = TRUE)
12. └─PubChemR:::section.PugViewInstance(pview2, .verbose = TRUE)
13. ├─base::do.call("section", call_args)
14. └─PubChemR::section(object = NULL, .id = "S1", .verbose = TRUE)
── Error ('test-get_sdf.R:14:3'): pulling SDFs via 'name' is succesful ─────────
Error in `file.exists(tmp)`: invalid 'file' argument
Backtrace:
▆
1. ├─testthat::expect_true(file.exists(tmp)) at test-get_sdf.R:14:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─base::file.exists(tmp)
── Failure ('test-get_sdf.R:30:3'): pulling SDFs via 'cid' is succesful ────────
file.exists(file.path(temp_dir, "file.sdf")) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_sdf.R:60:3'): save SDF files to temporary working directory when path is not specified. ──
file.exists(file.path(default_path, "file.sdf")) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_sids.R:24:5'): SIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_sids.R:24:5
2. └─testthat::expect_true(...) at test-get_sids.R:5:3
── Failure ('test-get_sids.R:24:5'): SIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_sids.R:24:5
2. └─testthat::expect_true(...) at test-get_sids.R:5:3
── Failure ('test-get_sids.R:24:5'): SIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_sids.R:24:5
2. └─testthat::expect_true(...) at test-get_sids.R:5:3
── Failure ('test-get_sids.R:53:3'): pulling sids for multiple identifiers with undefined input. ──
sids$result[[1]]$success is not TRUE
`actual` is NULL
`expected` is a logical vector (TRUE)
── Failure ('test-get_sids.R:54:3'): pulling sids for multiple identifiers with undefined input. ──
sids$result[[2]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_sids.R:63:3'): undefined/incorrect identifier returns error ──
sids$result[[1]]$success is not FALSE
`actual` is NULL
`expected` is a logical vector (FALSE)
── Failure ('test-get_sids.R:64:3'): undefined/incorrect identifier returns error ──
!is.null(sids$result[[1]]$error) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_substances.R:10:3'): instance() is succesfull. ───────────
`print\(instance\(subs, "aspirin"\)\)` does not match "Substance Data from PubChem Database".
Actual value: "NULL"
Backtrace:
▆
1. └─testthat::expect_output(print(instance(subs, "aspirin")), "Substance Data from PubChem Database") at test-get_substances.R:10:3
2. └─testthat::expect_match(...)
3. └─testthat:::expect_match_(...)
── Failure ('test-get_substances.R:27:3'): incorrect/undefined substance identifier returns error ──
{
...
} is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_substances.R:30:3'): incorrect/undefined substance identifier returns error ──
all(!is.null(tmp$result[[1]]$error), is.list(tmp$result[[1]]$error)) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_substances.R:36:3'): '.verbose' works as expected ────────
retrieve(...) returns invisibly, not visibly.
── Failure ('test-get_substances.R:39:3'): '.verbose' works as expected ────────
retrieve(...) returns invisibly, not visibly.
── Failure ('test-get_substances.R:45:3'): NULL returns for unknown/empty slots. ──
retrieve(...) is not NULL
`actual` is a character vector ('The object passed to \'retrieve\' is NULL. Please provide a valid object of the expected class.')
`expected` is NULL
── Failure ('test-get_substances.R:50:3'): return error for unavailable substance idx. ──
`retrieve(tmp, .slot = "comment", .to.data.frame = TRUE, .idx = 66666)` did not throw the expected error.
── Failure ('test-get_synonyms.R:10:3'): synonyms returns list or data.frame correctly ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_synonyms.R:59:3'): return error for incomplete/unknown identifiers ──
allSuccess(tmp) is not FALSE
`actual`: TRUE
`expected`: FALSE
── Failure ('test-get_synonyms.R:60:3'): return error for incomplete/unknown identifiers ──
is.null(tmp$result[[1]]$error) is not FALSE
`actual`: TRUE
`expected`: FALSE
[ FAIL 87 | WARN 18 | SKIP 0 | PASS 93 ]
Error: Test failures
Execution halted
Flavor: r-release-linux-x86_64
Version: 2.1.3
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘Enhancing_Chemical_Data_Access_with_PubChemR.Rmd’ using rmarkdown
Quitting from lines 108-109 [unnamed-chunk-9] (Enhancing_Chemical_Data_Access_with_PubChemR.Rmd)
Error: processing vignette 'Enhancing_Chemical_Data_Access_with_PubChemR.Rmd' failed with diagnostics:
no applicable method for 'sectionList' applied to an object of class "NULL"
--- failed re-building ‘Enhancing_Chemical_Data_Access_with_PubChemR.Rmd’
--- re-building ‘Exploring_Chemical_Data_with_PubChemR.Rmd’ using rmarkdown
--- finished re-building ‘Exploring_Chemical_Data_with_PubChemR.Rmd’
--- re-building ‘Working_with_PubChemR_to_Access_Chemical_Data.Rmd’ using rmarkdown
Quitting from lines 883-884 [get_properties_aspirin] (Working_with_PubChemR_to_Access_Chemical_Data.Rmd)
Error: processing vignette 'Working_with_PubChemR_to_Access_Chemical_Data.Rmd' failed with diagnostics:
All instances in the object contain NULL results. Please check if the data was retrieved correctly.
--- failed re-building ‘Working_with_PubChemR_to_Access_Chemical_Data.Rmd’
SUMMARY: processing the following files failed:
‘Enhancing_Chemical_Data_Access_with_PubChemR.Rmd’
‘Working_with_PubChemR_to_Access_Chemical_Data.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-release-linux-x86_64
Version: 2.1.3
Check: for non-standard things in the check directory
Result: NOTE
Found the following files/directories:
‘Compound’
Flavor: r-release-linux-x86_64
Version: 2.1.3
Check: tests
Result: ERROR
Running 'testthat.R' [58s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(PubChemR)
>
> # Functions used globally in package tests (testthat) ----
> allSuccess <- function(object){
+ all(unlist(lapply(object$result, "[[", "success")))
+ }
>
> testRequest <- function(object, ...){
+ test_that(paste0("pulling via '", request_args(object, "namespace"), "' is succesfull"), {
+ expect_true(allSuccess(object))
+ })
+
+ test_that("prints output to the R Console", {
+ expect_output(print(object))
+ })
+ }
>
> # Set 'skipTests' FALSE to run test codes. This is set TRUE to skip
> # all tests on GitHub actions since some of PubChem requests were incomplete due to
> # timeout and/or API related issues. BUILD & CHECK actions on GitHub returns error
> # even if all tests were passed on local installations of R.
> skipTests <- FALSE
>
> if (!skipTests){
+ test_check("PubChemR")
+ }
The file has been saved to 'D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2/aspirin.json'
The file has been saved to 'D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2/aspirin.json'
The file has been saved to 'D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2/aspirin.json'
The file has been saved to 'D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2/aspirin.json'
The file has been saved to 'D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2/aspirin.sdf'
Request failed [400]. Retrying in 1.2 seconds...
Request failed [400]. Retrying in 4.3 seconds...
SDF file saved successfully:
File Name: 'aspirin_20250303_094154.sdf'
Saved at: D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2
SDF file saved successfully:
File Name: 'file.sdf'
Saved at: D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2
'path' is not specified. Saving files into a temporary folder.
SDF file saved successfully:
File Name: 'file.sdf'
Saved at: D:\temp\2025_03_03_01_50_00_4640\RtmpkZI2n2
PubChem Substance Details (comment)
Same as: <a href="http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?sid=7847177">D00109</a>
Is a reactant of enzyme EC: 3.1.1.55
PubChem Substance Details (comment)
Same as: <a href="http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?sid=7847177">D00109</a>
Is a reactant of enzyme EC: 3.1.1.55
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 202 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-get_aids.R:20:5'): pulling aids via 'cid' is succesfull ──────
allSuccess(object) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-get_aids.R:24:5'): AIDs succesfully returns 'data.frame' and 'list' ──
{
...
} is not TRUE
`actual`: FALSE
`expected`: TRUE
Backtrace:
▆
1. └─PubChemR (local) toDataFrame(object) at test-get_aids.R:24:5
2. └─testthat::expect_true(...) at test-get_aids.R:5:3
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 202 ]
Error: Test failures
Execution halted
Flavor: r-oldrel-windows-x86_64