Skip to content

Commit 9462f33

Browse files
Releasecran/271 (#253)
* 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)
1 parent 69256e9 commit 9462f33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1456
-3823
lines changed

.github/workflows/rhub.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3+
# You can update this file to a newer version using the rhub2 package:
4+
#
5+
# rhub::rhub_setup()
6+
#
7+
# It is unlikely that you need to modify this file manually.
8+
9+
name: R-hub
10+
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
config:
16+
description: 'A comma separated list of R-hub platforms to use.'
17+
type: string
18+
default: 'linux,windows,macos'
19+
name:
20+
description: 'Run name. You can leave this empty now.'
21+
type: string
22+
id:
23+
description: 'Unique ID. You can leave this empty now.'
24+
type: string
25+
26+
jobs:
27+
28+
setup:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
containers: ${{ steps.rhub-setup.outputs.containers }}
32+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
33+
34+
steps:
35+
# NO NEED TO CHECKOUT HERE
36+
- uses: r-hub/actions/setup@v1
37+
with:
38+
config: ${{ github.event.inputs.config }}
39+
id: rhub-setup
40+
41+
linux-containers:
42+
needs: setup
43+
if: ${{ needs.setup.outputs.containers != '[]' }}
44+
runs-on: ubuntu-latest
45+
name: ${{ matrix.config.label }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
config: ${{ fromJson(needs.setup.outputs.containers) }}
50+
container:
51+
image: ${{ matrix.config.container }}
52+
53+
steps:
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
56+
with:
57+
token: ${{ secrets.RHUB_TOKEN }}
58+
job-config: ${{ matrix.config.job-config }}
59+
- uses: r-hub/actions/setup-deps@v1
60+
with:
61+
token: ${{ secrets.RHUB_TOKEN }}
62+
job-config: ${{ matrix.config.job-config }}
63+
- uses: r-hub/actions/run-check@v1
64+
with:
65+
token: ${{ secrets.RHUB_TOKEN }}
66+
job-config: ${{ matrix.config.job-config }}
67+
68+
other-platforms:
69+
needs: setup
70+
if: ${{ needs.setup.outputs.platforms != '[]' }}
71+
runs-on: ${{ matrix.config.os }}
72+
name: ${{ matrix.config.label }}
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
77+
78+
steps:
79+
- uses: r-hub/actions/checkout@v1
80+
- uses: r-hub/actions/setup-r@v1
81+
with:
82+
job-config: ${{ matrix.config.job-config }}
83+
token: ${{ secrets.RHUB_TOKEN }}
84+
- uses: r-hub/actions/platform-info@v1
85+
with:
86+
token: ${{ secrets.RHUB_TOKEN }}
87+
job-config: ${{ matrix.config.job-config }}
88+
- uses: r-hub/actions/setup-deps@v1
89+
with:
90+
job-config: ${{ matrix.config.job-config }}
91+
token: ${{ secrets.RHUB_TOKEN }}
92+
- uses: r-hub/actions/run-check@v1
93+
with:
94+
job-config: ${{ matrix.config.job-config }}
95+
token: ${{ secrets.RHUB_TOKEN }}

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: antaresRead
22
Type: Package
33
Title: Import, Manipulate and Explore the Results of an 'Antares' Simulation
4-
Version: 2.7.0
4+
Version: 2.7.1
55
Authors@R: c(
66
person("Tatiana", "Vargas", email = "[email protected]", role = c("aut", "cre")),
77
person("Jalal-Edine", "ZAWAM", role = "aut"),
@@ -15,6 +15,7 @@ Authors@R: c(
1515
person("Clement", "Berthet", role = "ctb"),
1616
person("Kamel", "Kemiha", role = "ctb"),
1717
person("Abdallah", "Mahoudi", role = "ctb"),
18+
person("Nicolas", "Boitard", role = "ctb"),
1819
person("RTE", role = "cph")
1920
)
2021
Description: Import, manipulate and explore results generated by 'Antares', a
@@ -40,9 +41,9 @@ Imports:
4041
utils,
4142
memuse,
4243
purrr,
43-
lifecycle
44+
lifecycle,
45+
assertthat
4446
Suggests:
45-
rhdf5 (>= 2.24.0),
4647
testthat,
4748
covr,
4849
knitr,

NAMESPACE

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ S3method(subset,antaresDataList)
2121
S3method(summary,bindingConstraints)
2222
S3method(viewAntares,antaresDataList)
2323
S3method(viewAntares,default)
24-
export(.getOptionsH5)
25-
export(.h5ReadAntares)
26-
export(.writeAntaresH5Fun)
2724
export(aggregateResult)
2825
export(api_delete)
2926
export(api_get)
@@ -41,7 +38,6 @@ export(getGeographicTrimming)
4138
export(getIdCols)
4239
export(getLinks)
4340
export(hvdcModification)
44-
export(isH5Opts)
4541
export(mergeDigests)
4642
export(parAggregateMCall)
4743
export(ponderateMcAggregation)
@@ -71,14 +67,14 @@ export(setTimeoutAPI)
7167
export(showAliases)
7268
export(simOptions)
7369
export(viewAntares)
74-
export(writeAntaresH5)
7570
export(writeDigest)
7671
import(bit64)
7772
import(data.table)
7873
import(doParallel)
7974
import(jsonlite)
8075
import(parallel)
8176
import(plyr)
77+
importFrom(assertthat,assert_that)
8278
importFrom(doParallel,registerDoParallel)
8379
importFrom(grDevices,col2rgb)
8480
importFrom(grDevices,rgb)

NEWS.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
> Copyright © 2016 RTE Réseau de transport d’électricité
22
3+
# antaresRead 2.7.1
4+
5+
NEW FEATURES:
6+
7+
* `readInputThermal()` :
8+
- new parameter **areas** to get desired clusters from selected areas.
9+
- new parameter **thermalAvailabilities** to import time series.
10+
* `readInputRES()` new parameter **areas** to get desired clusters from selected areas.
11+
* `setSimulationPath()` return a new parameter `binding` (for studies >= v8.7.0).
12+
It contains a table with group dimensions of time series for binding constraints.
13+
* `readAntares()` new parameter **clustersST** to read (output simulation) short-term clusters
14+
15+
BREAKING CHANGES :
16+
17+
* `readInputThermal()` / `readInputRES()` default value when no time series in the selected clusters.
18+
19+
BUGFIXES :
20+
21+
* `readInputThermal()` return data from file data.txt with `thermalData` parameter
22+
* `setSimulationPath()` has also the parameter **areasWithSTClusters** in 'output' mode
23+
24+
25+
326
# antaresRead 2.7.0
427

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

2548

26-
# antaresRead 2.6.2 (development)
49+
50+
# antaresRead 2.6.2
2751

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

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

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

6591

6692
BUGFIXES :

0 commit comments

Comments
 (0)