From 3ee09911471aba11d711ff13b5f7f1fc7ce78a9e Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Tue, 30 Nov 2021 08:48:47 +0100 Subject: [PATCH 01/10] Polish NEWS --- NEWS.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1d0aab11..5bb93cc4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# webchem (development version) +# webchem 1.1.2 ## NEW FEATURES @@ -7,7 +7,7 @@ ## BUG FIXES * ci_query() can no longer query chemicals by name. -* non-exported function ping_pubchem_pw() was incorrectly reporting that PUG VIEW was down. This has been fixed. +* Non-exported function ping_pubchem_pw() was incorrectly reporting that PUG VIEW was down. This has been fixed. * is.cas() now catches whitespaces correctly. * aw_query() was renamed and adapted to bcpc_query, as the alanwood site has moved @@ -59,8 +59,8 @@ ## MINOR IMPROVEMENTS -* all `get_*()` functions now output tibbles with a column for the query and a column for the retrieved ID. -* changes to arguments in `get_*()` functions to make them more consistent. +* All `get_*()` functions now output tibbles with a column for the query and a column for the retrieved ID. +* Changes to arguments in `get_*()` functions to make them more consistent. * aw_idx.rda is no longer included in the package as a data set. Instead, it is built by build_aw_idx() to tempdir(). @@ -91,7 +91,7 @@ ## MINOR IMPROVEMENTS * as.cas() added. -* removed documentation files for non-exported functions that were only used internally. +* Removed documentation files for non-exported functions that were only used internally. ## BUG FIXES @@ -129,7 +129,7 @@ * cs_prop() did not parse scientific number correctly. * is.smiles() failed because of changes in rcdk. * cir_query() failed with identifiers containing spaces (e.g. 'acetic acid'). -* several other functions failed with identifiers containing spaces & returned wrong distance. +* Aeveral other functions failed with identifiers containing spaces & returned wrong distance. ## DEPRECATED FUNCTIONS @@ -179,11 +179,11 @@ ## NEW FEATURES -* added ping_pubchem() to check whether pubchem is up & running. -* added cs_web_ping () to check whether the chemspider webpage is functional. +* Added ping_pubchem() to check whether pubchem is up & running. +* Added cs_web_ping () to check whether the chemspider webpage is functional. ## MINOR IMPROVEMENTS -* updated allan wood index. +* Updated allan wood index. ## BUG FIXES * pc_prop() returned to many rows if last cid supplied was NA. @@ -202,16 +202,16 @@ ## NEW FEATURES -* added cts_to() and cts_from() to retrieve possible ids that can be queried. +* Added cts_to() and cts_from() to retrieve possible ids that can be queried. * cts_*(), pp_query(), cir_query(), get_cid(), get_etoxid(), etox_*(), pan_query() get_wdid(), aw_query(), get_csid(), cs_prop(), cs_compinfo() and ci_query() can handle multiple inputs. * pc_prop() queries properties and pc_synonmy() synonyms from PUG-REST. -* added extractors for webchem objects: cas(), inchikey() and smiles(). +* Added extractors for webchem objects: cas(), inchikey() and smiles(). ## MINOR IMPROVEMENTS -* rewrite of pubchem functions using PUG-REST. -* chemspider: better use of NA in input (=return NA). -* more robust matching in get_etoxid. +* Rewrite of pubchem functions using PUG-REST. +* ChemSpider: better use of NA in input (=return NA). +* More robust matching in get_etoxid. ## BUG FIXES @@ -253,14 +253,14 @@ The new ppdb_parse() parses only a html, but does not interact with the database - names of returned list changed. - result is numeric where appropriate. * cir(): result is numeric where appropriate. -* unified naming scheme of functions. +* Unified naming scheme of functions. * is.inchikey_cs() has been integrated into is.inchikey(). * aw_query() returns multiple inchikey if found. * pan() now returns chemical name and matched synonym. ## BUG FIXES -* utility functions are not vectorized and throw an error. +* Utility functions are not vectorized and throw an error. * chemid() did mot work with inchikey as input. * ppdb_idx returned duplicated CAS values, which caused ppdb() to fail. * ppdb() failed in some cases because of false encoding. @@ -321,7 +321,7 @@ The new ppdb_parse() parses only a html, but does not interact with the database * alanwood() returns only results for first match in case of multiple links found. * physprop() stopped working after change of SRC to https, fixed now. -* changed etox_* functions to https. +* Changed etox_* functions to https. ## DEPRECATED FUNCTIONS @@ -351,8 +351,8 @@ The new ppdb_parse() parses only a html, but does not interact with the database ## MINOR IMPROVEMENTS -* added exceptions/checks to tests. -* improved robustness of cir_query(). +* Added exceptions/checks to tests. +* Improved robustness of cir_query(). ## BUG FIXES From ff46b39edd58c22d54dd6929f33864d1ccf1cd79 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Tue, 30 Nov 2021 09:21:46 +0100 Subject: [PATCH 02/10] Update http to https --- R/bcpc.R | 8 ++++---- README.md | 8 ++++---- man/bcpc_query.Rd | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R/bcpc.R b/R/bcpc.R index f24d73bb..9e261245 100644 --- a/R/bcpc.R +++ b/R/bcpc.R @@ -1,7 +1,7 @@ -#' Query http://pesticidecompendium.bcpc.org +#' Query https://pesticidecompendium.bcpc.org #' #' Query the BCPC Compendium of Pesticide Common Names -#' \url{http://pesticidecompendium.bcpc.org} +#' \url{https://pesticidecompendium.bcpc.org} #' formerly known as Alan Woods Compendium of Pesticide Common Names #' @import xml2 #' @@ -15,7 +15,7 @@ #' url. #' @note for from = 'cas' only the first matched link is returned. #' Please respect Copyright, Terms and Conditions -#' \url{http://pesticidecompendium.bcpc.org/legal.html}! +#' \url{https://pesticidecompendium.bcpc.org/legal.html}! #' @references Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, #' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical #' Information from the Web. Journal of Statistical Software, 93(13). @@ -147,7 +147,7 @@ bcpc_query <- function(query, from = c("name", "cas"), r_isomer = gsub(".*\\(R\\)-isomer:(.*)", "\\1", inchi)) } } - + out <- list(cname = cname, status = status, pref_iupac_name = pref_iupac_name, iupac_name = iupac_name, cas = cas, formula = formula, activity = activity, diff --git a/README.md b/README.md index af4e7247..4ecccc64 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,18 @@ documentation Compendium of Pesticide Common Names) - [ChEBI](https://www.ebi.ac.uk/chebi/) - [Chemical Identifier Resolver - (CIR)](http://cactus.nci.nih.gov/chemical/structure) + (CIR)](https://cactus.nci.nih.gov/chemical/structure) - [Chemical Translation Service (CTS)](http://cts.fiehnlab.ucdavis.edu/) - [ChemIDplus](https://chem.nlm.nih.gov/chemidplus/) - [ChemSpider](http://www.chemspider.com/) (requires an [API - token]((https://developer.rsc.org/))) + token](https://developer.rsc.org/)) - [ETOX](http://webetox.uba.de/webETOX/index.do) - [Flavornet](http://www.flavornet.org) - [NIST](https://webbook.nist.gov) (currently gas chromatography retention indices only) - [OPSIN](http://opsin.ch.cam.ac.uk/instructions.html) -- [PAN Pesticide Database](http://www.pesticideinfo.org/) +- [PAN Pesticide Database](https://www.pesticideinfo.org/) - [PubChem](https://pubchem.ncbi.nlm.nih.gov/) - [U.S. EPA Substance Registry Service (SRS)](https://cdxnodengn.epa.gov/cdx-srs-rest/) @@ -130,4 +130,4 @@ here](https://github.com/ropensci/webchem/blob/master/CONTRIBUTING.md). of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms. -[![ropensci](http://ropensci.org/public_images/github_footer.png)](http://ropensci.org) +[![ropensci](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org) diff --git a/man/bcpc_query.Rd b/man/bcpc_query.Rd index 2082c747..03758a48 100644 --- a/man/bcpc_query.Rd +++ b/man/bcpc_query.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/bcpc.R \name{bcpc_query} \alias{bcpc_query} -\title{Query http://pesticidecompendium.bcpc.org} +\title{Query https://pesticidecompendium.bcpc.org} \usage{ bcpc_query( query, @@ -30,13 +30,13 @@ url. } \description{ Query the BCPC Compendium of Pesticide Common Names -\url{http://pesticidecompendium.bcpc.org} +\url{https://pesticidecompendium.bcpc.org} formerly known as Alan Woods Compendium of Pesticide Common Names } \note{ for from = 'cas' only the first matched link is returned. Please respect Copyright, Terms and Conditions -\url{http://pesticidecompendium.bcpc.org/legal.html}! +\url{https://pesticidecompendium.bcpc.org/legal.html}! } \examples{ \dontrun{ From 0e46637522e7dd83bfb33974ea6785220088d81d Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Tue, 30 Nov 2021 09:21:46 +0100 Subject: [PATCH 03/10] Update http to https --- R/bcpc.R | 8 ++++---- R/webchem-package.R | 4 ++-- README.md | 8 ++++---- man/bcpc_query.Rd | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/R/bcpc.R b/R/bcpc.R index f24d73bb..9e261245 100644 --- a/R/bcpc.R +++ b/R/bcpc.R @@ -1,7 +1,7 @@ -#' Query http://pesticidecompendium.bcpc.org +#' Query https://pesticidecompendium.bcpc.org #' #' Query the BCPC Compendium of Pesticide Common Names -#' \url{http://pesticidecompendium.bcpc.org} +#' \url{https://pesticidecompendium.bcpc.org} #' formerly known as Alan Woods Compendium of Pesticide Common Names #' @import xml2 #' @@ -15,7 +15,7 @@ #' url. #' @note for from = 'cas' only the first matched link is returned. #' Please respect Copyright, Terms and Conditions -#' \url{http://pesticidecompendium.bcpc.org/legal.html}! +#' \url{https://pesticidecompendium.bcpc.org/legal.html}! #' @references Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, #' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical #' Information from the Web. Journal of Statistical Software, 93(13). @@ -147,7 +147,7 @@ bcpc_query <- function(query, from = c("name", "cas"), r_isomer = gsub(".*\\(R\\)-isomer:(.*)", "\\1", inchi)) } } - + out <- list(cname = cname, status = status, pref_iupac_name = pref_iupac_name, iupac_name = iupac_name, cas = cas, formula = formula, activity = activity, diff --git a/R/webchem-package.R b/R/webchem-package.R index 9c0db841..b51991ed 100644 --- a/R/webchem-package.R +++ b/R/webchem-package.R @@ -38,7 +38,7 @@ if (getRversion() >= "2.15.1") #' #' This dataset comprises acute ecotoxicity data of 124 insecticides. #' The data is publicly available and can be retrieved from the EPA ECOTOX database -#' (\url{http://cfpub.epa.gov/ecotox/}) +#' (\url{https://cfpub.epa.gov/ecotox/}) #' It comprises acute toxicity data (D. magna, 48h, Laboratory, 48h) and has been #' preprocessed (remove non-insecticides, aggregate multiple value, keep only numeric data etc). #' @@ -47,5 +47,5 @@ if (getRversion() >= "2.15.1") #' \item{cas}{CAS registry number} #' \item{value}{LC50value} #' } -#' @source \url{http://cfpub.epa.gov/ecotox/} +#' @source \url{https://cfpub.epa.gov/ecotox/} "lc50" diff --git a/README.md b/README.md index af4e7247..4ecccc64 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,18 @@ documentation Compendium of Pesticide Common Names) - [ChEBI](https://www.ebi.ac.uk/chebi/) - [Chemical Identifier Resolver - (CIR)](http://cactus.nci.nih.gov/chemical/structure) + (CIR)](https://cactus.nci.nih.gov/chemical/structure) - [Chemical Translation Service (CTS)](http://cts.fiehnlab.ucdavis.edu/) - [ChemIDplus](https://chem.nlm.nih.gov/chemidplus/) - [ChemSpider](http://www.chemspider.com/) (requires an [API - token]((https://developer.rsc.org/))) + token](https://developer.rsc.org/)) - [ETOX](http://webetox.uba.de/webETOX/index.do) - [Flavornet](http://www.flavornet.org) - [NIST](https://webbook.nist.gov) (currently gas chromatography retention indices only) - [OPSIN](http://opsin.ch.cam.ac.uk/instructions.html) -- [PAN Pesticide Database](http://www.pesticideinfo.org/) +- [PAN Pesticide Database](https://www.pesticideinfo.org/) - [PubChem](https://pubchem.ncbi.nlm.nih.gov/) - [U.S. EPA Substance Registry Service (SRS)](https://cdxnodengn.epa.gov/cdx-srs-rest/) @@ -130,4 +130,4 @@ here](https://github.com/ropensci/webchem/blob/master/CONTRIBUTING.md). of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms. -[![ropensci](http://ropensci.org/public_images/github_footer.png)](http://ropensci.org) +[![ropensci](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org) diff --git a/man/bcpc_query.Rd b/man/bcpc_query.Rd index 2082c747..03758a48 100644 --- a/man/bcpc_query.Rd +++ b/man/bcpc_query.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/bcpc.R \name{bcpc_query} \alias{bcpc_query} -\title{Query http://pesticidecompendium.bcpc.org} +\title{Query https://pesticidecompendium.bcpc.org} \usage{ bcpc_query( query, @@ -30,13 +30,13 @@ url. } \description{ Query the BCPC Compendium of Pesticide Common Names -\url{http://pesticidecompendium.bcpc.org} +\url{https://pesticidecompendium.bcpc.org} formerly known as Alan Woods Compendium of Pesticide Common Names } \note{ for from = 'cas' only the first matched link is returned. Please respect Copyright, Terms and Conditions -\url{http://pesticidecompendium.bcpc.org/legal.html}! +\url{https://pesticidecompendium.bcpc.org/legal.html}! } \examples{ \dontrun{ From f593b63d9917ce09684eb49d98cdad758ab0dfbf Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 17:46:38 +0100 Subject: [PATCH 04/10] CTS cannot convert from chemical name, edit examples, tests, documentation --- R/cts.R | 8 +++++--- man/cts_convert.Rd | 10 +++++++--- tests/testthat/test-cts.R | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/R/cts.R b/R/cts.R index 79209626..fc8b0865 100644 --- a/R/cts.R +++ b/R/cts.R @@ -99,6 +99,8 @@ cts_compinfo <- function(query, from = "inchikey", #' single named vector. #' @details See also \url{http://cts.fiehnlab.ucdavis.edu/} #' for possible values of from and to. +#' @note When this version of webchem was released, CTS was temporarily unable +#' to convert chemical names to IDs. #' #' @seealso \code{\link{cts_from}} for possible values in the 'from' argument #' and \code{\link{cts_to}} for possible values in the 'to' argument. @@ -110,11 +112,11 @@ cts_compinfo <- function(query, from = "inchikey", #' @examples #' \donttest{ #' # might fail if API is not available -#' cts_convert("triclosan", "Chemical Name", "inchikey") +#' cts_convert("XEFQLINVKFYRCS-UHFFFAOYSA-N", "inchikey", "Chemical Name") #' #' ### multiple inputs -#' comp <- c("triclosan", "hexane") -#' cts_convert(comp, "Chemical Name", "cas") +#' keys <- c("XEFQLINVKFYRCS-UHFFFAOYSA-N", "VLKZOEOYAKHREP-UHFFFAOYSA-N") +#' cts_convert(keys, "inchikey", "cas") #' } cts_convert <- function(query, from, diff --git a/man/cts_convert.Rd b/man/cts_convert.Rd index dedcd652..daec57ad 100644 --- a/man/cts_convert.Rd +++ b/man/cts_convert.Rd @@ -45,14 +45,18 @@ Convert Ids using Chemical Translation Service (CTS), see See also \url{http://cts.fiehnlab.ucdavis.edu/} for possible values of from and to. } +\note{ +When this version of webchem was released, CTS was temporarily unable +to convert chemical names to IDs. +} \examples{ \donttest{ # might fail if API is not available -cts_convert("triclosan", "Chemical Name", "inchikey") +cts_convert("XEFQLINVKFYRCS-UHFFFAOYSA-N", "inchikey", "Chemical Name") ### multiple inputs -comp <- c("triclosan", "hexane") -cts_convert(comp, "Chemical Name", "cas") +keys <- c("XEFQLINVKFYRCS-UHFFFAOYSA-N", "VLKZOEOYAKHREP-UHFFFAOYSA-N") +cts_convert(keys, "inchikey", "cas") } } \references{ diff --git a/tests/testthat/test-cts.R b/tests/testthat/test-cts.R index 27571095..8f826966 100644 --- a/tests/testthat/test-cts.R +++ b/tests/testthat/test-cts.R @@ -11,7 +11,7 @@ test_that("cts_compinfo()", { "XEFQLINVKFYRCS-UHFFFAOYSA-X"))) expect_equal(suppressWarnings(cts_compinfo("XEFQLINVKFYRCS-UHFFFAOYSA-X"))[[1]], NA) expect_true(is.na(cts_compinfo("XEFQLINVKFYRCS-UHFFFAOYSA-X"))) - expect_length(o1[[1]], 10) + expect_length(o1[[1]], 11) expect_equal(round(o1[[1]][["molweight"]], 3), 289.542) expect_length(o2, 2) expect_true(is.na(o2[[2]])) @@ -26,15 +26,24 @@ test_that("cts_convert()", { expect_error(cts_convert(comp, c('Chemical Name', 'CAS'), 'CAS')) expect_error(cts_convert('Triclosan', 'CAS')) expect_true(is.na(cts_convert('xxxx', 'Chemical Name', 'inchikey'))) + o1 <- cts_convert(comp, 'Chemical Name', 'inchikey', match = "first") expect_length(o1, 2) - expect_equal(o1[[1]], 'XEFQLINVKFYRCS-UHFFFAOYSA-N') + #Test below currently returns NA but it shouldn't. + #Seems to be an issue with the webservice. + #expect_equal(o1[[1]], 'XEFQLINVKFYRCS-UHFFFAOYSA-N') + + #edit tests and function note if test below no longer returns NA. + expect_equal(cts_convert("triclosan", "chemical name", "inchikey")$triclosan, + NA) + expect_equal(cts_convert(NA, from = "Chemical Name", to = "inchikey"), list(NA), ignore_attr = TRUE) -}) +}) + test_that("fromto", { skip_on_cran() skip_if_not(up, "CTS service down") From 6ac5e5d1e41caa2dd0359282758164e24ec9619c Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 18:32:12 +0100 Subject: [PATCH 05/10] Move test-bcpc.R into testthat directory --- tests/{testthat-bcpc.R => testthat/test-bcpc.R} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{testthat-bcpc.R => testthat/test-bcpc.R} (100%) diff --git a/tests/testthat-bcpc.R b/tests/testthat/test-bcpc.R similarity index 100% rename from tests/testthat-bcpc.R rename to tests/testthat/test-bcpc.R From 5216073f03b411050369f04afe002b7110298f84 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 21:08:46 +0100 Subject: [PATCH 06/10] Update URLs in ChemSpider documentation --- R/chemspider.R | 12 ++++++------ man/cs_compinfo.Rd | 2 +- man/cs_control.Rd | 2 +- man/cs_convert.Rd | 2 +- man/cs_datasources.Rd | 2 +- man/cs_img.Rd | 2 +- man/get_csid.Rd | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/chemspider.R b/R/chemspider.R index cdcdd671..ae047191 100644 --- a/R/chemspider.R +++ b/R/chemspider.R @@ -42,7 +42,7 @@ cs_check_key <- function() { #' @note An API key is needed. Register at \url{https://developer.rsc.org/} #' for an API key. Please respect the Terms & Conditions. The Terms & Conditions #' can be found at \url{https://developer.rsc.org/terms}. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @export #' @examples #' \dontrun{ @@ -107,7 +107,7 @@ cs_datasources <- function(apikey = NULL, verbose = getOption("verbose")) { #' Each API uses a subset of these controls. #' The controls that are available for a given function are indicated within the #' documentation of the function. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @seealso \code{\link{get_csid}} #' @export #' @examples @@ -160,7 +160,7 @@ cs_control <- function(datasources = vector(), #' @note An API key is needed. Register at \url{https://developer.rsc.org/} for #' an API key. Please respect the Terms & conditions: #' \url{https://developer.rsc.org/terms}. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @references Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, #' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical #' Information from the Web. Journal of Statistical Software, 93(13). @@ -332,7 +332,7 @@ get_csid <- function(query, #' @note An API key is needed. Register at \url{https://developer.rsc.org/} #' for an API key. Please respect the Terms & Conditions. The Terms & Conditions #' can be found at \url{https://developer.rsc.org/terms}. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @references Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, #' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical #' Information from the Web. Journal of Statistical Software, 93(13). @@ -463,7 +463,7 @@ cs_convert <- function(query, from, to, verbose = getOption("verbose"), #' @note An API key is needed. Register at \url{https://developer.rsc.org/} #' for an API key. Please respect the Terms & Conditions. The Terms & Conditions #' can be found at \url{https://developer.rsc.org/terms}. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @export #' @examples #' \dontrun{ @@ -618,7 +618,7 @@ use 'cs_commpinfo()' instead.") #' @note An API key is needed. Register at \url{https://developer.rsc.org/} #' for an API key. Please respect the Terms & Conditions. The Terms & Conditions #' can be found at \url{https://developer.rsc.org/terms}. -#' @references \url{https://developer.rsc.org/compounds-v1/apis} +#' @references \url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} #' @seealso \code{\link{get_csid}}, \code{\link{cs_check_key}} #' @export #' @examples diff --git a/man/cs_compinfo.Rd b/man/cs_compinfo.Rd index d9a7aedf..b896e8e1 100644 --- a/man/cs_compinfo.Rd +++ b/man/cs_compinfo.Rd @@ -44,5 +44,5 @@ cs_compinfo(171:182, "SMILES") } } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} } diff --git a/man/cs_control.Rd b/man/cs_control.Rd index 3cfb1254..2a90e884 100644 --- a/man/cs_control.Rd +++ b/man/cs_control.Rd @@ -65,7 +65,7 @@ cs_control() cs_control(order_direction = "descending") } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} } \seealso{ \code{\link{get_csid}} diff --git a/man/cs_convert.Rd b/man/cs_convert.Rd index 7efeabad..f79b5a42 100644 --- a/man/cs_convert.Rd +++ b/man/cs_convert.Rd @@ -59,7 +59,7 @@ cs_convert(160, from = "csid", to = "smiles") } } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical diff --git a/man/cs_datasources.Rd b/man/cs_datasources.Rd index e266df3d..91960143 100644 --- a/man/cs_datasources.Rd +++ b/man/cs_datasources.Rd @@ -32,5 +32,5 @@ cs_datasources() } } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} } diff --git a/man/cs_img.Rd b/man/cs_img.Rd index 70d53db0..b7033c12 100644 --- a/man/cs_img.Rd +++ b/man/cs_img.Rd @@ -42,7 +42,7 @@ cs_img(c(582, 682), dir = tempdir()) } } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} } \seealso{ \code{\link{get_csid}}, \code{\link{cs_check_key}} diff --git a/man/get_csid.Rd b/man/get_csid.Rd index 31bbf94d..eb2f0e96 100644 --- a/man/get_csid.Rd +++ b/man/get_csid.Rd @@ -64,7 +64,7 @@ get_csid("QTBSBXVTEAMEQO-UHFFFAOYAR", from = "inchikey") } } \references{ -\url{https://developer.rsc.org/compounds-v1/apis} +\url{https://developer.rsc.org/docs/compounds-v1-trial/1/overview} Eduard Szöcs, Tamás Stirling, Eric R. Scott, Andreas Scharmüller, Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical From a55cb4938490aac749c98ecd7b8a9e35d8c6b4f8 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 21:12:06 +0100 Subject: [PATCH 07/10] Update version number and date --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 409af5a3..e5f2576b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,8 +7,8 @@ Description: Chemical information from around the web. This package interacts Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem, SRS, Wikidata. Type: Package -Version: 1.1.1.9004 -Date: 2021-02-07 +Version: 1.1.2 +Date: 2021-12-06 License: MIT + file LICENSE URL: https://docs.ropensci.org/webchem/, https://github.com/ropensci/webchem BugReports: https://github.com/ropensci/webchem/issues From bb8060f422d1ec67dd60366f404b9654b30cc8f9 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 21:45:22 +0100 Subject: [PATCH 08/10] Update codemeta.json --- codemeta.json | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/codemeta.json b/codemeta.json index 8059f618..9bbee2b4 100644 --- a/codemeta.json +++ b/codemeta.json @@ -5,7 +5,7 @@ ], "@type": "SoftwareSourceCode", "identifier": "webchem", - "description": "Chemical information from around the web. This package interacts \n with a suite of web services for chemical information. Sources include: Alan\n Wood's Compendium of Pesticide Common Names, Chemical Identifier Resolver,\n ChEBI, Chemical Translation Service, ChemIDplus, ChemSpider, ETOX,\n Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem,\n SRS, Wikidata.", + "description": "Chemical information from around the web. This package interacts with a suite of web services for chemical information. Sources include: Alan Wood's Compendium of Pesticide Common Names, Chemical Identifier Resolver, ChEBI, Chemical Translation Service, ChemIDplus, ChemSpider, ETOX, Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem, SRS, Wikidata.", "name": "webchem: Chemical Information from the Web", "codeRepository": "https://github.com/ropensci/webchem", "relatedLink": [ @@ -15,13 +15,13 @@ ], "issueTracker": "https://github.com/ropensci/webchem/issues", "license": "https://spdx.org/licenses/MIT", - "version": "1.1.1", + "version": "1.1.2", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", "url": "https://r-project.org" }, - "runtimePlatform": "R version 4.0.3 (2020-10-10)", + "runtimePlatform": "R version 4.1.2 (2021-11-01)", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -189,6 +189,18 @@ "url": "https://cran.r-project.org" }, "sameAs": "https://CRAN.R-project.org/package=usethis" + }, + { + "@type": "SoftwareApplication", + "identifier": "vcr", + "name": "vcr", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=vcr" } ], "softwareRequirements": [ @@ -334,10 +346,15 @@ "url": "https://cran.r-project.org" }, "sameAs": "https://CRAN.R-project.org/package=rlang" + }, + { + "@type": "SoftwareApplication", + "identifier": "utils", + "name": "utils" } ], "readme": "https://github.com/ropensci/webchem/blob/master/README.md", - "fileSize": "0KB", + "fileSize": "616.471KB", "keywords": [ "rstats", "ropensci", @@ -350,7 +367,7 @@ "r-package" ], "releaseNotes": "https://github.com/ropensci/webchem/blob/master/NEWS.md", - "contIntegration": "https://codecov.io/gh/ropensci/webchem/branch/master", + "contIntegration": ["https://github.com/ropensci/webchem/actions", "https://codecov.io/gh/ropensci/webchem/branch/master"], "citation": [ { "@type": "ScholarlyArticle", From dbcd3f7fdec3501155d76b264ffedb08919ab0e3 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Sun, 5 Dec 2021 21:55:35 +0100 Subject: [PATCH 09/10] Add CRAN comments file --- .Rbuildignore | 2 ++ cran-comments.md | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index 47aa47de..8af58057 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -26,3 +26,5 @@ README_cache codemeta.json ^codemeta\.json$ + +cran-comments.md diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 00000000..b27cce99 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,3 @@ +# webchem 1.1.2 + +* https://developer.rsc.org/, SSL certificate problem: unable to get local issuer certificate: The URLs work and including these URLs in the package is important. \ No newline at end of file From e427a36cbebf4c092f1fab1118514a88ae7fd9e5 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Mon, 6 Dec 2021 08:04:27 +0100 Subject: [PATCH 10/10] Add unlist() to eliminate R CMD check failures on GitHub --- R/chemid.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/chemid.R b/R/chemid.R index 8c917947..fd62ed23 100644 --- a/R/chemid.R +++ b/R/chemid.R @@ -125,7 +125,7 @@ ci_query <- function(query, from = c("rn", "inchikey"), physprop <- NA } else { physprop <- html_table(xml_find_all(ttt, "//h2[contains(., 'Physical Prop')]/following-sibling::div//table"))[[1]] - physprop[ , 'Value'] <- as.numeric(physprop[ , 'Value']) + physprop[ , 'Value'] <- as.numeric(unlist(physprop[ , 'Value'])) #= same as physprop }