Skip to content

Commit

Permalink
export check antares version
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed May 2, 2019
1 parent a574730 commit a34d25e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: antaresEditObject
Type: Package
Title: Edit an 'Antares' Simulation
Version: 0.1.5.950
Version: 0.1.5.960
Authors@R: c(
person("Frederic", "Breant", email = "frederic.breant@rte-france.com", role = c("aut", "cre")),
person("Victor", "Perrier", email = "victor.perrier@dreamRs.fr", role = c("aut")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export(filteringOptions)
export(getCapacityDSR)
export(getCapacityPSP)
export(getPlaylist)
export(is_antares_v7)
export(nodalOptimizationOptions)
export(propertiesLinkOptions)
export(readIniFile)
Expand Down
20 changes: 19 additions & 1 deletion R/checkVersion.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@

is_antares_v7 <- function(opts) {
#' Is study an Antares v7 study ?
#'
#' @param opts
#' List of simulation parameters returned by the function
#' \code{antaresRead::setSimulationPath}
#'
#' @return a logical, \code{TRUE} if study is v7 or above, \code{FALSE} otherwise
#' @export
#'
#' @examples
#'
#' \dontrun{
#' # setSimulationPath
#'
#' is_antares_v7()
#'
#' }
#'
is_antares_v7 <- function(opts = antaresRead::simOptions()) {
new_version <- getOption("antares.version.new", default = 700)
new_version <- as.numeric(new_version)
isTRUE(opts$antaresVersion >= new_version)
Expand Down
28 changes: 28 additions & 0 deletions man/is_antares_v7.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a34d25e

Please sign in to comment.