Skip to content

Commit 6aa7f1b

Browse files
authored
Merge pull request #773 from ie3-institute/jb/#716-refactor-csv-datasources
Refactor and harmonize CSV and SQL data sources
2 parents 5fa3d89 + 3b9c3bb commit 6aa7f1b

File tree

67 files changed

+3441
-3519
lines changed

Some content is hidden

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

67 files changed

+3441
-3519
lines changed

CHANGELOG.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Fixed wrong rated power unit hint [#804](https://github.com/ie3-institute/PowerSystemDataModel/issues/804)
1616
- Fixed wrong hash code generation of ConnectorResult [#817](https://github.com/ie3-institute/PowerSystemDataModel/issues/817)
1717

18-
1918
### Changed
2019
- Removing deprecated classes and methods [#540](https://github.com/ie3-institute/PowerSystemDataModel/issues/540)
20+
- Refactor CSV data sources [#716](https://github.com/ie3-institute/PowerSystemDataModel/issues/716)
2121

2222

2323
## [3.0.0] - 2023-02-16
@@ -39,26 +39,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3939

4040
### Fixed
4141
- Reduced code smells [#492](https://github.com/ie3-institute/PowerSystemDataModel/issues/492)
42-
- Protected constructors for abstract classes
43-
- Use pattern matching
44-
- Remove unused imports
45-
- Use enhanced switch statements
46-
- Replace lambdas with method references
47-
- Use `Stream#toList`
48-
- Adapt visibility for JUnit 5
42+
- Protected constructors for abstract classes
43+
- Use pattern matching
44+
- Remove unused imports
45+
- Use enhanced switch statements
46+
- Replace lambdas with method references
47+
- Use `Stream#toList`
48+
- Adapt visibility for JUnit 5
4949
- More code smell fixing [#633](https://github.com/ie3-institute/PowerSystemDataModel/issues/633)
50-
- Use `List#of`
51-
- Use direct assignment with switch/case structures
52-
- Turn some classes into records
53-
- Making abstract classes' constructor protected
54-
- Improving some RegExs
55-
- Replacing `filter(Optional::isPresent).map(Optional::get)` on streams with `flatMap(Optional::stream)`
56-
- instanceof variable declarations
57-
- Removing unnecessary parentheses
58-
- Miscellaneous code smells
50+
- Use `List#of`
51+
- Use direct assignment with switch/case structures
52+
- Turn some classes into records
53+
- Making abstract classes' constructor protected
54+
- Improving some RegExs
55+
- Replacing `filter(Optional::isPresent).map(Optional::get)` on streams with `flatMap(Optional::stream)`
56+
- instanceof variable declarations
57+
- Removing unnecessary parentheses
58+
- Miscellaneous code smells
5959
- Fix JavaDoc creation
60-
- Create JavaDoc with java 17 instead of java 8
61-
- 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))
60+
- Create JavaDoc with java 17 instead of java 8
61+
- 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))
6262
- `BufferedCsvWriter` writes columns in the order, that the headline elements are defined [#434](https://github.com/ie3-institute/PowerSystemDataModel/issues/393)
6363
- Cleaned up `IndividualTimeSeriesMetaInformation`-related methods in `CsvFileConnector` [#544](https://github.com/ie3-institute/PowerSystemDataModel/issues/544)
6464
- Fixed spotlessApply handling for `.groovy` files [#637](https://github.com/ie3-institute/PowerSystemDataModel/issues/637)
@@ -79,15 +79,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7979
- `edu.ie3.datamodel.io.connectors.CsvFileConnector.CsvIndividualTimeSeriesMetaInformation`
8080
- and related methods
8181
- BREAKING: Comprehensive harmonization around weather sources [#267](https://github.com/ie3-institute/PowerSystemDataModel/issues/267)
82-
- Adapted the expected column scheme
83-
- General weather model
84-
- `coordinate` to `coordinateid`
85-
- DWD COSMO model
86-
- `diffuseirradiation` to `diffuseirradiance`
87-
- `directirradiation` to `directirradiance`
88-
- ICON model:
89-
- `"datum"` to `"time"`
90-
- Force user to provide time stamp pattern to `CouchbaseWeatherSource` to ensure harmonized querying
82+
- Adapted the expected column scheme
83+
- General weather model
84+
- `coordinate` to `coordinateid`
85+
- DWD COSMO model
86+
- `diffuseirradiation` to `diffuseirradiance`
87+
- `directirradiation` to `directirradiance`
88+
- ICON model:
89+
- `"datum"` to `"time"`
90+
- Force user to provide time stamp pattern to `CouchbaseWeatherSource` to ensure harmonized querying
9191
- BREAKING: Updating PowerSystemUtils dependency to 2.0-SNAPSHOT [#595](https://github.com/ie3-institute/PowerSystemDataModel/issues/595)
9292
- 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)
9393
- Adapted to new double converters in PSU [#705](https://github.com/ie3-institute/PowerSystemDataModel/issues/705)
43.3 KB
Loading
257 KB
Loading
25.9 KB
Loading
128 KB
Loading
106 KB
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# I/O
2+
3+
The PowerSystemDataModel library additionally offers I/O-capabilities.
4+
In the long run, it is our aim to provide many different source and sink technologies.
5+
Therefore, the I/O-package is structured as highly modular.
6+
7+
```{toctree}
8+
---
9+
maxdepth: 2
10+
---
11+
csvfiles
12+
sql
13+
influxdb
14+
ValidationUtils.md
15+
```
16+
17+
## Data sink structure
18+
19+
[![Class diagram of data sink classes](../_static/figures/uml/DataSinkClassDiagram.png)](../_static/figures/uml/DataSinkClassDiagram.png)
20+
21+
## Data source structure
22+
23+
The sources are divided in three blocks:
24+
1. InputEntities and ResultEntities
25+
2. TimeSeries related sources
26+
3. Weather and Coordinate sources
27+
28+
[![Class diagram of entity sources](../_static/figures/uml/EntitySourceClassDiagram.png)](../_static/figures/uml/EntitySourceClassDiagram.png)
29+
30+
[![Class diagram of time series sources](../_static/figures/uml/TimeSeriesSourceClassDiagram.png)](../_static/figures/uml/TimeSeriesSourceClassDiagram.png)
31+
32+
[![Class diagram of weather and coordinate sources](../_static/figures/uml/WeatherCoordinateSourceClassDiagram.png)](../_static/figures/uml/WeatherCoordinateSourceClassDiagram.png)
33+
34+
The function to read the sources are implemented in the DataSource classes.
35+
36+
[![Class diagram of data sources](../_static/figures/uml/FunctionalDataSourceClassDiagram.png)](../_static/figures/uml/FunctionalDataSourceClassDiagram.png)
37+
38+
## Data deployment
39+
40+
[![Diagram of input data deployment](../_static/figures/uml/InputDataDeployment.png)](../_static/figures/uml/InputDataDeployment.png)

docs/readthedocs/io/basiciousage.rst

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/readthedocs/io/csvfiles.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ The class `DefaultInputHierarchy` offers some helpful methods to validate and cr
121121
hierarchy.
122122

123123
## De-serialization (loading models)
124+
124125
Having an instance of [Grid Container](/models/input/grid/gridcontainer) is most of the time the target whenever you load your
125126
grid. It consists of the three main blocks:
126127

@@ -131,9 +132,6 @@ grid. It consists of the three main blocks:
131132
Those blocks are also reflected in the structure of data source interface definitions.
132133
There is one source for each of the containers, respectively.
133134

134-
![Class diagram of data sources](../_static/figures/uml/DataSourceClassDiagram.png)
135-
Class diagram of data sources
136-
137135
As a full data set has references among the models (e.g. a line model points to its' nodes it connects), there is a
138136
hierarchical structure, in which models have to be loaded.
139137
Therefore, the different sources have also references among themselves.

0 commit comments

Comments
 (0)