Skip to content

Commit 5fd17a3

Browse files
Merge branch 'dev' into pp/#356-fix-returning-null-in-timebasedweathervaluedata
2 parents 5d7a35c + 6b3b06b commit 5fd17a3

File tree

347 files changed

+13641
-5879
lines changed

Some content is hidden

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

347 files changed

+13641
-5879
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
target-branch: dev
1010
reviewers:
1111
- t-ober
12-
- sensarmad
12+
- staudtMarius
1313
- sebastian-peter
1414
- danielfeismann
1515
- jo-bao

.github/workflows/ci.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# © 2025. TU Dortmund University,
2+
# Institute of Energy Systems, Energy Efficiency and Energy Economics,
3+
# Research group Distribution grid planning and operation
4+
#
5+
6+
name: CI
7+
8+
on:
9+
push:
10+
paths-ignore:
11+
- 'docs/**'
12+
branches:
13+
- main
14+
- dev
15+
- 'hotfix/*'
16+
- 'rel/*'
17+
- 'dependabot/*'
18+
pull_request:
19+
branches:
20+
- main
21+
- dev
22+
23+
jobs:
24+
buildAndTest:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout Source
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
36+
- name: Check Branch
37+
run: |
38+
if [ "${{ github.event_name }}" == "pull_request" ]; then
39+
BRANCH_NAME="${{ github.head_ref }}"
40+
else
41+
BRANCH_NAME="${{ github.ref_name }}"
42+
fi
43+
44+
if [[ "$BRANCH_NAME" == refs/heads/* ]]; then
45+
BRANCH_NAME="${BRANCH_NAME#refs/heads/}"
46+
fi
47+
48+
export BRANCH_NAME
49+
50+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
51+
52+
./gradlew checkBranchName -PbranchName="$BRANCH_NAME" --warning-mode=none
53+
54+
bash scripts/branch_type.sh
55+
56+
- name: Version Check
57+
if: ${{ github.event_name == 'pull_request' }}
58+
env:
59+
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
60+
run: bash scripts/run-version-check.sh
61+
62+
- name: Setup Java
63+
uses: actions/setup-java@v4
64+
with:
65+
distribution: 'temurin'
66+
java-version: 17
67+
68+
- name: Build Project
69+
run: ./gradlew --refresh-dependencies clean assemble spotlessCheck
70+
71+
- name: Run Tests
72+
run: ./gradlew pmdMain pmdTest spotbugsMain spotbugsTest test jacocoTestReport jacocoTestCoverageVerification
73+
74+
- name: Build Java-Docs
75+
run: ./gradlew javadoc
76+
77+
- name: SonarQube
78+
run: |
79+
./gradlew sonar \
80+
-Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }} \
81+
-Dsonar.host.url=${{ vars.SONAR_HOST_URL }} \
82+
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
83+
-Dsonar.qualitygate.wait=true
84+
85+
#Deployment
86+
- name: Deploy
87+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
88+
env:
89+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
90+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}
91+
ORG_GRADLE_PROJECT_user: ${{ secrets.MAVENCENTRAL_USER }}
92+
ORG_GRADLE_PROJECT_password: ${{ secrets.MAVENCENTRAL_PASS }}
93+
run: |
94+
if [ "${GITHUB_REF}" == "refs/heads/main" ]; then
95+
currentVersion=$(./gradlew -q currentVersion)
96+
else
97+
currentVersion=$(./gradlew -q devVersion)
98+
fi
99+
100+
echo "currentVersion=$currentVersion"
101+
102+
./gradlew publish -PdeployVersion=$currentVersion

CHANGELOG.md

+60-5
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased/Snapshot]
88

9+
### Added
10+
- Implemented GitHub Actions for automatic code integration. [#1237](https://github.com/ie3-institute/PowerSystemDataModel/issues/1237)
11+
12+
### Fixed
13+
- Fixed SonarQube junit path issue in GitHub Actions [#1284](https://github.com/ie3-institute/PowerSystemDataModel/issues/1284)
14+
### Changed
15+
- Replaced `return this` with `return thisInstance` in CopyBuilders [#1250](https://github.com/ie3-institute/PowerSystemDataModel/issues/1250)
16+
17+
## [6.0.0] - 2025-02-27
18+
19+
### Added
20+
- Enhance `TimeSeriesSource` with method to retrieve all time keys after a given key [#543](https://github.com/ie3-institute/PowerSystemDataModel/issues/543)
21+
- Enhance `WeatherSource` with method to retrieve all time keys after a given key [#572](https://github.com/ie3-institute/PowerSystemDataModel/issues/572)
22+
- Adding timeseries for voltage values [#1128](https://github.com/ie3-institute/PowerSystemDataModel/issues/1128)
23+
- Added Staudt to list of reviewers [#1190](https://github.com/ie3-institute/PowerSystemDataModel/issues/1190)
24+
- Extend ValidationUtils for validating ThermalGrids [#1216](https://github.com/ie3-institute/PowerSystemDataModel/issues/1216)
25+
- Enhance `TimeSeriesSource` with method to retrieve the previous value before a given key [#1182](https://github.com/ie3-institute/PowerSystemDataModel/issues/1182)
26+
- Added `BdewLoadProfileTimeSeries` [#1230](https://github.com/ie3-institute/PowerSystemDataModel/issues/1230)
27+
- Added `RandomLoadProfileTimeSeries` [#1232](https://github.com/ie3-institute/PowerSystemDataModel/issues/1232)
28+
- Attribute `pThermalRated` for `ThermalStorage`s [#679](https://github.com/ie3-institute/PowerSystemDataModel/issues/679)
29+
- Attributes `housingType` and `numberInhabitants` for `ThermalHouse`s [#1253](https://github.com/ie3-institute/PowerSystemDataModel/issues/1253)
30+
- Added domestic hot water storage model [#1257](https://github.com/ie3-institute/PowerSystemDataModel/issues/1257)
31+
- Validation for BDEW load profile values [#1243](https://github.com/ie3-institute/PowerSystemDataModel/issues/1243)
32+
- Added load profiles sources [#1106](https://github.com/ie3-institute/PowerSystemDataModel/issues/1106)
33+
34+
### Fixed
35+
- Removing opened `SwitchInput` during connectivity check [#1221](https://github.com/ie3-institute/PowerSystemDataModel/issues/1221)
36+
- Fixed example in ReadTheDocs [#1244](https://github.com/ie3-institute/PowerSystemDataModel/issues/1244)
37+
- Remove double test in ThermalValidationUtils [#1260](https://github.com/ie3-institute/PowerSystemDataModel/issues/1260)]
38+
39+
### Changed
40+
- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123)
41+
- Converted eval-rst to myst syntax in ReadTheDocs, fixed line wrapping and widths [#1137](https://github.com/ie3-institute/PowerSystemDataModel/issues/1137)
42+
- Improving usage of streams on sql fetches [#827](https://github.com/ie3-institute/PowerSystemDataModel/issues/827)
43+
- Improving error message when using the outdated csv format [#1112](https://github.com/ie3-institute/PowerSystemDataModel/issues/1112)
44+
- Changed ThermalUnitValidation: Ensure that thermal boundaries of thermal house are not the same [#1186](https://github.com/ie3-institute/PowerSystemDataModel/issues/1186)
45+
- Converted `MappingEntry` into a normal class [#1087](https://github.com/ie3-institute/PowerSystemDataModel/issues/1087)
46+
- Renamed timeseries mapping `participant` column to `asset` [#1191](https://github.com/ie3-institute/PowerSystemDataModel/issues/1191)
47+
- Removed attribute `dsm` from `LoadInput` [#1195](https://github.com/ie3-institute/PowerSystemDataModel/issues/1195)
48+
- Fix spotless deprecations [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1223)
49+
- Refactored `CongestionResult`, removed `ModelResultEntity` [#1234](https://github.com/ie3-institute/PowerSystemDataModel/issues/1234)
50+
- Replaced `LoadProfileInput` with `LoadProfileTimeSeries` [#1228](https://github.com/ie3-institute/PowerSystemDataModel/issues/1228)
51+
- Enhance `CsvDataSource` [#1246](https://github.com/ie3-institute/PowerSystemDataModel/issues/1246)
52+
- Updated `_joint_grid` csv files from simona [#750](https://github.com/ie3-institute/PowerSystemDataModel/issues/750)
53+
54+
### Updates
55+
- Updated gradle to v8.13 [#1264](https://github.com/ie3-institute/PowerSystemDataModel/issues/1264)
56+
57+
## [5.1.0] - 2024-06-24
58+
959
### Added
1060
- Enhancing `VoltageLevel` with `equals` method [#1063](https://github.com/ie3-institute/PowerSystemDataModel/issues/1063)
1161
- `ConnectorValidationUtils` checks if parallel devices is > 0 [#1077](https://github.com/ie3-institute/PowerSystemDataModel/issues/1077)
1262
- `GridContainerValidationUtils` checks the connectivity for all defined operation time intervals [#1091](https://github.com/ie3-institute/PowerSystemDataModel/issues/1091)
63+
- Implemented a `CongestionResult` [#1097](https://github.com/ie3-institute/PowerSystemDataModel/issues/1097)
1364

1465
### Fixed
1566
- Fixed `MappingEntryies` not getting processed by adding `Getter` methods for record fields [#1084](https://github.com/ie3-institute/PowerSystemDataModel/issues/1084)
67+
- Fixed "depth of discharge" in documentation [#872](https://github.com/ie3-institute/PowerSystemDataModel/issues/872)
68+
- Fixed project being build twice in CI [#994](https://github.com/ie3-institute/PowerSystemDataModel/issues/994)
1669

1770
### Changed
1871
- Improvements to the search for corner points in `IdCoordinateSource` [#1016](https://github.com/ie3-institute/PowerSystemDataModel/issues/1016)
1972
- Refactor `CsvFileConnector` and `CsvDataSource` [#1007](https://github.com/ie3-institute/PowerSystemDataModel/issues/1007)
20-
73+
- Make `EntitySource` completely static [#975](https://github.com/ie3-institute/PowerSystemDataModel/issues/975)
74+
- Abstract commonly used functionality from `EntitySource` [#981](https://github.com/ie3-institute/PowerSystemDataModel/issues/981)
2175

2276
## [5.0.1] - 2024-03-07
2377

2478
### Fixed
2579
- Fixed `equals` of `ResultEntity` and `TimeSeriesEntry` [#1037](https://github.com/ie3-institute/PowerSystemDataModel/issues/1037)
26-
- Fixed "depth of discharge" in documentation [#872](https://github.com/ie3-institute/PowerSystemDataModel/issues/872)
2780

2881
## [5.0.0] - 2024-03-06
2982

@@ -291,9 +344,11 @@ coordinates or multiple exactly equal coordinates possible
291344
- CsvDataSource now stops trying to get an operator for empty operator uuid field in entities
292345
- CsvDataSource now parsing multiple geoJson strings correctly
293346

294-
[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/5.0.1...HEAD
295-
[5.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/5.0.0...5.0.1
296-
[4.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/4.1.0...5.0.0
347+
[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/6.0.0...HEAD
348+
[6.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/5.1.0...6.0.0
349+
[5.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/5.0.1...5.1.0
350+
[5.0.1]: https://github.com/ie3-institute/powersystemdatamodel/compare/5.0.0...5.0.1
351+
[5.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/4.1.0...5.0.0
297352
[4.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/4.0.0...4.1.0
298353
[4.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/3.0.0...4.0.0
299354
[3.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...3.0.0

Jenkinsfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ node {
113113
gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' +
114114
'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName)
115115

116-
sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew clean javadoc''', returnStdout: true)
116+
sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew javadoc''', returnStdout: true)
117117
}
118118

119119
// sonarqube analysis
@@ -156,7 +156,7 @@ node {
156156
*/
157157
sh(
158158
script: """set +x && cd $projectName""" +
159-
''' set +x; ./gradlew clean javadoc''',
159+
''' set +x; ./gradlew javadoc''',
160160
returnStdout: true
161161
)
162162

build.gradle

+25-17
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ plugins {
44
id 'maven-publish'
55
id 'signing'
66
id 'pmd' // code check, working on source code
7-
id 'com.diffplug.spotless' version '6.25.0' //code format
8-
id 'com.github.spotbugs' version '6.0.16' // code check, working on byte code
7+
id 'com.diffplug.spotless' version '7.0.2' //code format
8+
id 'com.github.spotbugs' version '6.1.7' // code check, working on byte code
99
id 'de.undercouch.download' version '5.6.0'
1010
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
1111
id 'jacoco' // java code coverage plugin
12-
id "org.sonarqube" version "5.0.0.4638" // sonarqube
12+
id "org.sonarqube" version "6.0.1.5171" // sonarqube
1313
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
14+
id "com.github.johnrengelman.shadow" version "8.1.1" // fat jar
1415
}
1516

1617
ext {
1718
//version (changing these should be considered thoroughly!)
1819
javaVersion = JavaVersion.VERSION_17
1920
groovyVersion = "4.0"
20-
groovyBinaryVersion = "4.0.21"
21-
testcontainersVersion = '1.19.8'
21+
groovyBinaryVersion = "4.0.26"
22+
23+
junitVersion = '1.12.0'
24+
testcontainersVersion = '1.20.6'
2225

2326
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
2427
}
@@ -42,6 +45,7 @@ apply from: scriptsLocation + 'mavenCentralPublish.gradle'
4245
apply from: scriptsLocation + 'sonarqube.gradle'
4346
apply from: scriptsLocation + 'vcs.gradle'
4447
apply from: scriptsLocation + 'semVer.gradle'
48+
apply from: scriptsLocation + 'branchName.gradle' // checks naming scheme of branches
4549

4650
repositories {
4751
mavenCentral() // searches in Sonatype's repository 'Maven Central'
@@ -55,25 +59,29 @@ dependencies {
5559
// ie³ power system utils
5660
implementation 'com.github.ie3-institute:PowerSystemUtils:2.2.1'
5761

58-
implementation 'tech.units:indriya:2.2'
62+
implementation 'tech.units:indriya:2.2.2'
5963

6064
// JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0
61-
implementation ('org.locationtech.jts:jts-core:1.19.0'){
65+
implementation ('org.locationtech.jts:jts-core:1.20.0'){
6266
exclude group: 'junit', module: 'junit'
6367
}
6468

65-
implementation 'org.locationtech.jts.io:jts-io-common:1.19.0'
69+
implementation 'org.locationtech.jts.io:jts-io-common:1.20.0'
6670

6771
// Graphs
6872
implementation 'org.jgrapht:jgrapht-core:1.5.2'
6973

74+
// Statistics (for random load model)
75+
implementation 'de.lmu.ifi.dbs.elki:elki:0.7.5'
76+
7077
// testing
7178
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
7279

73-
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
80+
testImplementation "org.junit.platform:junit-platform-launcher:$junitVersion"
81+
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
7482
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
7583
testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters
76-
testImplementation 'net.bytebuddy:byte-buddy:1.14.17' // Mocks of classes
84+
testImplementation 'net.bytebuddy:byte-buddy:1.17.2' // Mocks of classes
7785

7886
// testcontainers (docker framework for testing)
7987
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
@@ -83,19 +91,19 @@ dependencies {
8391
testImplementation "org.testcontainers:couchbase:$testcontainersVersion"
8492

8593
// logging
86-
implementation platform('org.apache.logging.log4j:log4j-bom:2.23.1')
94+
implementation platform('org.apache.logging.log4j:log4j-bom:2.24.3')
8795
implementation 'org.apache.logging.log4j:log4j-api' // log4j
8896
implementation 'org.apache.logging.log4j:log4j-core' // log4j
8997
implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j
9098

9199
// Databases
92100
implementation 'org.influxdb:influxdb-java:2.24'
93-
implementation 'com.couchbase.client:java-client:3.6.2'
94-
runtimeOnly 'org.postgresql:postgresql:42.7.3' // postgresql jdbc driver required during runtime
101+
implementation 'com.couchbase.client:java-client:3.7.9'
102+
runtimeOnly 'org.postgresql:postgresql:42.7.5' // postgresql jdbc driver required during runtime
95103

96-
implementation 'commons-io:commons-io:2.16.1' // I/O functionalities
97-
implementation 'commons-codec:commons-codec:1.17.0' // needed by commons-compress
98-
implementation 'org.apache.commons:commons-compress:1.26.2' // I/O functionalities
104+
implementation 'commons-io:commons-io:2.18.0' // I/O functionalities
105+
implementation 'commons-codec:commons-codec:1.18.0' // needed by commons-compress
106+
implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities
99107
}
100108

101109
tasks.withType(JavaCompile) {
@@ -107,7 +115,7 @@ tasks.withType(Javadoc){
107115
failOnError = false // TODO: Temp until JavaDoc issues are resolved
108116
}
109117

110-
task printVersion {
118+
tasks.register('printVersion') {
111119
doLast {
112120
println project.version
113121
}

docs/readthedocs/_static/css/theme_override.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
}
1111
.wy-table-responsive table th p {
1212
margin-bottom: 0;
13-
}
13+
}
14+
15+
table.wrapping td {
16+
white-space: normal;
17+
}

docs/readthedocs/io/ValidationUtils.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The methods in ValidationUtils and subclasses can be used to check that objects
1111
The general validation checks:
1212
- if assigned values are valid, e.g. lines are not allowed to have negative lengths or the rated power factor of any unit must be between 0 and 1
1313
- furthermore, several connections are checked, e.g. that lines only connect nodes of the same voltage level or that the voltage levels indicated for the transformer sides match the voltage levels of the nodes they are connected to.
14-
- the connectivity of the given grid for all defined operation intervals
14+
- the connectivity of the given grid for all defined operation intervals, if a switch is opened, it is filtered out for the connectivity check
1515

1616
The uniqueness validation checks if a collection of given objects are unique in either:
1717
- a specific field
@@ -74,7 +74,7 @@ The ValidationUtils include validation checks for...
7474
- HpTypeInput
7575
- StorageTypeInput
7676
- WecTypeInput
77-
- ThermalUnitValidationUtils
77+
- ThermalValidationUtils
7878
- ThermalUnitInput
7979
- ThermalSinkInput
8080
- ThermalHouseInput

0 commit comments

Comments
 (0)