You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's take an indicator that accepts None for a field:
degree_days_exceedance_date = Temp(
...
description="Day of year when the integral of degree days (mean temperature {op} {thresh}) exceeds {sum_thresh}, "
"with the cumulative sum starting from {after_date}.",
...
)
The description field will return:
"Day of year when the integral of degree days (mean temperature > 4 degc) exceeds 200 k days, with the cumulative sum starting from none."
Potential Solution
I haven't delved into the Indicator class code, but if we had access to the call signature keyword arguments, we could perform a string formatting on the fields containing {...} patterns.
This would allow us to provide conditional statements within the metadata fields.
Additional context
No response
Contribution
I would be willing/able to open a Pull Request to contribute this feature.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
and lines above to see how mba is filled. But this solution is clunky and we almost never use it. And it is not feasible for the translations, while the jinja method could be!
Addressing a Problem?
Let's take an indicator that accepts
None
for a field:The
description
field will return:Potential Solution
I haven't delved into the Indicator class code, but if we had access to the call signature keyword arguments, we could perform a string formatting on the fields containing
{...}
patterns.This would allow us to provide conditional statements within the metadata fields.
Additional context
No response
Contribution
Code of Conduct
The text was updated successfully, but these errors were encountered: