PowerSystemDataModel
PowerSystemDataModel copied to clipboard
Refactoring `CsvFileConnector` and `CsvDataSource`
What I think this should look like is *Connectors 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
CsvConnectorshould then throw (or return withinTrys)ConnectorExceptions, andCsvDataSourceshould throw (or return withinTrys)SourceExceptions. - Separate
FileNamingStrategyfromCsvFileConnectorCurrently,CsvFileConnectoruses theFileNamingStrategyto determine paths of some entities. This is happening less with #999, and should arguably move toCsvDataSourceanyways.CsvFileConnectorshould not care where a path comes from, it should just deal with it.