diff --git a/DESCRIPTION b/DESCRIPTION
index 2db03d1..fbeecd7 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: enviPathR
Title: Client for the 'enviPath' 'RESTful' API
-Version: 1.0.1
+Version: 1.0.2
Authors@R:
c(person(given = "Giulio", family = "Benedetti",
role = c("aut", "cre", "cph"),
diff --git a/NEWS b/NEWS
index be99d6e..4a2ed1f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
-Changes in version 0.99.x
-* Introduced epTypes, epLogin, epLogout, epList, epLink, epGet and epModel
-
Changes in version 1.0.x
-* Submitted to CRAN
\ No newline at end of file
+* Submitted to CRAN
+
+Changes in version 0.99.x
+* Introduced epTypes, epLogin, epLogout, epList, epLink, epGet and epModel
\ No newline at end of file
diff --git a/R/get.R b/R/get.R
index 6df0d7e..ca25b0b 100644
--- a/R/get.R
+++ b/R/get.R
@@ -30,7 +30,7 @@
#' not serial. (Default: \code{5})
#'
#' @returns
-#' A list of objects
+#' A list of objects.
#'
#' @examples
#' \dontshow{
@@ -76,8 +76,6 @@ epGet <- function(type, init = NULL, pkg = NULL, property = NULL,
SIMPLIFY = FALSE,
BPPARAM = BPPARAM
)
- # Reduce list to single object
- if( length(out) == 1L ) out <- out[[1L]]
return(out)
}
diff --git a/R/link.R b/R/link.R
index a3dbf2f..1e97ff5 100644
--- a/R/link.R
+++ b/R/link.R
@@ -110,6 +110,10 @@ epLink <- function(from, to, init = NULL, pkg = NULL, BPPARAM = bpparam(), rate
if( by == "pathway2compound" ){
linkmap[to] <- str_remove(linkmap[[to]], "/structure/.*")
}
+ if( by == "pathway2reaction" ){
+ rxn_df <- epList("reaction", pkg = pkg)
+ linkmap[to] <- rxn_df$id[rxn_df$name %in% linkmap[[to]]]
+ }
# Remove id prefix
linkmap[to] <- str_remove(linkmap[[to]], ".*/")
return(linkmap)
@@ -142,7 +146,7 @@ epLink <- function(from, to, init = NULL, pkg = NULL, BPPARAM = bpparam(), rate
# Check if pkg exists
is_init <- !is.null(init)
# Check pkg format
- if( is_init && !all(is.character(init) & nzchar(init)) ){
+ if( is_init && (!is.character(init) || !all(nzchar(init))) ){
stop(
"'init' must be a character vector specifying the unique ",
"identifiers of type 'from' that should be mapped on 'to'.",
diff --git a/R/login.R b/R/login.R
index c0ce9f3..a05c041 100644
--- a/R/login.R
+++ b/R/login.R
@@ -3,8 +3,8 @@
#' @name epLogin
#'
#' @description
-#' epLogin lets you perform login to enviPath. An account is required to use the
-#' enviPath API.
+#' epLogin and epLogout let you log in and out of enviPath, respectively. An
+#' account is required to use the enviPath API.
#'
#' @param username \code{Character scalar}. String specifying the username
#' used to log into an enviPath personal account.
@@ -13,7 +13,7 @@
#' used to log into an enviPath personal account.
#'
#' @returns
-#' A message upon successful login.
+#' A message upon successful login or logout.
#'
#' @examples
#' \dontshow{
diff --git a/R/zzz.R b/R/zzz.R
index d09f67d..8a7e288 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -13,7 +13,8 @@
pathway2compound = c(item = "nodes", var = "idcomp"),
pathway2edge = c(item = "links", var = "id"),
pathway2node = c(item = "nodes", var = "id"),
- pathway2reaction = c(item = "links", var = "idreaction"),
+ # pathway2reaction = c(item = "links", var = "idreaction"),
+ pathway2reaction = c(item = "links", var = "name"),
pathway2structure = c(item = "nodes", var = "idcomp"),
reaction2compound = list(item = c("educts", "products"), var = "id"),
reaction2ec = c(item = "ecNumbers", var = "id"),
diff --git a/man/epGet.Rd b/man/epGet.Rd
index 847afe3..307f5c5 100644
--- a/man/epGet.Rd
+++ b/man/epGet.Rd
@@ -39,7 +39,7 @@ requests per second to be sent to the enviPath API when \code{BPPARAM} is
not serial. (Default: \code{5})}
}
\value{
-A list of objects
+A list of objects.
}
\description{
epGet returns raw objects from enviPath.
diff --git a/man/epLogin.Rd b/man/epLogin.Rd
index e5b4cf2..7c43b4f 100644
--- a/man/epLogin.Rd
+++ b/man/epLogin.Rd
@@ -17,11 +17,11 @@ used to log into an enviPath personal account.}
used to log into an enviPath personal account.}
}
\value{
-A message upon successful login.
+A message upon successful login or logout.
}
\description{
-epLogin lets you perform login to enviPath. An account is required to use the
-enviPath API.
+epLogin and epLogout let you log in and out of enviPath, respectively. An
+account is required to use the enviPath API.
}
\examples{
\dontshow{
diff --git a/tests/httptest/get/package_reaction/wrong.R b/tests/httptest/get/package_reaction/wrong.R
index 9250547..b807eb6 100644
--- a/tests/httptest/get/package_reaction/wrong.R
+++ b/tests/httptest/get/package_reaction/wrong.R
@@ -1,12 +1,12 @@
structure(list(method = "GET", url = "https://package_reaction/wrong",
status_code = 404L, headers = structure(list(Server = "nginx/1.24.0 (Ubuntu)",
- Date = "Fri, 16 Oct 2026 03:48:05 GMT", `Content-Type` = "text/html; charset=utf-8",
+ Date = "Sat, 24 Oct 2026 03:32:42 GMT", `Content-Type` = "text/html; charset=utf-8",
`Transfer-Encoding` = "chunked", Connection = "keep-alive",
Vary = "Authorization, Cookie", `X-Frame-Options` = "DENY",
`X-Content-Type-Options` = "nosniff", `Referrer-Policy` = "same-origin",
- `Cross-Origin-Opener-Policy` = "same-origin", `Set-Cookie` = "csrftoken=e36jYcr3Z69ZFISouZkrX2zsF8Hu0aQN; expires=Fri, 15 Oct 2027 03:48:05 GMT; Max-Age=31449600; Path=/; SameSite=Lax",
+ `Cross-Origin-Opener-Policy` = "same-origin", `Set-Cookie` = "csrftoken=9u2FC7Dz4uZvd2M57D4NgVQKCxqiSjaO; expires=Sat, 23 Oct 2027 03:32:42 GMT; Max-Age=31449600; Path=/; SameSite=Lax",
`Content-Encoding` = "gzip"), class = "httr2_headers"),
- body = charToRaw("\n\n \n