irena-flextool / flextool

IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems.
https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool
Other
23 stars 5 forks source link

Results.sqlite after update needs manual linking #74

Closed nelliputkonen closed 1 year ago

nelliputkonen commented 1 year ago

When updating FlexTool I had to manually link to the results database as there is no item Results.sqlite in the repository (only Results_template.sqlite). This is inconvinient for the user.

This bug appeared for me already some time ago, so memory is a bit vague, but since it came up in discussions with one of the partners, I thought to report it. Please mark as solved if this has already been addressed.

jkiviluo commented 1 year ago

I think we could do this in update_flextool.py. If results.sqlite does not exist, then results_template.sqlite would be copied into results.sqlite. Same with input_data.sqlite (we should remove also that from the repo).

Then, in the installation instructions we should say that after installing, run update_flextool.py to get these files and to practice its use, since it should then be used to get future updates. Another option would be to have a separate script. We could possibly also make a tool for 'update_flextool.py' in the workflow (but not connected to the main workflow).

What do you think @ArttuTupala and @nelliputkonen?

ArttuTupala commented 1 year ago

Adding result and input_data database creation to the update script would be quite easy. However, making a tool that would update flextool would be the most user friendly approach, but then it should also update the toolbox. Although, I'm not sure if the toolbox likes these pulls to itself or the project while it is on.

jkiviluo commented 1 year ago

Updating Toolbox while it's running is not feasible. update flextool tool could pop a window that suggests to update of Toolbox and instructs how to do it. Furthermore, if the update tool would know that there is an incompatibility, it would not update FlexTool before Toolbox has high enough version. Most of the time FlexTool should run with older Toolboxes, so FlexTool could be updated.