Docs in python functions #84
Replies: 6 comments
-
|
They should be generated from the |
Beta Was this translation helpful? Give feedback.
-
I couldnt see any in the functions, this create_user is faily obvious but other functions perhaps do need a little describing or clarifying |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
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
|
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.

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?
Beta Was this translation helpful? Give feedback.
All reactions