orcestra-campaign / weather

Weather briefings for the ORCESTRA field campaign.
5 stars 1 forks source link

Setup a faster testing environment #144

Closed HF7weatherman closed 3 days ago

HF7weatherman commented 2 weeks ago

Generating the briefing using the wbcli.sh script does usually take about 15-30 minutes. This is clearly too long for fast testing of new features. Thus, the idea is to have a faster testing version. Some ideas of where we could save some time are:

  1. Creating plots only for two instead of five lead times. The two lead times I have in mind are +12h, since this plots the Meteor's position, and some other, potentially just +36h for convenience.
  2. Exclude the goes2go plots, the download of which takes most of the time actually. All features we test on satellite images will sufficiently be tested in the IR image.

Both of these changes would preserve all key capabilities of the briefing, so this would still allow for solid testing.

My current idea would be to implement some switch between a testing and an operational environment, whose default is always the operational environment.

HF7weatherman commented 2 weeks ago

@sortega87 What's your opinion on this?

sortega87 commented 2 weeks ago

Hi Henning,

I think that for the use cases you have in mind it might be more clear to have a specific flag in wbcli figures that would allow us to render just one figure. I am thinking of a change that would allow us to run something like:

./wbcli.sh figures [BRIEFING_DATE] --only [FIGURE_CODE]

and perhaps also

./wbcli.sh figures [BRIEFING_DATE] --only [FIGURE_CODE] --lead_steps [LEAD_STEPS]

We should also be able to test plotting functions in isolation from wbcli. If this is not possible in the moment I would focus fist in making this is possible. Yet, I'm not sure if this is the case. What do you think?

HF7weatherman commented 2 weeks ago

Hi Sebastian,

I really like your idea of running something like ./wbcli.sh figures [BRIEFING_DATE] --only [FIGURE_CODE] --lead_steps [LEAD_STEPS], this would be perfect. With respect to testing the plotting functions without wbcli: I think most of the plotting scripts include the if __name__ == '__main__': statement which allows for testing without wbcli. Nevertheless, with this method you cannot test all the infrastructure around the plotting scripts, which is used when running wbcli. So having a testing environment that uses wbcli is nice to be sure that all changes also work in the operational setup. However, we also realized that the weather briefing is pretty consolidated now, so we don't plan on implementing much new stuff in the future anyway. Thus, implementing the changes for a testing wbcli setup may not been worth the effort.