Combine scenario list from different sources #629
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Fix the issue where a user won't get a scenario list with existing local scenarios if not connected to the server.
What the code is doing
Best effort to download and use any possible copies of scenario or execute list csv. The local copies are updated with the latest version if possible (always for blob storage, and server copy if connected). Then the results are combined, since we might as well handle a case where the local copy hasn't been updated since the last time we add scenarios to blob storage.
Unrelated: noticed that the
.copy()
data access method is only used in one place, so removed it from the interface.Testing
Manual testing: load
Scenario(824)
which is not in blob storage, but is in my local ScenarioList.csv. If not connected to the server, it will load as much as possible but fails since I don't have the grid.mat, as expected.Time estimate
10 min