Skip to content

Commit 9218a7a

Browse files
Merge branch 'dev' into df/#1409-spotless-java-format
# Conflicts: # CHANGELOG.md
2 parents f3c906b + c93fcf4 commit 9218a7a

File tree

7 files changed

+76
-7
lines changed

7 files changed

+76
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
8585
#Deployment
8686
- name: Deploy
87-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
87+
if: github.ref == 'refs/heads/main'
8888
env:
8989
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
9090
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}
@@ -108,7 +108,7 @@ jobs:
108108
109109
#MavenCentral Staging
110110
- name: MavenCentral Staging
111-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
111+
if: github.ref == 'refs/heads/main'
112112
env:
113113
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
114114
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased/Snapshot]
88

9-
### Added
9+
### Added
10+
-Added weathersource documentation [#1390](https://github.com/ie3-institute/PowerSystemDataModel/issues/1390)
1011

1112
### Fixed
13+
- Fixed small issues in tests [#1400](https://github.com/ie3-institute/PowerSystemDataModel/issues/1400)
1214

1315
### Changed
16+
- Updated CI-Pipeline to run task `Deploy` and `Staging` only for `Main` [#1403](https://github.com/ie3-institute/PowerSystemDataModel/issues/1403)
1417
- Change spotless to use googleJavaFormat('1.28.0') [#1408](https://github.com/ie3-institute/PowerSystemDataModel/issues/1408)
1518

1619
## [8.1.0] - 2025-07-25

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'signing'
66
id 'pmd' // code check, working on source code
77
id 'com.diffplug.spotless' version '7.2.1' //code format
8-
id 'com.github.spotbugs' version '6.2.2' // code check, working on byte code
8+
id 'com.github.spotbugs' version '6.2.3' // 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
@@ -104,7 +104,7 @@ dependencies {
104104

105105
implementation 'commons-io:commons-io:2.20.0' // I/O functionalities
106106
implementation 'commons-codec:commons-codec:1.19.0' // needed by commons-compress
107-
implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities
107+
implementation 'org.apache.commons:commons-compress:1.28.0' // I/O functionalities
108108
}
109109

110110
tasks.withType(JavaCompile) {
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# WeatherSource
2+
3+
The **`WeatherSource`** is an abstract class that provides a standardized interface for accessing time-series weather data. It serves as a foundation for concrete implementations that fetch data from various providers (e.g., CSV files or SQL databases).
4+
5+
A `WeatherSource` relies on two key components:
6+
* **[`IdCoordinateSource`](idcoordinatesource.md)**: Used to resolve a numeric **coordinate ID** from the source data into a geographic `Point` object.
7+
* **`TimeBasedWeatherValueFactory`**: Used to construct `WeatherValue` objects from the raw data fields.
8+
9+
***
10+
11+
## Information
12+
13+
The source data for any `WeatherSource` implementation is expected to contain the following information.
14+
15+
```{list-table}
16+
:widths: auto
17+
:class: wrapping
18+
:header-rows: 1
19+
20+
* - Attribute
21+
- Remarks
22+
23+
* - **`coordinateid`**
24+
- An **integer ID** for a specific geographic coordinate. This ID is used to look up the actual `Point` via the `IdCoordinateSource`.
25+
26+
* - **Time**
27+
- The specific timestamp of the weather data, typically as a `ZonedDateTime`.
28+
29+
* - **Weather Data**
30+
- The meteorological values, such as solar irradiance (`direct` and `diffuse`), temperature, and wind data (`speed` and `direction`).
31+
```
32+
33+
## WeatherData
34+
35+
Weather data is comprised of five key components:
36+
37+
```{list-table}
38+
:widths: auto
39+
:class: wrapping
40+
:header-rows: 1
41+
42+
* - Component
43+
- Description
44+
- Unit
45+
46+
* - **`directIrradiance`**
47+
- Solar radiation that reaches the surface directly from the sun.
48+
- W/m²
49+
50+
* - **`diffuseIrradiance`**
51+
- Solar radiation scattered by the atmosphere before reaching the surface.
52+
- W/m²
53+
54+
* - **`temperature`**
55+
- Ambient air temperature.
56+
- K (Kelvin)
57+
58+
* - **`windVelocity`**
59+
- Wind speed.
60+
- m/s (meters per second)
61+
62+
* - **`windDirection`**
63+
- Wind direction, where 0° is North, 90° is East, etc.
64+
- ° (degrees)
65+
```
66+
Weather data in COSMO and ICON formats is supported. Additional optional weather data can also be provided.

docs/readthedocs/models/models.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ maxdepth: 1
168168
---
169169
input/additionaldata/timeseries
170170
input/additionaldata/idcoordinatesource
171+
input/additionaldata/weathersource
171172
```
172173

173174
## Result

src/test/groovy/edu/ie3/datamodel/io/factory/FactoryTest.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package edu.ie3.datamodel.io.factory
77

88
import edu.ie3.datamodel.exceptions.FactoryException
9-
import edu.ie3.datamodel.models.input.EmInput
109
import edu.ie3.datamodel.utils.Try
1110
import spock.lang.Shared
1211
import spock.lang.Specification

src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSourceIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class SqlTimeSeriesSourceIT extends Specification implements TestContainerHelper
126126
value.get() == P_VALUE_00MIN
127127
}
128128

129-
def "The cSqlTimeSeriesSource returns the last value, if there is no current value"() {
129+
def "The SqlTimeSeriesSource returns the last value, if there is no current value"() {
130130
given:
131131
def time = TimeUtil.withDefaults.toZonedDateTime("2020-01-01T00:13:00Z")
132132

0 commit comments

Comments
 (0)