From b3db580827d7b120d7ad7666346a96fa6babc106 Mon Sep 17 00:00:00 2001 From: kemihak Date: Fri, 27 Sep 2024 20:21:28 +0200 Subject: [PATCH 1/2] Encode url because of specific names of areas (ex: & psp x1) --- NEWS.md | 1 + R/setSimulationPathAPI.R | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index d694fa08..ed886dfc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,7 @@ BUGFIXES : * `setSimulationPathAPI()`: control the existence of the output folder **links** or **areas** before reading the data (upgrade Antares Web) * `readClusterDesc()` / `readClusterResDesc()` / `readClusterSTDesc()` return a data.table in API mode +* `setSimulationPathAPI()` : encode URL before reading the data in simulation mode # antaresRead 2.7.1 diff --git a/R/setSimulationPathAPI.R b/R/setSimulationPathAPI.R index 274aa316..0613431f 100644 --- a/R/setSimulationPathAPI.R +++ b/R/setSimulationPathAPI.R @@ -496,7 +496,9 @@ setSimulationPathAPI <- function(host, study_id, token, simulation = NULL, if (type == "links") { path_element <- gsub(pattern = " - ", replacement = "/", x = path_element) } + path_element <- URLencode(path_element, reserved = TRUE) d <- file.path(path, type, path_element) + d <- URLencode(d) f <- names(read_secure_json(paste0(d, "&depth=1"), ...)) f <- f[grep("values", f)] if (length(f) > 0) { From 0aae8df9a606667211d6d779470ea9f23da99c0b Mon Sep 17 00:00:00 2001 From: kemihak Date: Mon, 30 Sep 2024 08:37:37 +0200 Subject: [PATCH 2/2] Upgrade version in NEWS.md --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index ed886dfc..0dd7634d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ > Copyright © 2016 RTE Réseau de transport d’électricité +# antaresRead 2.7.3 + +BUGFIXES : + +* `setSimulationPathAPI()` : encode URL before reading the data in simulation mode + # antaresRead 2.7.2 NEW FEATURES: