EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS

`overwrite` parameter doesn't behave as expected

Aperta
#430 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
29
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia da src/muse/outputs/sinks.py alla riga collegata e leggi la documentazione sulla configurazione dell'output per i sink csv e aggregate. Riproduci il comportamento con l'impostazione overwrite omessa e un file di output esistente; il lavoro è concluso quando il comportamento effettivo è coerente con l'ambito documentato e viene chiarito se l'impostazione è globale o per singolo output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.