Skip to content

Commit

Permalink
Merge pull request #263 from rte-antares-rpackage/ant2209
Browse files Browse the repository at this point in the history
URL encode because of specific area names
  • Loading branch information
vargastat authored Oct 9, 2024
2 parents e079e8b + 0aae8df commit af29dc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -16,6 +22,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
Expand Down
2 changes: 2 additions & 0 deletions R/setSimulationPathAPI.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit af29dc6

Please sign in to comment.