Skip to content

Commit

Permalink
Merge branch 'dev' into to/#766-use-default-time-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
t-ober committed Mar 1, 2023
2 parents a947163 + 968ef93 commit 84bde53
Show file tree
Hide file tree
Showing 55 changed files with 3,475 additions and 98 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ updates:
- sensarmad
- sebastian-peter
- danielfeismann
- jo-bao
ignore:
- dependency-name: org.spockframework:spock-core
versions:
- 2.3-groovy-4.0

- package-ecosystem: pip
directory: "/docs/readthedocs"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 8
target-branch: dev
10 changes: 4 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020, Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)
Copyright (c) 2023, Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)
All rights reserved.

Lead Developers:
Expand All @@ -17,8 +17,6 @@ Main Contributers:
- Vasilios Zachopoulos - https://github.com/baszach
- Shubham Bajpai - https://github.com/ahamshubham
- Thomas Oberließen - https://github.com/t-ober

Coordination:
- Chris Kittl
- Johannes Hiry
- Debopama Sen-Sarma
- Marius Staudt - https://github.com/staudtMarius
- Lara Roumeliotis - https://github.com/lararou
- Vicky Bung - https://github.com/vickybung1
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased/Snapshot]

### Added
- Copy methods for container classes [#726](https://github.com/ie3-institute/PowerSystemDataModel/issues/726)

### Fixed


### Changed


## [3.0.0] - 2023-02-16

### Added
- SQL time series sources (`SqlTimeSeriesSource` and `SqlTimeSeriesMappingSource`) [#467](https://github.com/ie3-institute/PowerSystemDataModel/issues/467)
- SQL time series have a different structure than CSV counterparts [#545](https://github.com/ie3-institute/PowerSystemDataModel/issues/545)
Expand All @@ -17,6 +28,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `ThermalGrid` as a container for a completely connected thermal grid
- `EmResult` and `FlexOptionsResult` for Energy Management Systems [#651](https://github.com/ie3-institute/PowerSystemDataModel/issues/651)
- `EvcsInput` now has a parameter for enabling and disabling vehicle to grid support [#681](https://github.com/ie3-institute/PowerSystemDataModel/issues/681)
- Added Dependabot updates to sphinx/readthedocs dependencies [#735](https://github.com/ie3-institute/PowerSystemDataModel/issues/735)
- Created convenience function for JointGridContainer from CSV [#502](https://github.com/ie3-institute/PowerSystemDataModel/issues/502)
- Added CSV grid IO integration test [#586](https://github.com/ie3-institute/PowerSystemDataModel/issues/586)

### Fixed
- Reduced code smells [#492](https://github.com/ie3-institute/PowerSystemDataModel/issues/492)
Expand Down Expand Up @@ -190,7 +204,8 @@ coordinates or multiple exactly equal coordinates possible
- CsvDataSource now stops trying to get an operator for empty operator uuid field in entities
- CsvDataSource now parsing multiple geoJson strings correctly

[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...HEAD
[Unreleased/Snapshot]: https://github.com/ie3-institute/powersystemdatamodel/compare/3.0.0...HEAD
[3.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.1.0...3.0.0
[2.1.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.1...2.1.0
[2.0.1]: https://github.com/ie3-institute/powersystemdatamodel/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/1.1.0...2.0.0
Expand Down
26 changes: 12 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ String sshCredentialsId = '19f16959-8a0d-4a60-bd1f-5adb4572b702' // id that matc
String sonarqubeProjectKey = 'edu.ie3:PowerSystemDataModel' // sonarqube project key, case-sensitive

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

Expand Down Expand Up @@ -145,9 +145,9 @@ node {

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

/*
Expand All @@ -159,17 +159,15 @@ node {
returnStdout: true
)

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

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

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

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

def determineSonarqubeGradleCmd(String sonarqubeProjectKey, String currentBranchName, String targetBranchName, String orgName, String projectName, String relativeGitDir) {
Expand Down
29 changes: 10 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ plugins {
id 'maven-publish'
id 'signing'
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.13.0'//code format
id 'com.diffplug.spotless' version '6.15.0'//code format
id 'com.github.spotbugs' version '5.0.13' // code check, working on byte code
id 'de.undercouch.download' version '5.3.0'
id 'de.undercouch.download' version '5.3.1'
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
id 'jacoco' // java code coverage plugin
id "org.sonarqube" version "3.5.0.2730" // sonarqube
id "org.sonarqube" version "4.0.0.2929" // sonarqube
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
}

ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_17
tscfgVersion = '0.9.9'
testcontainersVersion = '1.17.6'

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
Expand All @@ -41,26 +40,18 @@ apply from: scriptsLocation + 'semVer.gradle'

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

// sonatype snapshot repo
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }

}

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

// ie³ power system utils
implementation 'com.github.ie3-institute:PowerSystemUtils:2.0-SNAPSHOT'

implementation 'tech.units:indriya:2.1.3'
implementation 'com.github.ie3-institute:PowerSystemUtils:2.0'

implementation 'com.github.johanneshiry:OSMonaut:v1.1.1' // tmp pbf parse
implementation 'tech.units:indriya:2.1.4'

// JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0
implementation ('org.locationtech.jts:jts-core:1.19.0'){
Expand All @@ -76,7 +67,7 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
testImplementation 'org.objenesis:objenesis:3.3' // Mock creation with constructor parameters
testImplementation 'net.bytebuddy:byte-buddy:1.12.22' // Mocks of classes
testImplementation 'net.bytebuddy:byte-buddy:1.14.0' // Mocks of classes

// testcontainers (docker framework for testing)
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
Expand All @@ -86,15 +77,15 @@ dependencies {
testImplementation "org.testcontainers:couchbase:$testcontainersVersion"

// logging
implementation platform('org.apache.logging.log4j:log4j-bom:2.19.0')
implementation platform('org.apache.logging.log4j:log4j-bom:2.20.0')
implementation 'org.apache.logging.log4j:log4j-api' // log4j
implementation 'org.apache.logging.log4j:log4j-core' // log4j
implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j

// Databases
implementation 'org.influxdb:influxdb-java:2.23'
implementation 'com.couchbase.client:java-client:3.4.2'
runtimeOnly 'org.postgresql:postgresql:42.5.1' // postgresql jdbc driver required during runtime
implementation 'com.couchbase.client:java-client:3.4.3'
runtimeOnly 'org.postgresql:postgresql:42.5.4' // postgresql jdbc driver required during runtime

implementation 'commons-io:commons-io:2.11.0' // I/O functionalities
implementation 'org.apache.commons:commons-compress:1.22' // I/O functionalities
Expand Down
4 changes: 2 additions & 2 deletions docs/readthedocs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ On `Maven central <https://search.maven.org/artifact/com.github.ie3-institute/Po
Snapshot releases
=================
Available on `OSS Sonatype <https://oss.sonatype.org/>`_.
Available on `OSS Sonatype <https://s01.oss.sonatype.org/>`_.
Add the correct repository:

.. code-block:: xml
<repositories>
<repository>http://oss.sonatype.org/content/repositories/snapshots</repository>
<repository>https://s01.oss.sonatype.org/content/repositories/snapshots</repository>
</repositories>
and add the dependency:
Expand Down
7 changes: 5 additions & 2 deletions docs/readthedocs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ Contact the (Main) Maintainers
If you feel, something this missing, wrong or misleading, please contact one of our main contributors:

* `@sensarmad <https://github.com/sensarmad>`_
* `@johanneshiry <https://github.com/johanneshiry>`_
* `@ckittl <https://github.com/ckittl>`_
* `@t-ober <https://github.com/t-ober>`_
* `@danielfeismann <https://github.com/danielfeismann>`_
* `@sebastian-peter <https://github.com/sebastian-peter>`_
* `@jo-bao <https://github.com/jo-bao>`_
* `@julianhohmann <https://github.com/julianhohmann>`_

Hat tip to all other contributors!

Expand Down
26 changes: 13 additions & 13 deletions docs/readthedocs/models/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Immutability
Copyable
With the general design principle of immutability, entity modifications (e.g. updates of field values) can become
hard and annoying. To avoid generating methods to update each field value, we provide an adapted version of the
`builder pattern <https://en.wikipedia.org/wiki/Builder_pattern/>`_ to make entity modifications as easy as possible.
`builder pattern <https://en.wikipedia.org/wiki/Builder_pattern/>`__ to make entity modifications as easy as possible.
Each entity holds it's own copy builder class, which follows the same inheritance as the entity class itself. With a
call of `.copy()` on an entity instance a builder instance is returned, that allows for modification of fields and
can be terminated with `.build()` which will return an instance of the entity with modified field values as required.
Expand All @@ -50,7 +50,7 @@ Harmonized Units System

Equality Checks
To represent quantities in the models within an acceptable accuracy, the JSR 385 reference implementation
`Indriya <https://github.com/unitsofmeasurement/indriya>`_ is used. Comparing quantity objects or objects holding quantity
`Indriya <https://github.com/unitsofmeasurement/indriya>`__ is used. Comparing quantity objects or objects holding quantity
instances is not as trivial as it might seem, because there might be different understandings about the equality of
quantities (e.g. there is a big difference between two instances being equal or equivalent). After long discussions how to
treat quantities in the entity :code:`equals()` method, we agreed on the following rules to be applied:
Expand All @@ -74,12 +74,12 @@ Equality Checks
would return :code:`false` as the equality check does NOT convert units. If you want to compare two entity instances
based on their equivalence you have (for now) check for each quantity manually using their :code:`isEquivalentTo()`
method. If you think you would benefit from a standard method that allows entity equivalence check, please consider
handing in an issue `here <https://github.com/ie3-institute/PowerSystemDataModel/issues>`_.
handing in an issue `here <https://github.com/ie3-institute/PowerSystemDataModel/issues>`__.
Furthermore, the current existing implementation of :code:`isEquivalentTo()` in indriya does not allow the provision of
a tolerance threshold that might be necessary when comparing values from floating point operations. We consider
providing such a method in our `PowerSystemUtils <https://github.com/ie3-institute/PowerSystemUtils>`_ library.
providing such a method in our `PowerSystemUtils <https://github.com/ie3-institute/PowerSystemUtils>`__ library.
If you think you would benefit from such a method, please consider handing in an issue
`here <https://github.com/ie3-institute/PowerSystemUtils/issues>`_.
`here <https://github.com/ie3-institute/PowerSystemUtils/issues>`__.

Conditional Parameters
Some of the models have conditional parameters. When reading model data from a data source, their respective factories for building these
Expand All @@ -97,8 +97,8 @@ Model classes you can use to describe a data set as input to power system simula

input/operator

Grid Related Models
===================
Grid Related Input Models
=========================
.. toctree::
:maxdepth: 1

Expand All @@ -112,8 +112,8 @@ Grid Related Models
input/grid/measurementunit
input/grid/gridcontainer

Participant Related Models
==========================
Participant Related Input Models
================================
.. toctree::
:maxdepth: 1

Expand All @@ -137,8 +137,8 @@ Result
******
Model classes you can use to describe the outcome of a power system simulation.

Grid Related Models
===================
Grid Related Result Models
==========================
.. toctree::
:maxdepth: 1

Expand All @@ -150,8 +150,8 @@ Grid Related Models
result/grid/transformer2w
result/grid/transformer3w

Participant Related Models
==========================
Participant Related Result Models
=================================
.. toctree::
:maxdepth: 1

Expand Down
4 changes: 2 additions & 2 deletions docs/readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
commonmark==0.9.1
recommonmark==0.7.1
Sphinx==4.2.0
sphinx-rtd-theme==1.0.0
Sphinx==5.3.0
sphinx-rtd-theme==1.2.0
39 changes: 13 additions & 26 deletions gradle/scripts/mavenCentralPublish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
url = 'https:github.com/ie3-institute/PowerSystemDatamodel'
organization {
name = 'Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)/TU Dortmund University'
url = 'http:www.ie3.tu-dortmund.de/'
url = 'https:www.ie3.tu-dortmund.de/'
}
issueManagement {
system = 'GitHub'
Expand All @@ -51,31 +51,18 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
name = 'BSD 3-Clause License'
url = 'https:github.com/ie3-institute/PowerSystemDataModel/blob/master/LICENSE'
}
scm {
connection = 'scm:git:git:github.com/ie3-institute/PowerSystemDataModel.git'
developerConnection = 'scm:git:ssh:github.com:ie3-institute/PowerSystemDataModel.git'
url = 'https:github.com/ie3-institute/PowerSystemDataModel'
}
developers {
[
developer {
id = 'johanneshiry'
name = 'Johannes Hiry'
email = '[email protected]'
},
developer {
id = 'ckittl'
name = 'Chris Kittl'
email = '[email protected]'
},
developer {
id = 'sensarmad'
name = 'Debopama Sen Sarma'
email = '[email protected]'
}
]
}
developers {
developer {
organization = "Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3)/TU Dortmund University"
organizationUrl = "https:ie3.etit.tu-dortmund.de"
}
}
scm {
connection = 'scm:git:git:github.com/ie3-institute/PowerSystemDataModel.git'
developerConnection = 'scm:git:ssh:github.com:ie3-institute/PowerSystemDataModel.git'
url = 'https:github.com/ie3-institute/PowerSystemDataModel'
}
}

removeTestDependenciesFromPom(pom)
Expand All @@ -91,8 +78,8 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = versionString.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.getProperty('user')
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Mon Dec 02 10:39:11 CET 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Loading

0 comments on commit 84bde53

Please sign in to comment.