Skip to content

Commit

Permalink
Release/v8.7.0 (#224)
Browse files Browse the repository at this point in the history
### Breaking changes (Antares v8.7.0) : 

* `readBindingConstraints()` read now Scenarized RHS for binding constraints (cf. Antares v8.7 changelog)
  - function returns a new list structure
* Private function `fread_antares()` no longer returns warnings  
* `api_put()/api_delete()` return a server error message 

BUGFIXES :  

* `readBindingConstraints()` read well study >= v8.3.2

DATA : 

* A test study in tar.gz format is available in version v8.7.0  
* An empty test study in version v8.7.0 for marginal cases 

Dependencies :  

* New package `lifecycle` to manage functions status/package status
  • Loading branch information
berthetclement authored May 28, 2024
1 parent 3801d6e commit 59cef41
Show file tree
Hide file tree
Showing 29 changed files with 814 additions and 270 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: antaresRead
Type: Package
Title: Import, Manipulate and Explore the Results of an 'Antares' Simulation
Version: 2.6.2
Version: 2.7.0
Authors@R: c(
person("Tatiana", "Vargas", email = "[email protected]", role = c("aut", "cre")),
person("Jalal-Edine", "ZAWAM", role = "aut"),
Expand Down Expand Up @@ -39,7 +39,8 @@ Imports:
httr,
utils,
memuse,
purrr
purrr,
lifecycle
Suggests:
rhdf5 (>= 2.24.0),
testthat,
Expand Down
239 changes: 120 additions & 119 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,119 +1,120 @@
# Generated by roxygen2: do not edit by hand

S3method("[",antaresDataTable)
S3method(as.antaresDataList,antaresDataList)
S3method(as.antaresDataList,antaresDataTable)
S3method(as.antaresDataList,data.frame)
S3method(as.antaresDataList,default)
S3method(as.antaresDataList,list)
S3method(as.antaresDataTable,antaresDataTable)
S3method(as.antaresDataTable,data.frame)
S3method(as.antaresDataTable,default)
S3method(copyToClipboard,antaresDataList)
S3method(copyToClipboard,data.frame)
S3method(copyToClipboard,default)
S3method(copyToClipboard,matrix)
S3method(merge,antaresDataTable)
S3method(print,antaresDataList)
S3method(print,antaresDataTable)
S3method(print,simOptions)
S3method(subset,antaresDataList)
S3method(summary,bindingConstraints)
S3method(viewAntares,antaresDataList)
S3method(viewAntares,default)
export(.getOptionsH5)
export(.h5ReadAntares)
export(.writeAntaresH5Fun)
export(aggregateResult)
export(api_delete)
export(api_get)
export(api_post)
export(api_put)
export(as.antaresDataList)
export(as.antaresDataTable)
export(changeTimeStep)
export(copyToClipboard)
export(extractDataList)
export(getAlias)
export(getAreas)
export(getDistricts)
export(getGeographicTrimming)
export(getIdCols)
export(getLinks)
export(hvdcModification)
export(isH5Opts)
export(mergeDigests)
export(parAggregateMCall)
export(ponderateMcAggregation)
export(readAntares)
export(readAntaresAreas)
export(readAntaresClusters)
export(readBindingConstraints)
export(readClusterDesc)
export(readClusterResDesc)
export(readClusterSTDesc)
export(readDigestFile)
export(readIni)
export(readIniAPI)
export(readIniFile)
export(readInputRES)
export(readInputTS)
export(readInputThermal)
export(readLayout)
export(readOptimCriteria)
export(removeVirtualAreas)
export(setAlias)
export(setHvdcAreas)
export(setRam)
export(setSimulationPath)
export(setSimulationPathAPI)
export(setTimeoutAPI)
export(showAliases)
export(simOptions)
export(viewAntares)
export(writeAntaresH5)
export(writeDigest)
import(bit64)
import(data.table)
import(doParallel)
import(jsonlite)
import(parallel)
import(plyr)
importFrom(doParallel,registerDoParallel)
importFrom(grDevices,col2rgb)
importFrom(grDevices,rgb)
importFrom(httr,DELETE)
importFrom(httr,GET)
importFrom(httr,POST)
importFrom(httr,PUT)
importFrom(httr,accept_json)
importFrom(httr,add_headers)
importFrom(httr,content)
importFrom(httr,content_type_json)
importFrom(httr,http_status)
importFrom(httr,stop_for_status)
importFrom(httr,timeout)
importFrom(memuse,Sys.meminfo)
importFrom(methods,is)
importFrom(pbapply,pblapply)
importFrom(pbapply,pboptions)
importFrom(plyr,llply)
importFrom(purrr,quietly)
importFrom(shiny,getDefaultReactiveDomain)
importFrom(shiny,incProgress)
importFrom(shiny,withProgress)
importFrom(stats,as.formula)
importFrom(stats,setNames)
importFrom(stats,weighted.mean)
importFrom(stringi,stri_replace_last_fixed)
importFrom(stringr,str_match)
importFrom(stringr,str_replace)
importFrom(stringr,str_split)
importFrom(utils,URLencode)
importFrom(utils,View)
importFrom(utils,read.table)
importFrom(utils,setTxtProgressBar)
importFrom(utils,txtProgressBar)
importFrom(utils,type.convert)
importFrom(utils,untar)
importFrom(utils,write.table)
# Generated by roxygen2: do not edit by hand

S3method("[",antaresDataTable)
S3method(as.antaresDataList,antaresDataList)
S3method(as.antaresDataList,antaresDataTable)
S3method(as.antaresDataList,data.frame)
S3method(as.antaresDataList,default)
S3method(as.antaresDataList,list)
S3method(as.antaresDataTable,antaresDataTable)
S3method(as.antaresDataTable,data.frame)
S3method(as.antaresDataTable,default)
S3method(copyToClipboard,antaresDataList)
S3method(copyToClipboard,data.frame)
S3method(copyToClipboard,default)
S3method(copyToClipboard,matrix)
S3method(merge,antaresDataTable)
S3method(print,antaresDataList)
S3method(print,antaresDataTable)
S3method(print,simOptions)
S3method(subset,antaresDataList)
S3method(summary,bindingConstraints)
S3method(viewAntares,antaresDataList)
S3method(viewAntares,default)
export(.getOptionsH5)
export(.h5ReadAntares)
export(.writeAntaresH5Fun)
export(aggregateResult)
export(api_delete)
export(api_get)
export(api_post)
export(api_put)
export(as.antaresDataList)
export(as.antaresDataTable)
export(changeTimeStep)
export(copyToClipboard)
export(extractDataList)
export(getAlias)
export(getAreas)
export(getDistricts)
export(getGeographicTrimming)
export(getIdCols)
export(getLinks)
export(hvdcModification)
export(isH5Opts)
export(mergeDigests)
export(parAggregateMCall)
export(ponderateMcAggregation)
export(readAntares)
export(readAntaresAreas)
export(readAntaresClusters)
export(readBindingConstraints)
export(readClusterDesc)
export(readClusterResDesc)
export(readClusterSTDesc)
export(readDigestFile)
export(readIni)
export(readIniAPI)
export(readIniFile)
export(readInputRES)
export(readInputTS)
export(readInputThermal)
export(readLayout)
export(readOptimCriteria)
export(removeVirtualAreas)
export(setAlias)
export(setHvdcAreas)
export(setRam)
export(setSimulationPath)
export(setSimulationPathAPI)
export(setTimeoutAPI)
export(showAliases)
export(simOptions)
export(viewAntares)
export(writeAntaresH5)
export(writeDigest)
import(bit64)
import(data.table)
import(doParallel)
import(jsonlite)
import(parallel)
import(plyr)
importFrom(doParallel,registerDoParallel)
importFrom(grDevices,col2rgb)
importFrom(grDevices,rgb)
importFrom(httr,DELETE)
importFrom(httr,GET)
importFrom(httr,POST)
importFrom(httr,PUT)
importFrom(httr,accept_json)
importFrom(httr,add_headers)
importFrom(httr,content)
importFrom(httr,content_type_json)
importFrom(httr,http_status)
importFrom(httr,stop_for_status)
importFrom(httr,timeout)
importFrom(lifecycle,deprecated)
importFrom(memuse,Sys.meminfo)
importFrom(methods,is)
importFrom(pbapply,pblapply)
importFrom(pbapply,pboptions)
importFrom(plyr,llply)
importFrom(purrr,quietly)
importFrom(shiny,getDefaultReactiveDomain)
importFrom(shiny,incProgress)
importFrom(shiny,withProgress)
importFrom(stats,as.formula)
importFrom(stats,setNames)
importFrom(stats,weighted.mean)
importFrom(stringi,stri_replace_last_fixed)
importFrom(stringr,str_match)
importFrom(stringr,str_replace)
importFrom(stringr,str_split)
importFrom(utils,URLencode)
importFrom(utils,View)
importFrom(utils,read.table)
importFrom(utils,setTxtProgressBar)
importFrom(utils,txtProgressBar)
importFrom(utils,type.convert)
importFrom(utils,untar)
importFrom(utils,write.table)
24 changes: 24 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
> Copyright © 2016 RTE Réseau de transport d’électricité
# antaresRead 2.7.0

### Breaking changes (Antares v8.7.0) :

* `readBindingConstraints()` read now Scenarized RHS for binding constraints (cf. Antares v8.7 changelog)
- function returns a new list structure
* Private function `fread_antares()` no longer returns warnings
* `api_put()/api_delete()` return a server error message

BUGFIXES :

* `readBindingConstraints()` read well study >= v8.3.2

DATA :

* A test study in tar.gz format is available in version v8.7.0
* An empty test study in version v8.7.0 for marginal cases

Dependencies :

* New package `lifecycle` to manage functions status/package status



# antaresRead 2.6.2 (development)

BUGFIXES :
Expand Down
16 changes: 14 additions & 2 deletions R/API-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ api_put <- function(opts, endpoint, ..., default_endpoint = "v1/studies") {
config,
...
)
stop_for_status(result)
api_content <- content(result)
if(!is.null(names(api_content)))
api_content <- paste0("\n[Description] : ", api_content$description,
"\n[Exception] : ", api_content$exception)
else
api_content <- NULL
stop_for_status(result, task = api_content)
content(result)
}

Expand Down Expand Up @@ -178,6 +184,12 @@ api_delete <- function(opts, endpoint, ..., default_endpoint = "v1/studies") {
config = config,
...
)
stop_for_status(result)
api_content <- content(result)
if(!is.null(names(api_content)))
api_content <- paste0("\n[Description] : ", api_content$description,
"\n[Exception] : ", api_content$exception)
else
api_content <- NULL
stop_for_status(result, task = api_content)
content(result)
}
7 changes: 7 additions & 0 deletions R/antaresRead-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecated
## usethis namespace: end
NULL
Loading

0 comments on commit 59cef41

Please sign in to comment.