From 15783b48b42a84fcc29ce608b4d9e242666223a7 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Fri, 9 Jun 2023 14:04:46 +0200 Subject: [PATCH 1/4] Remove extractors for defunct functions --- R/webchem-defunct.R | 74 --------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/R/webchem-defunct.R b/R/webchem-defunct.R index e58984b9..31b2279c 100644 --- a/R/webchem-defunct.R +++ b/R/webchem-defunct.R @@ -78,45 +78,6 @@ ci_query <- function() { ) } -cas.ci_query <- function() { - .Defunct( - "cas.ci_query", - package = "webchem", - msg = paste0( - "cas.ci_query() has been removed from the package because NLM had ", - "retired ChemIDplus. According to NLM all data found in ChemIDplus is ", - "available in PubChem. 'webchem' provides a number of functions for ", - "programmatically accessing PubChem." - ) - ) -} - -inchikey.ci_query <- function() { - .Defunct( - "inchikey.ci_query", - package = "webchem", - msg = paste0( - "inchikey.ci_query() has been removed from the package because NLM had ", - "retired ChemIDplus. According to NLM all data found in ChemIDplus is ", - "available in PubChem. 'webchem' provides a number of functions for ", - "programmatically accessing PubChem." - ) - ) -} - -smiles.ci_query <- function() { - .Defunct( - "smiles.ci_query", - package = "webchem", - msg = paste0( - "smiles.ci_query() has been removed from the package because NLM had ", - "retired ChemIDplus. According to NLM all data found in ChemIDplus is ", - "available in PubChem. 'webchem' provides a number of functions for ", - "programmatically accessing PubChem." - ) - ) -} - #' @rdname webchem-defunct #' @export pan_query <- function() { @@ -129,38 +90,3 @@ pan_query <- function() { ) ) } - -cas.pan_query <- function() { - .Defunct( - "cas.pan_query", - package = "webchem", - msg = paste0( - "cas.pan_query() has been removed from the package because programmatic ", - "access to the Pesticide Action Network database is no longer supported." - ) - ) -} - -inchikey.pan_query <- function() { - .Defunct( - "inchikey.pan_query", - package = "webchem", - msg = paste0( - "inchikey.pan_query() has been removed from the package because ", - "programmatic access to the Pesticide Action Network database is no ", - "longer supported." - ) - ) -} - -smiles.pan_query <- function() { - .Defunct( - "smiles.pan_query", - package = "webchem", - msg = paste0( - "smiles.pan_query() has been removed from the package because ", - "programmatic access to the Pesticide Action Network database is no ", - "longer supported." - ) - ) -} \ No newline at end of file From 971f93fbedf55990067e5840a924757a5d0a2a65 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Fri, 9 Jun 2023 14:06:45 +0200 Subject: [PATCH 2/4] Update namespace reference for adist() --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index a5b99cfe..e02b7872 100644 --- a/R/utils.R +++ b/R/utils.R @@ -489,7 +489,7 @@ matcher <- if (length(x) != length(result)) stop("Can't use match = 'best' without query matches for each output") if (verbose) message("Returning best.") - dd <- adist(query, result) / nchar(result) + dd <- utils::adist(query, result) / nchar(result) return(x[which.min(dd)]) } else if (match == "first") { if (verbose) message("Returning first.") From 64abdf23b501f71305cf7ad535302e2a191bca04 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Fri, 9 Jun 2023 14:14:01 +0200 Subject: [PATCH 3/4] Update CRAN comments --- cran-comments.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cran-comments.md b/cran-comments.md index 2667dee9..91883e65 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,8 @@ +# webchem 1.3.0 + +* This minor relese defuncts two functions, `ci_query()` and `pan_query()` because the webservices they were interacting with are no longer available. +* Submission was rejected on 2023-05-04 due to the following check log entry: "Apparent methods for exported generics not registered: cas.ci_query inchikey.ci_query smiles.ci_query". This has been fixed. + # webchem 1.1.3 * Found the following (possibly) invalid URLs: https://www.gsbl.de (moved to From 73ab1b4565f204943cdf1869dfb6954ff409bb84 Mon Sep 17 00:00:00 2001 From: Tamas Stirling Date: Fri, 9 Jun 2023 14:20:23 +0200 Subject: [PATCH 4/4] Update codemeta.json --- codemeta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codemeta.json b/codemeta.json index d9f6b4d4..c1aab6b1 100644 --- a/codemeta.json +++ b/codemeta.json @@ -2,7 +2,7 @@ "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "@type": "SoftwareSourceCode", "identifier": "webchem", - "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, ChemSpider, ETOX, Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem, 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, ChemSpider, ETOX, Flavornet, NIST Chemistry WebBook, OPSIN, PubChem, SRS, Wikidata.", "name": "webchem: Chemical Information from the Web", "relatedLink": ["https://docs.ropensci.org/webchem/", "https://CRAN.R-project.org/package=webchem"], "codeRepository": "https://github.com/ropensci/webchem", @@ -350,7 +350,7 @@ }, "SystemRequirements": null }, - "fileSize": "667.224KB", + "fileSize": "626.9KB", "citation": [ { "@type": "ScholarlyArticle",