Docs in python functions #84
Replies: 6 comments
|
They should be generated from the |
|
The observation you made—that the delta_sip calculation is defined as rv.p50_sip - og.value_sip (forecast minus observation)—is correct based on the SQL code you found. Since the Python functions are auto-generated, they often lack detailed internal documentation like docstrings. Adopting a practice of extracting the equivalent Go code definition or key calculation logic (like the forecast - observation structure for deltas) and automatically including it as a docstring in the generated Python functions would be an excellent way to improve clarity and transparency for users seeking to understand how core metrics, such as deltas, are calculated. |
|
Your observation about the delta calculation () aligns with the core logic: represents the difference between the forecasted value (p50_sip) and the observed value (value_sip) (forecast - observation).rv.p50_sip - og.value_sip AS delta_sipdelta_sip
|
|
Correct — delta_sip is calculated as forecast - observation. For the docstrings: Once the comments exist in the proto, the Python generator will produce the correct docstrings automatically and keep them in sync across Go/Python. |

Uh oh!
There was an error while loading. Please reload this page.
This came about when i wanted to know which way the deltas were calculated. I looked in here and found the sql code here and then saw it was
rv.p50_sip - og.value_sip AS delta_sip, which isforecast - observationI know the python functions are auto generated, but perhaps they could have a doc string taken from go code?
All reactions