Move the Alert Digest into a shared partial template, and add it to the today, tomorrow, and daily reports
This commit is contained in:
@@ -76,9 +76,10 @@ fail rendering instead of producing incomplete Markdown.
|
||||
|
||||
Daily and Tomorrow call the shared `daypart_forecast` partial. Today calls
|
||||
`today_daypart_forecast` so it can omit elapsed or missing dayparts. Daily,
|
||||
Today, Tomorrow, and Hourly call the shared `precipitation_timing` partial.
|
||||
Partial files are parsed with each top-level template at render time and
|
||||
receive the same typed render context as the caller.
|
||||
Today, Tomorrow, and Hourly call the shared `alert_digest` and
|
||||
`precipitation_timing` partials. Partial files are parsed with each top-level
|
||||
template at render time and receive the same typed render context as the
|
||||
caller.
|
||||
|
||||
## Schema Contract
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ are:
|
||||
|
||||
Shared named partials live under `internal/reporttemplate/templates/partials/`:
|
||||
|
||||
- `alert_digest.md.tmpl`, used by Daily, Today, Tomorrow, and Hourly
|
||||
- `daypart_forecast.md.tmpl`, used by Daily and Tomorrow
|
||||
- `today_daypart_forecast.md.tmpl`, used by Today
|
||||
- `precipitation_timing.md.tmpl`, used by Daily, Today, Tomorrow, and Hourly
|
||||
@@ -113,8 +114,8 @@ Tomorrow generated text uses the same `.GeneratedText.Summary`,
|
||||
Hourly. `.GeneratedText.ForecastDiscussion` is a slice of paragraphs and should
|
||||
be rendered with `range`.
|
||||
|
||||
Tomorrow uses the shared `daypart_forecast` and `precipitation_timing`
|
||||
partials.
|
||||
Tomorrow uses the shared `alert_digest`, `daypart_forecast`, and
|
||||
`precipitation_timing` partials.
|
||||
|
||||
Tomorrow modules include the Hourly module fields plus:
|
||||
|
||||
@@ -144,7 +145,8 @@ Daily generated text uses `.GeneratedText.Summary`,
|
||||
`.GeneratedText.Confidence`. Forecast discussion is a slice of paragraphs and
|
||||
should be rendered with `range`.
|
||||
|
||||
Daily uses the shared `daypart_forecast` and `precipitation_timing` partials.
|
||||
Daily uses the shared `alert_digest`, `daypart_forecast`, and
|
||||
`precipitation_timing` partials.
|
||||
|
||||
Daily uses template ID `daily`, generated-text schema ID `daily`, and prompt
|
||||
source `internal/reporttemplate/prompts/daily.generated_text.md`.
|
||||
@@ -179,7 +181,7 @@ should be rendered with `range`.
|
||||
|
||||
Today uses the `today_daypart_forecast` partial so elapsed or missing dayparts
|
||||
can be omitted while Daily and Tomorrow keep their fallback row. It also uses
|
||||
the shared `precipitation_timing` partial.
|
||||
the shared `alert_digest` and `precipitation_timing` partials.
|
||||
|
||||
Today uses template ID `today`, generated-text schema ID `today`, and prompt
|
||||
source `internal/reporttemplate/prompts/today.generated_text.md`.
|
||||
|
||||
Reference in New Issue
Block a user