EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
`overwrite` parameter doesn't behave as expected
- Dominant language
- Python
- Stars
- 29
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
This parameter is used on a per-output basis to control whether the program will overwrite existing files. See [here](https://muse-os.readthedocs.io/en/latest/inputs/toml.html)
If you set this as false then the program will refuse to overwrite existing files and will abort, as expected. However, if this parameter is not specified, then it appears to default to true (i.e. overwriting existing files), despite what the documentation says. Not sure what's going on though, because this line looks like it's taking False as the default:
https://github.com/EnergySystemsModellingLab/MUSE_OS/blob/48095f6136ee634259d5a37a507ef377907b18f0/src/muse/outputs/sinks.py#L120
So clearly something is broken somewhere.
In any case, it seems strange to have this setting on a per-output basis. I think it would make much more sense as a global setting (i.e. if false, no files will be overwritten)
Update: Actually, the documentation does say that the overwrite parameter only applies to the "csv" sink (not the "aggregate" sink), which I missed before. Still, I'm leaving this issue up as I still think things could be improved here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.