Skip to content

Allow interaction with locally-cached scenario data files via locally-cached ScenarioList #228

@danielolsen

Description

@danielolsen

Purpose

It would be convenient to be able to analyze Scenarios with downloaded data even when we cannot access the server.

Design idea

I think we can follow the existing design pattern, where we look for data either in ~/ScenarioData or on the server, except in this case we prioritize the server first instead of the local folder (since the ScenarioList file changes, while PF/PG/profiles are mostly constant once they're created).

  • Every time we successfully instantiate a Scenario, we cache a copy of ScenarioList.csv in ~/ScenarioData.
  • Every time we attempt to load an existing Scenario (e.g. anything but Scenario('')), we add a try/except block around the getting of the ScenarioList from the server. If we cannot read from the server, either:
    • we explicitly ask the user via an input() call whether they want to continue in a read-only fashion using the cached data in ~/ScenarioData, or
    • we have an optional parameter to the Scenario init (default False) which will use a locally cached ScenarioList if one is available.

Metadata

Metadata

Labels

feature requestRequest for a new feature. (Only lives in Backlog)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions