powsybl / powsybl-core

A framework to build power system oriented software
https://www.powsybl.org
Mozilla Public License 2.0
124 stars 40 forks source link

Datasources - Part 1: Rework datasource classes #3101

Closed rolnico closed 2 months ago

rolnico commented 2 months ago

Please check if the PR fulfills these requirements

Does this PR already have an issue describing the problem? No

What kind of change does this PR introduce? Feature

What is the current behavior? All the existing DataSources based on files extend FileDataSources. The difference between datasources considering files in a directory and the datasources considering files in an archive is not clear enough.

What is the new behavior (if this is a feature change)? Two types of DataSources based on files now exists:

Does this PR introduce a breaking change or deprecate an API?

If yes, please check if the following requirements are fulfilled

What changes might users need to make in their application due to this PR? (migration steps) Two types of DataSources based on files now exists:

Therefore, multiple classes have changed, please update your code if you used them directly: Old classes New classes
Bzip2FileDataSource Bzip2DirectoryDataSource
FileDataSource DirectoryDataSource
GzFileDataSource GzDirectoryDataSource
XZFileDataSource XZDirectoryDataSource
ZipFileDataSource ZipArchiveDataSource
ZstdFileDataSource ZstdDirectoryDataSource

Note: Their constructors are not the same so you will have to adapt your code to the new ones, depending on which DataSource you use.

Other information:

rolnico commented 2 months ago

This is the first part of the division of the PR https://github.com/powsybl/powsybl-core/pull/2959

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
97.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud