PowerSystemDataModel
PowerSystemDataModel copied to clipboard
Refactoring `CsvFileConnector` and `CsvDataSource`
What I think this should look like is *Connector
s taking care of operations close to the file system, and *DataSource
handling higher-level decisions, i.e. where data is stored (paths/databases/etc.). With SqlConnector
and SqlDataSource
, this division is already in place.
Illustrating the desired change with examples in two areas:
- Different exception handling
CsvConnector
should then throw (or return withinTry
s)ConnectorException
s, andCsvDataSource
should throw (or return withinTry
s)SourceException
s. - Separate
FileNamingStrategy
fromCsvFileConnector
Currently,CsvFileConnector
uses theFileNamingStrategy
to determine paths of some entities. This is happening less with #999, and should arguably move toCsvDataSource
anyways.CsvFileConnector
should not care where a path comes from, it should just deal with it.