shcaba / SS-DL-tool

Stock Synthesis Data-limited tool
33 stars 15 forks source link

Feature Request:State Restoration #54

Closed pjumppanen closed 1 year ago

pjumppanen commented 1 year ago

The biggest limitation I find with SS-DL is when using "Using existing model files" options you don't get back your original settings in the left hand control inputs in your shiny browser. I can understand that doing so in a general sense is problematic because it requires parsing the stock synthesis control files but a simple way to implement this functionality for models created by SS-DL is to have all the possible control options within the shiny gui encoded into a settings file in whatever format is convenient and easy to parse and maintain and write it to the scenario folder. Then if you start a new shiny session, select "Using existng model files" option and specify the scenario folder then it can read in that file and initialise all your model settings in the gui. If no such settings file is present (implying hand prepared model files) it can fall back to the existing behaviour. This would increase usability considerably by allowing users to resume a session with the same gui settings as previously but across discrete shiny sessions.

shcaba commented 1 year ago

Terrific suggestion-- I will get to work on it.

shcaba commented 1 year ago

I have now added a state saving option. If you choose this before running a model, it should give you a link that will recover your model set-up whenever you want to retrieve it. I suggest keeping this link as a text file in your model folder or somewhere you can find it if you ever need it.