Skip to content

Commit 8825d8f

Browse files
authored
Merge pull request #789 from ie3-institute/sp/#788-update-groovy
Set fixed groovy version and update groovy to 4.0
2 parents 3c4b84f + 1075825 commit 8825d8f

File tree

8 files changed

+12
-36
lines changed

8 files changed

+12
-36
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ updates:
1313
- sebastian-peter
1414
- danielfeismann
1515
- jo-bao
16-
ignore:
17-
- dependency-name: org.spockframework:spock-core
18-
versions:
19-
- 2.3-groovy-4.0
2016

2117
- package-ecosystem: pip
2218
directory: "/docs/readthedocs"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8686
- BREAKING: Updating PowerSystemUtils dependency to 2.0-SNAPSHOT [#595](https://github.com/ie3-institute/PowerSystemDataModel/issues/595)
8787
- BREAKING: Generified the `LoadInput` attribute `standardLoadProfile` to `loadProfile` as it should also address the newly added `TemperatureDependantLoadProfile`s [#601](https://github.com/ie3-institute/PowerSystemDataModel/issues/601)
8888
- Adapted to new double converters in PSU [#705](https://github.com/ie3-institute/PowerSystemDataModel/issues/705)
89+
- Setting fixed groovy version and updating groovy [#788](https://github.com/ie3-institute/PowerSystemDataModel/issues/788)
8990

9091
## [2.1.0] - 2022-01-05
9192

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ plugins {
1616
ext {
1717
//version (changing these should be considered thoroughly!)
1818
javaVersion = JavaVersion.VERSION_17
19+
groovyVersion = "4.0"
20+
groovyBinaryVersion = "4.0.11"
1921
testcontainersVersion = '1.17.6'
2022

2123
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
@@ -63,8 +65,10 @@ dependencies {
6365
implementation 'org.jgrapht:jgrapht-core:1.5.1'
6466

6567
// testing
68+
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
69+
6670
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
67-
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
71+
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
6872
testImplementation 'org.objenesis:objenesis:3.3' // Mock creation with constructor parameters
6973
testImplementation 'net.bytebuddy:byte-buddy:1.14.4' // Mocks of classes
7074

src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected CsvDataSource(String csvSep, String folderPath, FileNamingStrategy fil
8383
* @return a map containing the mapping of (fieldName to fieldValue) or an empty map if an error
8484
* occurred
8585
*/
86-
private Map<String, String> buildFieldsToAttributes(
86+
protected Map<String, String> buildFieldsToAttributes(
8787
final String csvRow, final String[] headline) {
8888

8989
TreeMap<String, String> insensitiveFieldsToAttributes =
@@ -171,7 +171,7 @@ protected String[] parseCsvRow(String csvRow, String csvSep) {
171171
* @deprecated only left for downward compatibility. Will be removed in a major release
172172
*/
173173
@Deprecated(since = "1.1.0", forRemoval = true)
174-
private String[] oldFieldVals(String csvSep, String csvRow) {
174+
protected String[] oldFieldVals(String csvSep, String csvRow) {
175175

176176
/*geo json support*/
177177
final String geoJsonRegex = "\\{.+?}}}";
@@ -237,7 +237,7 @@ private List<String> extractMatchingStrings(String regexString, String csvRow) {
237237
* @return either the first found instancen of {@link OperatorInput} or {@link
238238
* OperatorInput#NO_OPERATOR_ASSIGNED}
239239
*/
240-
private OperatorInput getFirstOrDefaultOperator(
240+
protected OperatorInput getFirstOrDefaultOperator(
241241
Collection<OperatorInput> operators,
242242
String operatorUuid,
243243
String entityClassName,

src/test/groovy/edu/ie3/datamodel/io/sink/InfluxDbSinkIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class InfluxDbSinkIT extends Specification {
6161
when:
6262
def connector = new InfluxDbConnector(influxDbContainer.url,"test_weather", "test_scenario")
6363
then:
64-
connector.connectionValid
64+
connector.isConnectionValid()
6565
}
6666

6767
def "An InfluxDbSink can persist a ResultEntity"() {

src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvDataSourceTest.groovy

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,6 @@ class CsvDataSourceTest extends Specification {
3434
DummyCsvSource(String csvSep, String folderPath, FileNamingStrategy fileNamingStrategy) {
3535
super(csvSep, folderPath, fileNamingStrategy)
3636
}
37-
38-
Map<String, String> buildFieldsToAttributes(
39-
final String csvRow, final String[] headline) {
40-
return super.buildFieldsToAttributes(csvRow, headline)
41-
}
42-
43-
OperatorInput getFirstOrDefaultOperator(
44-
Collection<OperatorInput> operators, String operatorUuid, String entityClassName, String requestEntityUuid) {
45-
return super.getFirstOrDefaultOperator(operators, operatorUuid, entityClassName, requestEntityUuid)
46-
}
47-
48-
def <T extends UniqueEntity> Set<Map<String, String>> distinctRowsWithLog(
49-
Class<T> entityClass, Collection<Map<String, String>> allRows) {
50-
return super.distinctRowsWithLog(allRows, uuidExtractor, entityClass.simpleName, "UUID")
51-
}
52-
53-
String[] parseCsvRow(
54-
String csvRow, String csvSep) {
55-
return super.parseCsvRow(csvRow, csvSep)
56-
}
57-
58-
String[] oldFieldVals(
59-
String csvSep, String csvRow) {
60-
return super.oldFieldVals(csvSep, csvRow)
61-
}
6237
}
6338

6439
@Shared

src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourceCosmoIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class InfluxDbWeatherSourceCosmoIT extends Specification implements TestContaine
5454
def connector = new InfluxDbConnector(influxDbContainer.url,"test_weather", "test_scenario")
5555

5656
then:
57-
connector.connectionValid
57+
connector.isConnectionValid()
5858
}
5959

6060
def "An InfluxDbWeatherSource can read and correctly parse a single value for a specific date and coordinate"() {

src/test/groovy/edu/ie3/datamodel/io/source/influxdb/InfluxDbWeatherSourceIconIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class InfluxDbWeatherSourceIconIT extends Specification implements WeatherSource
5252
def connector = new InfluxDbConnector(influxDbContainer.url, "test_weather", "test_scenario")
5353

5454
then:
55-
connector.connectionValid
55+
connector.isConnectionValid()
5656
}
5757

5858
def "An InfluxDbWeatherSource can read and correctly parse a single value for a specific date and coordinate"() {

0 commit comments

Comments
 (0)