Conversation
|
Looks good. I guess if in a first step we want to allow the user to choose between MVS and EZP, it would make to write a results parser that is analogous to the mvs results. Line 134 in 2222a53 However, I guess that at the point where we start constructing the graphs from eesyplan instead, it might no longer make sense to handle them the same way? If we end up restructuring the way that graphs and results are displayed to come from eesyplan instead, we need to make sure we also keep backwards compatibitility with the projects having only the original Results database objects.
|
6406406 to
145cebd
Compare
145cebd to
17412de
Compare
| MVS_SA_GET_URL = f"{MVS_API_HOST}/check-sensitivity-analysis/" | ||
|
|
||
| EZP_API_HOST = env("EZP_API_HOST", default="") | ||
| EZP_POST_URL = f"{EZP_API_HOST}/sendjson/" |
There was a problem hiding this comment.
In case we might also want to switch between prod and dev queues in staging/production in the future, I think it makes sense to add an environment variable for it to the EZP_POST_URL string (similar to how it is now for MVS_POST_URL)
| json_dp = json.loads(export_dp_to_json(scenario_folder)) | ||
| # TODO Save json_dp into a new field Simulation object ? |
There was a problem hiding this comment.
Yes, this looks like what I was thinking also. I think it is a good idea to save the datapackage into a new field of the Simulation object, maybe we could extend scenario.to_datapackage to take strip_timeseries=True/False or similar (which then replaces the timeseries with foreignkeys), then save json_dp.
There was a problem hiding this comment.
@paulapreuss - I think setting n_timestamps to 0 is equivalent (I notice I wrote number instead. My bad)
Sends a request to the simulation server