Skip to content

Commit

Permalink
Bump powsybl-core to 6.0.0 (#292)
Browse files Browse the repository at this point in the history
* Bump powsybl-core to 6.0.0
* Implements getModelNames in GroovyExtension (#278)

Signed-off-by: Florian Dupuy <[email protected]>
Co-authored-by: Lisrte <[email protected]>
  • Loading branch information
flo-dup and Lisrte authored Sep 29, 2023
1 parent 819694d commit 71a732c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ abstract class AbstractEquipmentGroovyExtension<T> {
DynaWaltzProvider.NAME
}

List<String> getModelNames() {
equipmentConfigs.collect(eq -> eq.lib)
}

void load(Binding binding, Consumer<T> consumer) {
equipmentConfigs.forEach {
binding.setVariable(it.lib, { Closure<Void> closure ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ abstract class AbstractPureDynamicGroovyExtension<T> {
DynaWaltzProvider.NAME
}

List<String> getModelNames() {
modelTags
}

void load(Binding binding, Consumer<T> consumer) {
modelTags.forEach {
binding.setVariable(it, { Closure<Void> closure ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ abstract class AbstractSimpleEquipmentGroovyExtension<T> {
DynaWaltzProvider.NAME
}

List<String> getModelNames() {
List.of(equipmentConfig.lib)
}

void load(Binding binding, Consumer<T> consumer) {
binding.setVariable(equipmentConfig.lib, { Closure<Void> closure ->
def cloned = closure.clone()
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

<properties>
<java.version>17</java.version>
<powsyblcore.version>6.0.0-RC1</powsyblcore.version>
<powsyblcore.version>6.0.0</powsyblcore.version>
<groovy.version>4.0.14</groovy.version> <!-- used for groovy-json but also for groovydoc (dynawaltz-dsl) -->
<sonar.coverage.jacoco.xmlReportPaths>
../distribution/target/site/jacoco-aggregate/jacoco.xml,
Expand Down

0 comments on commit 71a732c

Please sign in to comment.