Closed elehmer closed 4 months ago
This looks good to me, can you add some code comments in though to explain why the change was made? Maybe just a line or two from your description in the PR? The method is somewhat unintuitive I think (but makes sense with your description).
Any better?
Looks good to me! Thanks for implementing the changes @elehmer !
Description of PR
This PR updates the
_update_scenario
param trigger to properly set the historical scenarios after changing the affected widgets.Summary of changes and related issue
previously we tested if one list was in another (currently hist. scen. options vs. possible new options) using
in
. This apparently does not work as it was returning false when it was true. I therefore wrote a function that converts the lists into numpy arrays and compares them.Relevant motivation and context
selections are being changed after parameters are being set and bring back incorrect data. Most obviously a problem when not using the GUI as you can't see that historical selections have changed.
Dependencies required for this change?
Fixes # (issue), delete if not necessary
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
ck.Select
Checklist: