EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2
Allow for passing tabular data as CSV file or with key/value pairs in TOML file
- Dominant language
- Rust
- Stars
- 8
- Forks
- 5
- Avg merge
- 1d 2m
- Merged PRs (30d)
- 37
Description
@ahawkes I think it could. @dalonsoa made the good point that now we only have two dimensions for timeslices it's effectively tabular data and tabular data is more easily represented with CSV files than TOML.
If there was only one timeslice per year, then your CSV file would then only have one row/column (depending on which way round we do it).
For the zero timeslices condition, you could either omit the timeslices CSV file altogether (along with the corresponding property in the TOML file) or provide a placeholder CSV file with only a header row. I personally think the former option is the cleaner of the two.
As I mentioned before, we do have the option of letting the user provide *either* an array *or* a path to a CSV file for this property in the TOML file. From the coding side, implementing this functionality in a generic way should be relatively easy (i.e. so that tabular data can be provided either as a list of key/value pairs or a path to a CSV file), but we might be better just choosing a single way to do it, because every time you give users a choice you risk confusing them (at the risk of sounding condescending!). I'm in two minds about whether we should do this. Do you have an intuition @ahawkes?
_Originally posted by @alexdewar in https://github.com/EnergySystemsModellingLab/MUSE_2.0/pull/52#discussion_r1633502862_
Contributor guide
Assessment
This issue has not been assessed yet.