-
Notifications
You must be signed in to change notification settings - Fork 7
Generalize CSV->File #1450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PhilippSchmelter
wants to merge
16
commits into
dev
Choose a base branch
from
ps/#1445-CsvToFile
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Generalize CSV->File #1450
+482
−322
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
staudtMarius
requested changes
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have just two small remarks.
src/test/groovy/edu/ie3/datamodel/io/source/csv/FileTimeSeriesMetaInformationSourceIT.groovy
Show resolved
Hide resolved
I'll also have a second look at this as soon as I can. |
sebastian-peter
requested changes
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional comments from my side
src/main/java/edu/ie3/datamodel/io/connectors/FileConnector.java
Outdated
Show resolved
Hide resolved
src/test/groovy/edu/ie3/datamodel/io/connectors/CsvFileConnectorTest.groovy
Show resolved
Hide resolved
src/test/groovy/edu/ie3/datamodel/io/source/csv/FileTimeSeriesMetaInformationSourceIT.groovy
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the CSV data handling infrastructure to introduce a shared, extensible file-based connector layer. It generalizes the file connector logic, introduces new metadata classes to support multiple file types, and removes legacy CSV-specific meta information classes. These changes improve code modularity and future extensibility for additional file formats.
File connector infrastructure refactoring:
FileConnector
to encapsulate common file-based source/sink logic, including input stream handling and file path resolution. (src/main/java/edu/ie3/datamodel/io/connectors/FileConnector.java
)CsvFileConnector
to extendFileConnector
, removing redundant code and centralizing file handling logic. (src/main/java/edu/ie3/datamodel/io/connectors/CsvFileConnector.java
) [1] [2] [3] [4]File type and metadata generalization:
FileType
enum to represent supported file types (currently only CSV), with utility methods for file type detection. (src/main/java/edu/ie3/datamodel/io/file/FileType.java
)FileIndividualTimeSeriesMetaInformation
andFileLoadProfileMetaInformation
to replace CSV-specific meta information classes and support file type extensibility. (src/main/java/edu/ie3/datamodel/io/naming/timeseries/FileIndividualTimeSeriesMetaInformation.java
,src/main/java/edu/ie3/datamodel/io/naming/timeseries/FileLoadProfileMetaInformation.java
) [1] [2]Cleanup and migration to new metadata:
CsvIndividualTimeSeriesMetaInformation
andCsvLoadProfileMetaInformation
classes, updating usages throughout the codebase to use the new file-based metadata classes. (src/main/java/edu/ie3/datamodel/io/csv/CsvIndividualTimeSeriesMetaInformation.java
,src/main/java/edu/ie3/datamodel/io/csv/CsvLoadProfileMetaInformation.java
, other affected files) [1] [2] [3] [4]Documentation and changelog:
CHANGELOG.md
to document the refactoring of CSV handling into a shared file-based infrastructure. (CHANGELOG.md
)Package and import adjustments:
TimeSeriesMetaInformation
and related classes to theio.naming.timeseries
package, updating imports across affected files. (src/main/java/edu/ie3/datamodel/io/naming/TimeSeriesMetaInformation.java
→src/main/java/edu/ie3/datamodel/io/naming/timeseries/TimeSeriesMetaInformation.java
) [1] [2] [3] [4] [5]These changes lay the groundwork for supporting additional file formats beyond CSV, improving maintainability and extensibility.
Closes #1445