Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-26 Thread Karen K
It turned out that this thread was only a step on the way for me. I ended up writing an issue (#939) after all. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-25 Thread bell...@gmail.com
Well I am pretty sure that at some point in time I needed the ‘is_null’ method. I’ve decided to keep my implementation because I can implement a more efficient/specific one. I’ve started to prepend my XType so its implementation is used instead of XTypeTable. (As an aside, it feels like

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-24 Thread Tom Keffer
I think you're right that the function can be simplified. Commit de738ca . On Sat, Feb 24, 2024 at 12:30 PM Karen K wrote: > I guess PR #929 is an entirely different topic. > > It seams to me, that the if

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-24 Thread Karen K
I guess PR #929 is an entirely different topic. It seams to me, that the if condition in weewx.tags.ObservationBinder.has_data is useless, because what happens afterwards is almost the same in both cases. May be, the intension for that function was like that really: @property def

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-24 Thread Tom Keffer
Rich Bell brought this up in PR #929 . Go there for the discussion. Try the "master" branch of the repository and see if it works better for you. On Fri, Feb 23, 2024 at 11:56 PM Karen K wrote: > Ah. > > Tom Keffer schrieb am Samstag, 24. Februar 2024 um

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Karen K
Ah. Tom Keffer schrieb am Samstag, 24. Februar 2024 um 00:00:07 UTC+1: You should not have to implement either. For WeeWX 5.0 people experienced that the "GTS", "yearGDD", and "seasonGDD" observation types (XTypes calculated out of "outTemp") were not graphed any more. After an explicit

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Karen K
Ah. Tom Keffer schrieb am Samstag, 24. Februar 2024 um 00:00:07 UTC+1: You should not have to implement either. For WeeWX 5.0 people experienced that the "GTS", "yearGDD", and "seasonGDD" observation types (XTypes calculated out of "outTemp") were not graphed any more. After an explicit

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Tom Keffer
You should not have to implement either. The implementation of has_data runs a not_null query over the aggregation period. In turn not_null either consults the database or, if it's an xtype, runs get_scalar() over the aggregation period. The first non-null value seen causes it to return True. Of

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread bell...@gmail.com
I found that you only have to implement ‘not_null’. I believe this is because the ‘has_data’ tag (tags.py line 389) enters the xtype system with an aggregate of ‘has_data’. This then looks for the aggregate of ‘not_null’ (xtypes.py line 156). Looking forward to hearing if my conclusion was

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Karen K
Do I have to implement both the not_null and has_data aggregation in an XType extension? Tom Keffer schrieb am Freitag, 23. Februar 2024 um 14:01:45 UTC+1: The aggregation not_null does not check first to see if the type exists. If you know the type exists, it's slightly faster. In

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Karen K
Thank you. Tom Keffer schrieb am Freitag, 23. Februar 2024 um 14:01:45 UTC+1: > The aggregation not_null does not check first to see if the type exists. > If you know the type exists, it's slightly faster. > > In practice, I don't think it's very useful. I may remove it from the >

Re: [weewx-user] Difference between aggregation types has_data and not_null

2024-02-23 Thread Tom Keffer
The aggregation not_null does not check first to see if the type exists. If you know the type exists, it's slightly faster. In practice, I don't think it's very useful. I may remove it from the documentation. On Fri, Feb 23, 2024 at 3:48 AM Karen K wrote: > What is the difference between the