Skip to content

Commit d7cdf28

Browse files
committed
Merge branch 'dev' into ms/#642-find-and-add-standard-asset-types
# Conflicts: # CHANGELOG.md
2 parents 7e621a7 + 112fc04 commit d7cdf28

File tree

181 files changed

+9291
-5695
lines changed

Some content is hidden

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

181 files changed

+9291
-5695
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
src/test/resources/edu/ie3/datamodel/io/source/influxdb/_weather/cosmo/weather.txt eol=lf
44
src/test/resources/edu/ie3/datamodel/io/source/influxdb/_weather/icon/weather.txt eol=lf
55

6+
gradlew eol=lf

.github/dependabot.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ updates:
1212
- sensarmad
1313
- sebastian-peter
1414
- danielfeismann
15-
ignore:
16-
- dependency-name: org.spockframework:spock-core
17-
versions:
18-
- 2.3-groovy-4.0
15+
- jo-bao
16+
17+
- package-ecosystem: pip
18+
directory: "/docs/readthedocs"
19+
schedule:
20+
interval: daily
21+
time: "04:00"
22+
open-pull-requests-limit: 8
23+
target-branch: dev

.readthedocs.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-20.04
10+
os: ubuntu-22.04
1111
tools:
12-
python: "3.9"
12+
python: "3.11"
1313

1414
# Configure python
1515
python:
@@ -18,4 +18,5 @@ python:
1818

1919
# Build documentation in the docs/ directory with Sphinx
2020
sphinx:
21-
configuration: docs/readthedocs/conf.py
21+
configuration: docs/readthedocs/conf.py
22+
fail_on_warning: true

AUTHORS

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020, Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)
1+
Copyright (c) 2023, Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)
22
All rights reserved.
33

44
Lead Developers:
@@ -17,8 +17,6 @@ Main Contributers:
1717
- Vasilios Zachopoulos - https://github.com/baszach
1818
- Shubham Bajpai - https://github.com/ahamshubham
1919
- Thomas Oberließen - https://github.com/t-ober
20-
21-
Coordination:
22-
- Chris Kittl
23-
- Johannes Hiry
24-
- Debopama Sen-Sarma
20+
- Marius Staudt - https://github.com/staudtMarius
21+
- Lara Roumeliotis - https://github.com/lararou
22+
- Vicky Bung - https://github.com/vickybung1

CHANGELOG.md

Lines changed: 54 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased/Snapshot]
88

