Skip to content

Commit

Permalink
Releasecran/271 (#253)
Browse files Browse the repository at this point in the history
* update github workflow

* Read cluster desc bugfix when cluster exist (#242)

* fix bug readClusterDesc when no cluster + cover ST and RES case

* add test (init test for thermal + res)

* Release/cran261 (#244) (#245)

update with developments made during the CRAN release phase

* Add argument encoding in api_get() (#246)

* Add encoding argument to api_get()

* [readIniFile] : avoid `utils::type.convert` on specific cases (ex : 789e or 123i)  (#247)

* Add specific case to avoid bad convert

* Add unit test file for readIniFile

* Release/v8.7.0 (#224)

### 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

* Dev readInputThermal, add area parameter + parameter thermalavailabilities + default matrix when no time series in cluster (#243)

* Dev readInputThermal, add area parameter + parameter thermalavailabilities + default matrix when no time series in cluster

* .importThermalData fixed to be compatible with data daily format

* fix test thermal + add test RES

* update

* Ant1777/dimbcgroup (#251)

* setSimulationPath() updated with new private function to add meta data group dimension for binding constraints

* setSimulationPath() doc updated with new parameter

* Read ST clusters with readAntares() (#252)

* Add .importOutputForSTClusters()

* Add 'clustersST' argument in readAntares()

* create a wrapper for calling .reshape_details_file()

* Simplify .get_value_columns_details_file() with a reference table

* Correct areasWithSTClusters parameter in .getSimOptions()

* Add unit tests for 'areasWithSTClusters' parameter

* Add DETAILS_FILES_TYPE column in the simulation_variables_names_by_support.csv

* Update NEWS.md

* Make new parameter 'clustersST' API compatible

* Update documentation with the new function .importOutputForSTClusters()

* Import simulation_variables_names_by_support.csv in data.frame type rather than data.table

* Specify the separator for the simulation_variables_names_by_support.csv import

* Check reverse dependencies

* revdep check ok

* fix rhdf5 call refenrence

* Revdeps ok

* cleaning tests

* add cran-comments

* COMMENT THESE TESTS

* GitHub Actions workflow updated with r-hub v2

* delete package rhdf5 from suggests and delete all functions who use it + delete tests

* cran comment updated with rev dep check ok

* update setsimulation path no more check .h5

* update test to put inside testhat

* comment, cran issue

* update study selection "grep" pattern in tests causing CRAN ISSUE

* add test for path in setSimulationPath() + test + cleaning vignette

* update docs to put values returned + some cleaning references to private function with (:::)

* Fix bad usage of options("warn")

* delete references to .GlobalEnv in test environment

* readAntares() updated to delete `assign` function to modifiy the .GlobalEnv

* delete assign() function and ref to .GlobalEnv

* update cran-comment

* setSimulationPath() delete `getwd()` to choose dir in windows (cran policie)
  • Loading branch information
berthetclement authored Sep 2, 2024
1 parent 69256e9 commit 9462f33
Show file tree
Hide file tree
Showing 68 changed files with 1,456 additions and 3,823 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
7 changes: 4 additions & 3 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.7.0
Version: 2.7.1
Authors@R: c(
person("Tatiana", "Vargas", email = "[email protected]", role = c("aut", "cre")),
person("Jalal-Edine", "ZAWAM", role = "aut"),
Expand All @@ -15,6 +15,7 @@ Authors@R: c(
person("Clement", "Berthet", role = "ctb"),
person("Kamel", "Kemiha", role = "ctb"),
person("Abdallah", "Mahoudi", role = "ctb"),
person("Nicolas", "Boitard", role = "ctb"),
person("RTE", role = "cph")
)
Description: Import, manipulate and explore results generated by 'Antares', a
Expand All @@ -40,9 +41,9 @@ Imports:
utils,
memuse,
purrr,
lifecycle
lifecycle,
assertthat
Suggests:
rhdf5 (>= 2.24.0),
testthat,
covr,
knitr,
Expand Down
6 changes: 1 addition & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ 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)
Expand All @@ -41,7 +38,6 @@ export(getGeographicTrimming)
export(getIdCols)
export(getLinks)
export(hvdcModification)
export(isH5Opts)
export(mergeDigests)
export(parAggregateMCall)
export(ponderateMcAggregation)
Expand Down Expand Up @@ -71,14 +67,14 @@ 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(assertthat,assert_that)
importFrom(doParallel,registerDoParallel)
importFrom(grDevices,col2rgb)
importFrom(grDevices,rgb)
Expand Down
30 changes: 28 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
> Copyright © 2016 RTE Réseau de transport d’électricité
# antaresRead 2.7.1

NEW FEATURES:

* `readInputThermal()` :
- new parameter **areas** to get desired clusters from selected areas.
- new parameter **thermalAvailabilities** to import time series.
* `readInputRES()` new parameter **areas** to get desired clusters from selected areas.
* `setSimulationPath()` return a new parameter `binding` (for studies >= v8.7.0).
It contains a table with group dimensions of time series for binding constraints.
* `readAntares()` new parameter **clustersST** to read (output simulation) short-term clusters

BREAKING CHANGES :

* `readInputThermal()` / `readInputRES()` default value when no time series in the selected clusters.

BUGFIXES :

* `readInputThermal()` return data from file data.txt with `thermalData` parameter
* `setSimulationPath()` has also the parameter **areasWithSTClusters** in 'output' mode



# antaresRead 2.7.0

### Breaking changes (Antares v8.7.0) :
Expand All @@ -23,7 +46,8 @@ Dependencies :
* New package `lifecycle` to manage functions status/package status


# antaresRead 2.6.2 (development)

# antaresRead 2.6.2

BUGFIXES :
* `readIniFile()` : avoid `utils::type.convert` on specific cases (ex : 789e or 123i)
Expand All @@ -45,6 +69,8 @@ BUGFIXES :
BREAKING CHANGES :

* `api_get()` has a new parameter to control JSON file parsing
* `readInputThermal()` default value when no time series in the selected clusters.
* `readInputRES()` default value when no time series in the selected clusters
* `readClusterDesc()`/ `readClusterRESDesc()` / `readClusterSTDesc()`
return empty dataTable and warning if no cluster in Antares study.

Expand All @@ -60,7 +86,7 @@ BREAKING CHANGES (Antares v8.6) :
* `readInputTS()` is now compatible to read time series with :
- "short-term storage"
- "mingen" (pmin hydro value)
* `setSimulationPath()` has new parameter `areasWithSTClusters` (name of area with "st-storage" cluster)
* `setSimulationPath()` has new parameter **areasWithSTClusters** (name of area with "st-storage" cluster)


BUGFIXES :
Expand Down
Loading

0 comments on commit 9462f33

Please sign in to comment.