Skip to content

Commit

Permalink
Merge branch 'dev' into ms/#827-use-java-streams-on-sql-fetsches-effe…
Browse files Browse the repository at this point in the history
…ctively

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
sebastian-peter committed Oct 25, 2024
2 parents 81ef0e1 + e962a0d commit a398154
Show file tree
Hide file tree
Showing 96 changed files with 1,147 additions and 739 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased/Snapshot]

### Added
- Enhance `TimeSeriesSource` with method to retrieve all time keys after a given key [#543](https://github.com/ie3-institute/PowerSystemDataModel/issues/543)
- Enhance `WeatherSource` with method to retrieve all time keys after a given key [#572](https://github.com/ie3-institute/PowerSystemDataModel/issues/572)

### Fixed

### Changed
- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123)
- Converted eval-rst to myst syntax in ReadTheDocs, fixed line wrapping and widths[#1137](https://github.com/ie3-institute/PowerSystemDataModel/issues/1137)
- Improving usage of streams on sql fetches [#827](https://github.com/ie3-institute/PowerSystemDataModel/issues/827)

## [5.1.0] - 2024-06-24
Expand Down
24 changes: 12 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'signing'
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.25.0' //code format
id 'com.github.spotbugs' version '6.0.19' // code check, working on byte code
id 'com.github.spotbugs' version '6.0.25' // code check, working on byte code
id 'de.undercouch.download' version '5.6.0'
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
id 'jacoco' // java code coverage plugin
Expand All @@ -17,8 +17,8 @@ ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_17
groovyVersion = "4.0"
groovyBinaryVersion = "4.0.22"
testcontainersVersion = '1.20.1'
groovyBinaryVersion = "4.0.23"
testcontainersVersion = '1.20.3'

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
}
Expand Down Expand Up @@ -58,22 +58,22 @@ dependencies {
implementation 'tech.units:indriya:2.2'

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

implementation 'org.locationtech.jts.io:jts-io-common:1.19.0'
implementation 'org.locationtech.jts.io:jts-io-common:1.20.0'

// Graphs
implementation 'org.jgrapht:jgrapht-core:1.5.2'

// testing
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters
testImplementation 'net.bytebuddy:byte-buddy:1.14.18' // Mocks of classes
testImplementation 'net.bytebuddy:byte-buddy:1.15.7' // Mocks of classes

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

// logging
implementation platform('org.apache.logging.log4j:log4j-bom:2.23.1')
implementation platform('org.apache.logging.log4j:log4j-bom:2.24.1')
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.24'
implementation 'com.couchbase.client:java-client:3.7.1'
runtimeOnly 'org.postgresql:postgresql:42.7.3' // postgresql jdbc driver required during runtime
implementation 'com.couchbase.client:java-client:3.7.4'
runtimeOnly 'org.postgresql:postgresql:42.7.4' // postgresql jdbc driver required during runtime

implementation 'commons-io:commons-io:2.16.1' // I/O functionalities
implementation 'commons-io:commons-io:2.17.0' // I/O functionalities
implementation 'commons-codec:commons-codec:1.17.1' // needed by commons-compress
implementation 'org.apache.commons:commons-compress:1.26.2' // I/O functionalities
implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities
}

tasks.withType(JavaCompile) {
Expand Down
6 changes: 5 additions & 1 deletion docs/readthedocs/_static/css/theme_override.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
}
.wy-table-responsive table th p {
margin-bottom: 0;
}
}

table.wrapping td {
white-space: normal;
}
141 changes: 68 additions & 73 deletions docs/readthedocs/io/csvfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,59 @@ You may extend / alter the naming with pre- or suffix by calling `new EntityPers

### Input

```{eval-rst}
.. list-table::
:widths: auto
```{list-table}
:header-rows: 1
:widths: auto
* - Model
- File Name
* - operator
- *prefix_* operator_input *_suffix*
* - node
- *prefix_* node_input *_suffix*
* - line
- | *prefix_* line_input *_suffix*
| *prefix_* line_type_input *_suffix*
* - switch
- *prefix_* switch_input *_suffix*
* - two winding transformer
- | *prefix_* transformer2w_input *_suffix*
| *prefix_* transformer2w_type_input *_suffix*
* - three winding transformer
- | *prefix_* transformer3w_input *_suffix*
| *prefix_* transformer3w_type_input *_suffix*
* - measurement unit
- *prefix_* measurement_unit_input *_suffix*
* - biomass plant
- | *prefix_* bm_input *_suffix*
| *prefix_* bm_type_input *_suffix*
* - combined heat and power plant
- | *prefix_* chp_input *_suffix*
| *prefix_* chp_type_input *_suffix*
* - electric vehicle
- | *prefix_* ev_input *_suffix*
| *prefix_* ev_type_input *_suffix*
* - electric vehicle charging station
- *prefix_* evcs_input *_suffix*
* - fixed feed in facility
- *prefix_* fixed_feed_in_input *_suffix*
* - heat pump
- | *prefix_* hp_input *_suffix*
| *prefix_* hp_type_input *_suffix*
* - load
- *prefix_* load_input *_suffix*
* - photovoltaic power plant
- *prefix_* pv_input *_suffix*
* - electrical energy storage
- | *prefix_* storage_input *_suffix*
| *prefix_* storage_type_input *_suffix*
* - wind energy converter
- | *prefix_* wec_input *_suffix*
| *prefix_* wec_type_input *_suffix*
* - schematic node graphic
- *prefix_* node_graphic_input *_suffix*
* - schematic line graphic
- *prefix_* line_graphic_input *_suffix*
* - Model
- File Name
* - operator
- *prefix_* operator_input *_suffix*
* - node
- *prefix_* node_input *_suffix*
* - line
- *prefix_* line_input *_suffix*
*prefix_* line_type_input *_suffix*
* - switch
- *prefix_* switch_input *_suffix*
* - two winding transformer
- *prefix_* transformer2w_input *_suffix*
*prefix_* transformer2w_type_input *_suffix*
* - three winding transformer
- *prefix_* transformer3w_input *_suffix*
*prefix_* transformer3w_type_input *_suffix*
* - measurement unit
- *prefix_* measurement_unit_input *_suffix*
* - biomass plant
- *prefix_* bm_input *_suffix*
*prefix_* bm_type_input *_suffix*
* - combined heat and power plant
- *prefix_* chp_input *_suffix*
*prefix_* chp_type_input *_suffix*
* - electric vehicle
- *prefix_* ev_input *_suffix*
*prefix_* ev_type_input *_suffix*
* - electric vehicle charging station
- *prefix_* evcs_input *_suffix*
* - fixed feed in facility
- *prefix_* fixed_feed_in_input *_suffix*
* - heat pump
- *prefix_* hp_input *_suffix*
*prefix_* hp_type_input *_suffix*
* - load
- *prefix_* load_input *_suffix*
* - photovoltaic power plant
- *prefix_* pv_input *_suffix*
* - electrical energy storage
- *prefix_* storage_input *_suffix*
*prefix_* storage_type_input *_suffix*
* - wind energy converter
- *prefix_* wec_input *_suffix*
*prefix_* wec_type_input *_suffix*
* - schematic node graphic
- *prefix_* node_graphic_input *_suffix*
* - schematic line graphic
- *prefix_* line_graphic_input *_suffix*
```

### Id Coordinate
Expand All @@ -89,8 +87,7 @@ Csv id coordinate sources can have two different ways to represent their coordin

### Time Series

```{eval-rst}
.. list-table::
```{list-table}
:widths: 50 50
:header-rows: 1
Expand Down Expand Up @@ -123,41 +120,39 @@ You can also use the Method `java.util.UUID#randomUUID` to create a UUID.
This is the UUID from the example above `2fcb3e53-b94a-4b96-bea4-c469e499f1a1`.

The following keys are supported until now:
```{eval-rst}
.. list-table::
```{list-table}
:widths: auto
:header-rows: 1
* - Key
- Information and supported head line
* - c
- | An energy price (e.g. in €/MWh; c stands for charge).
| Permissible head line: ``time,price``
- An energy price (e.g. in €/MWh; c stands for charge).
Permissible head line: ``time,price``
* - p
- | Active power
| Permissible head line: ``time,p``
- Active power
Permissible head line: ``time,p``
* - pq
- | Active and reactive power
| Permissible head line: ``time,p,q``
- Active and reactive power
Permissible head line: ``time,p,q``
* - h
- | Heat power demand
| Permissible head line: ``time,h``
- Heat power demand
Permissible head line: ``time,h``
* - ph
- | Active and heat power
| Permissible head line: ``time,p,h``
- Active and heat power
Permissible head line: ``time,p,h``
* - pqh
- | Active, reactive and heat power
| Permissible head line: ``time,p,q,h``
- Active, reactive and heat power
Permissible head line: ``time,p,q,h``
* - weather
- | Weather information
| Permissible head line: ``time,coordinate,direct_irradiation,diffuse_irradiation,temperature,wind_velocity,wind_direction``
- Weather information
Permissible head line: ``time,coordinate,direct_irradiation,diffuse_irradiation,temperature,wind_velocity,wind_direction``
```

### Results

```{eval-rst}
.. list-table::
```{list-table}
:widths: auto
:header-rows: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ coordinates.

## Information

```{eval-rst}
.. list-table::
:widths: 33 33
```{list-table}
:widths: auto
:class: wrapping
:header-rows: 1
* - Attribute
Expand Down
6 changes: 3 additions & 3 deletions docs/readthedocs/models/input/additionaldata/timeseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ In addition to actual data, a mapping function has to be known.
To be as flexible, as possible, the actual content of the time series is given as children of the `Value` class.
The following different values are available:

```{eval-rst}
.. list-table::
:widths: 33 33
```{list-table}
:widths: auto
:class: wrapping
:header-rows: 1
* - Value Class
Expand Down
26 changes: 13 additions & 13 deletions docs/readthedocs/models/input/em.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ Participants are connected to an EM each via their `em` field.

## Attributes, Units and Remarks

```{eval-rst}
.. list-table::
:widths: 33 33 33
```{list-table}
:widths: auto
:header-rows: 1
:class: wrapping
* - Attribute
- Unit
- Remarks
* - uuid
- --
-
-
-
* - id
- --
-
- Human readable identifier
* - operator
- --
-
-
-
* - operationTime
- --
-
- Timely restriction of operation
* - controlStrategy
- --
-
- String representation (e.g. name) of a control strategy
* - parentEm
- --
- | Reference to a superior Energy Management Unit that is controlling this EM.
| Field can be empty or missing, if this EM itself is not controlled.
-
- Reference to a superior Energy Management Unit that is controlling this EM.
Field can be empty or missing, if this EM itself is not controlled.
```

Expand Down
6 changes: 3 additions & 3 deletions docs/readthedocs/models/input/grid/gridcontainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ A synoptic overview of both classes' attributes is given here:

## Attributes, Units and Remarks

```{eval-rst}
.. list-table::
:widths: 33 33 33
```{list-table}
:widths: auto
:class: wrapping
:header-rows: 1
Expand Down
Loading

0 comments on commit a398154

Please sign in to comment.