9+
### Added
10+
- Copy methods for container classes [#726](https://github.com/ie3-institute/PowerSystemDataModel/issues/726)
11+
- Allow hierarchic grid structure for JointGridContainer [#768](https://github.com/ie3-institute/PowerSystemDataModel/issues/768)
12+
- Adding SQL id coordinate sources (``IdCoordinateSource``) [#689](https://github.com/ie3-institute/PowerSystemDataModel/issues/689)
13+
- Added some standard asset types to documentation [#642](https://github.com/ie3-institute/PowerSystemDataModel/issues/642)
14+
15+
### Fixed
16+
- Fixed wrong rated power unit hint [#804](https://github.com/ie3-institute/PowerSystemDataModel/issues/804)
17+
- Fixed wrong hash code generation of ConnectorResult [#817](https://github.com/ie3-institute/PowerSystemDataModel/issues/817)
18+
19+
### Changed
20+
- Removing deprecated classes and methods [#540](https://github.com/ie3-institute/PowerSystemDataModel/issues/540)
21+
- Refactor CSV data sources [#716](https://github.com/ie3-institute/PowerSystemDataModel/issues/716)
22+
- Deleted parameter initFiles, set parameter append to false by default [#791](https://github.com/ie3-institute/PowerSystemDataModel/issues/791)
23+
- Use nio paths instead of strings for file path [#723](https://github.com/ie3-institute/PowerSystemDataModel/issues/723)
24+
25+
26+
## [3.0.0] - 2023-02-16
27+
928
### Added
1029
- SQL time series sources (`SqlTimeSeriesSource` and `SqlTimeSeriesMappingSource`) [#467](https://github.com/ie3-institute/PowerSystemDataModel/issues/467)
1130
- SQL time series have a different structure than CSV counterparts [#545](https://github.com/ie3-institute/PowerSystemDataModel/issues/545)
@@ -17,30 +36,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1736
- `ThermalGrid` as a container for a completely connected thermal grid
1837
- `EmResult` and `FlexOptionsResult` for Energy Management Systems [#651](https://github.com/ie3-institute/PowerSystemDataModel/issues/651)
1938
- `EvcsInput` now has a parameter for enabling and disabling vehicle to grid support [#681](https://github.com/ie3-institute/PowerSystemDataModel/issues/681)
20-
- Some standard asset types [#642](https://github.com/ie3-institute/PowerSystemDataModel/issues/642)
39+
- Added Dependabot updates to sphinx/readthedocs dependencies [#735](https://github.com/ie3-institute/PowerSystemDataModel/issues/735)
40+
- Created convenience function for JointGridContainer from CSV [#502](https://github.com/ie3-institute/PowerSystemDataModel/issues/502)
41+
- Added CSV grid IO integration test [#586](https://github.com/ie3-institute/PowerSystemDataModel/issues/586)
2142

2243
### Fixed
2344
- Reduced code smells [#492](https://github.com/ie3-institute/PowerSystemDataModel/issues/492)
24-
- Protected constructors for abstract classes
25-
- Use pattern matching
26-
- Remove unused imports
27-
- Use enhanced switch statements
28-
- Replace lambdas with method references
29-
- Use `Stream#toList`
30-
- Adapt visibility for JUnit 5
45+
- Protected constructors for abstract classes
46+
- Use pattern matching
47+
- Remove unused imports
48+
- Use enhanced switch statements
49+
- Replace lambdas with method references
50+
- Use `Stream#toList`
51+
- Adapt visibility for JUnit 5
3152
- More code smell fixing [#633](https://github.com/ie3-institute/PowerSystemDataModel/issues/633)
32-
- Use `List#of`
33-
- Use direct assignment with switch/case structures
34-
- Turn some classes into records
35-
- Making abstract classes' constructor protected
36-
- Improving some RegExs
37-
- Replacing `filter(Optional::isPresent).map(Optional::get)` on streams with `flatMap(Optional::stream)`
38-
- instanceof variable declarations
39-
- Removing unnecessary parentheses
40-
- Miscellaneous code smells
53+
- Use `List#of`
54+
- Use direct assignment with switch/case structures
55+
- Turn some classes into records
56+
- Making abstract classes' constructor protected
57+
- Improving some RegExs
58+
- Replacing `filter(Optional::isPresent).map(Optional::get)` on streams with `flatMap(Optional::stream)`
59+
- instanceof variable declarations
60+
- Removing unnecessary parentheses
61+
- Miscellaneous code smells
4162
- Fix JavaDoc creation
42-
- Create JavaDoc with java 17 instead of java 8
43-
- Let JavDoc pass, if there are warnings **ATTENTION:** Should be removed, when JavaDoc is fixed! (cf. Issue [#494](https://github.com/ie3-institute/PowerSystemDataModel/issues/494))
63+
- Create JavaDoc with java 17 instead of java 8
64+
- Let JavDoc pass, if there are warnings **ATTENTION:** Should be removed, when JavaDoc is fixed! (cf. Issue [#494](https://github.com/ie3-institute/PowerSystemDataModel/issues/494))
4465
- `BufferedCsvWriter` writes columns in the order, that the headline elements are defined [#434](https://github.com/ie3-institute/PowerSystemDataModel/issues/393)
4566
- Cleaned up `IndividualTimeSeriesMetaInformation`-related methods in `CsvFileConnector` [#544](https://github.com/ie3-institute/PowerSystemDataModel/issues/544)
4667
- Fixed spotlessApply handling for `.groovy` files [#637](https://github.com/ie3-institute/PowerSystemDataModel/issues/637)
@@ -61,18 +82,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6182
- `edu.ie3.datamodel.io.connectors.CsvFileConnector.CsvIndividualTimeSeriesMetaInformation`
6283
- and related methods
6384
- BREAKING: Comprehensive harmonization around weather sources [#267](https://github.com/ie3-institute/PowerSystemDataModel/issues/267)
64-
- Adapted the expected column scheme
65-
- General weather model
66-
- `coordinate` to `coordinateid`
67-
- DWD COSMO model
68-
- `diffuseirradiation` to `diffuseirradiance`
69-
- `directirradiation` to `directirradiance`
70-
- ICON model:
71-
- `"datum"` to `"time"`
72-
- Force user to provide time stamp pattern to `CouchbaseWeatherSource` to ensure harmonized querying
85+
- Adapted the expected column scheme
86+
- General weather model
87+
- `coordinate` to `coordinateid`
88+
- DWD COSMO model
89+
- `diffuseirradiation` to `diffuseirradiance`
90+
- `directirradiation` to `directirradiance`
91+
- ICON model:
92+
- `"datum"` to `"time"`
93+
- Force user to provide time stamp pattern to `CouchbaseWeatherSource` to ensure harmonized querying
7394
- BREAKING: Updating PowerSystemUtils dependency to 2.0-SNAPSHOT [#595](https://github.com/ie3-institute/PowerSystemDataModel/issues/595)
7495
- 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)
7596
- Adapted to new double converters in PSU [#705](https://github.com/ie3-institute/PowerSystemDataModel/issues/705)
97+
- Setting fixed groovy version and updating groovy [#788](https://github.com/ie3-institute/PowerSystemDataModel/issues/788)
7698

7799
## [2.1.0] - 2022-01-05
78100

@@ -88,6 +110,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88110
- Writers used to write time series are closed right away
89111
- Changed class name in FlexOptionsResult.toString [#693](https://github.com/ie3-institute/PowerSystemDataModel/issues/693)
90112
- Deleted parameter decimalPlaces and changed naming of serialization method [#710](https://github.com/ie3-institute/PowerSystemDataModel/issues/710)
113+
- Changed switch result documentation according to the implementation [#757](https://github.com/ie3-institute/PowerSystemDataModel/issues/757)
114+
- Added documentation for EmResult and FlexOptionResult [#656](https://github.com/ie3-institute/PowerSystemDataModel/issues/656)
91115

92116
## [2.0.1] - 2021-07-08
93117

@@ -191,7 +215,8 @@ coordinates or multiple exactly equal coordinates possible
191215
- CsvDataSource now stops trying to get an operator for empty operator uuid field in entities
192216
- CsvDataSource now parsing multiple geoJson strings correctly
193217

194-
[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...HEAD
218+
[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/3.0.0...HEAD
219+
[3.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...3.0.0
195220
[2.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.1...2.1.0
196221
[2.0.1]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.0...2.0.1
197222
[2.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/1.1.0...2.0.0

Jenkinsfile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ String sshCredentialsId = '19f16959-8a0d-4a60-bd1f-5adb4572b702' // id that matc
2727
String sonarqubeProjectKey = 'edu.ie3:PowerSystemDataModel' // sonarqube project key, case-sensitive
2828

2929
/* maven central configuration */
30-
String mavenCentralCredentialsId = '87bfb2d4-7613-4816-9fe1-70dfd7e6dec2' // id that matches the maven central credentials set as jenkins property
30+
String mavenCentralCredentialsId = '197ffae7-08b2-4641-aa15-a2351d8011cd' // id that matches the maven central credentials set as jenkins property
3131
String mavenCentralSignKeyFileId = 'dc96216c-d20a-48ff-98c0-1c7ba096d08d' // id that matches the maven central sign key file set as jenkins property
3232
String mavenCentralSignKeyId = 'a1357827-1516-4fa2-ab8e-72cdea07a692' // id that matches the maven central sign key id set as jenkins property
3333

@@ -145,9 +145,9 @@ node {
145145

146146
// get the sonatype credentials stored in the jenkins secure keychain
147147
withCredentials([
148-
usernamePassword(credentialsId: mavenCentralCredentialsId, usernameVariable: 'mavencentral_username', passwordVariable: 'mavencentral_password'),
149-
file(credentialsId: mavenCentralSignKeyFileId, variable: 'mavenCentralKeyFile'),
150-
usernamePassword(credentialsId: mavenCentralSignKeyId, passwordVariable: 'signingPassword', usernameVariable: 'signingKeyId')
148+
usernamePassword(credentialsId: mavenCentralCredentialsId, usernameVariable: 'MAVENCENTRAL_USER', passwordVariable: 'MAVENCENTRAL_PASS'),
149+
file(credentialsId: mavenCentralSignKeyFileId, variable: 'MAVENCENTRAL_KEYFILE'),
150+
usernamePassword(credentialsId: mavenCentralSignKeyId, usernameVariable: 'MAVENCENTRAL_SIGNINGKEYID', passwordVariable: 'MAVENCENTRAL_SIGNINGPASS')
151151
]) {
152152

153153
/*
@@ -159,17 +159,15 @@ node {
159159
returnStdout: true
160160
)
161161

162-
String deployGradleTasks = "--refresh-dependencies test " +
163-
"publish -Puser=${env.mavencentral_username} " +
164-
"-Ppassword=${env.mavencentral_password} " +
165-
"-Psigning.keyId=${env.signingKeyId} " +
166-
"-Psigning.password=${env.signingPassword} " +
167-
"-Psigning.secretKeyRingFile=${env.mavenCentralKeyFile} " +
162+
String deployGradleTasks = '--refresh-dependencies test ' +
163+
'publish -Puser=${MAVENCENTRAL_USER} ' +
164+
'-Ppassword=${MAVENCENTRAL_PASS} ' +
165+
'-Psigning.keyId=${MAVENCENTRAL_SIGNINGKEYID} ' +
166+
'-Psigning.password=${MAVENCENTRAL_SIGNINGPASS} ' +
167+
'-Psigning.secretKeyRingFile=${MAVENCENTRAL_KEYFILE} ' +
168168
"-PdeployVersion='$projectVersion'"
169169

170-
// see https://docs.gradle.org/6.0.1/release-notes.html "Publication of SHA256 and SHA512 checksums"
171-
def preventSHACheckSums = "-Dorg.gradle.internal.publish.checksums.insecure=true"
172-
gradle("${deployGradleTasks} $preventSHACheckSums", projectName)
170+
gradle(deployGradleTasks, projectName)
173171
}
174172

175173
if (env.BRANCH_NAME == "main") {
@@ -376,7 +374,7 @@ def gradle(String command, String relativeProjectDir) {
376374
env.JENKINS_NODE_COOKIE = 'dontKillMe' // this is necessary for the Gradle daemon to be kept alive
377375

378376
// switch directory to be able to use gradle wrapper
379-
sh(script: """set +x && cd $relativeProjectDir""" + ''' set +x; ./gradlew ''' + """$command""", returnStdout: true)
377+
sh(script: """set +x && cd $relativeProjectDir""" + ''' set +x; ./gradlew ''' + command, returnStdout: true)
380378
}
381379

382380
def determineSonarqubeGradleCmd(String sonarqubeProjectKey, String currentBranchName, String targetBranchName, String orgName, String projectName, String relativeGitDir) {

build.gradle

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ plugins {
44
id 'maven-publish'
55
id 'signing'
66
id 'pmd' // code check, working on source code
7-
id 'com.diffplug.spotless' version '6.13.0'//code format
8-
id 'com.github.spotbugs' version '5.0.13' // code check, working on byte code
9-
id 'de.undercouch.download' version '5.3.0'
7+
id 'com.diffplug.spotless' version '6.19.0'//code format
8+
id 'com.github.spotbugs' version '5.0.14' // code check, working on byte code
9+
id 'de.undercouch.download' version '5.4.0'
1010
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
1111
id 'jacoco' // java code coverage plugin
12-
id "org.sonarqube" version "3.5.0.2730" // sonarqube
12+
id "org.sonarqube" version "4.2.1.3168" // sonarqube
1313
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
1414
}
1515

1616
ext {
1717
//version (changing these should be considered thoroughly!)
1818
javaVersion = JavaVersion.VERSION_17
19-
tscfgVersion = '0.9.9'
20-
testcontainersVersion = '1.17.6'
19+
groovyVersion = "4.0"
20+
groovyBinaryVersion = "4.0.12"
21+
testcontainersVersion = '1.18.3'
2122

2223
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
2324
}
@@ -41,26 +42,17 @@ apply from: scriptsLocation + 'semVer.gradle'
4142

4243
repositories {
4344
mavenCentral() // searches in Sonatype's repository 'Maven Central'
44-
maven { url 'https://www.jitpack.io' } // allows github repos as dependencies
4545

4646
// sonatype snapshot repo
47-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
48-
47+
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
4948
}
5049

5150
dependencies {
52-
constraints {
53-
implementation( 'junit:junit:4.13.2+'){
54-
because "CVE-2020-15250 - Temporary folder vulnerability - https://github.com/advisories/GHSA-269g-pwp5-87pp"
55-
}
56-
}
5751

5852
// ie³ power system utils
59-
implementation 'com.github.ie3-institute:PowerSystemUtils:2.0-SNAPSHOT'
60-
61-
implementation 'tech.units:indriya:2.1.3'
53+
implementation 'com.github.ie3-institute:PowerSystemUtils:2.0'
6254

63-
implementation 'com.github.johanneshiry:OSMonaut:v1.1.1' // tmp pbf parse
55+
implementation 'tech.units:indriya:2.2'
6456

6557
// JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0
6658
implementation ('org.locationtech.jts:jts-core:1.19.0'){
@@ -70,13 +62,15 @@ dependencies {
7062
implementation 'org.locationtech.jts.io:jts-io-common:1.19.0'
7163

7264
// Graphs
73-
implementation 'org.jgrapht:jgrapht-core:1.5.1'
65+
implementation 'org.jgrapht:jgrapht-core:1.5.2'
7466

7567
// testing
76-
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
77-
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
68+
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
69+
70+
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
71+
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
7872
testImplementation 'org.objenesis:objenesis:3.3' // Mock creation with constructor parameters
79-
testImplementation 'net.bytebuddy:byte-buddy:1.12.22' // Mocks of classes
73+
testImplementation 'net.bytebuddy:byte-buddy:1.14.5' // Mocks of classes
8074

8175
// testcontainers (docker framework for testing)
8276
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
@@ -86,20 +80,19 @@ dependencies {
8680
testImplementation "org.testcontainers:couchbase:$testcontainersVersion"
8781

8882
// logging
89-
implementation platform('org.apache.logging.log4j:log4j-bom:2.19.0')
83+
implementation platform('org.apache.logging.log4j:log4j-bom:2.20.0')
9084
implementation 'org.apache.logging.log4j:log4j-api' // log4j
9185
implementation 'org.apache.logging.log4j:log4j-core' // log4j
9286
implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j
9387

9488
// Databases
9589
implementation 'org.influxdb:influxdb-java:2.23'
96-
implementation 'com.couchbase.client:java-client:3.4.2'
97-
runtimeOnly 'org.postgresql:postgresql:42.5.1' // postgresql jdbc driver required during runtime
90+
implementation 'com.couchbase.client:java-client:3.4.7'
91+
runtimeOnly 'org.postgresql:postgresql:42.6.0' // postgresql jdbc driver required during runtime
9892

99-
implementation 'commons-io:commons-io:2.11.0' // I/O functionalities
100-
implementation 'org.apache.commons:commons-compress:1.22' // I/O functionalities
93+
implementation 'commons-io:commons-io:2.13.0' // I/O functionalities
94+
implementation 'org.apache.commons:commons-compress:1.23.0' // I/O functionalities
10195
implementation 'org.apache.commons:commons-lang3:3.12.0'
102-
10396
}
10497

10598
tasks.withType(JavaCompile) {
43.3 KB
Loading
257 KB
Loading
25.9 KB
Loading

0 commit comments

Comments
 (0)