Re: [weewx-development] Repeated calls to extension.

2020-09-08 Thread Tom Keffer
1. If you need the data that you set up in the initializer, just assign it to 'self'. Class 'Station', in cheetahgenerator.py, is an example. In this case, the calculation is not expensive, but it's static. So, there's no reason not to bind the information early. 2. Not that I can think of. If

Re: [weewx-development] Repeated calls to extension.

2020-09-08 Thread Chris Davies-Barnard
Hi Tom, Hope you are well. Regardless of whether my question was clear (apologies) your answer is and even better its the answer I needed! Thanks. Follow up questions: 1) So we can assume that any data set in the initializer is available through out the reporting process? 2) This is

Re: [weewx-development] Repeated calls to extension.

2020-09-08 Thread Tom Keffer
I'm not exactly sure what you're asking, but that won't stop me from answering! :-) The member function get_extension_list() will be called for each template. So, if you have 10 templates, it will get called 10 times. If there is an expensive calculation that does not depend on the timespan that