Avoid the need to update all URLs and the YAML front matter in the narrative to the date of the latest builds. We could define our own simple narrative template or use a standard template language like Jinja2. We could generate the stubbed narrative as part of the build and deploy process above, such that the date of the builds is available to plug into the template, and deploy the dated draft of the narrative along with the builds.
Parts of the current report that need to be templated include:
title in the Markdown frontmatter (Nextstrain seasonal influenza report for April 2024 -> Nextstrain seasonal influenza report for {long month} {year})
date for the report (same as date of the build, April 15, 2024 -> {long month} {day}, {year}) in the frontmatter
dataset URLs with date in the dataset and month/year filter in the URL params (https://nextstrain.org/groups/nextflu-private/flu/seasonal/2024-04-11/h1n1pdm/2y/ha?c=gt-HA1_120,216&d=tree,map,frequencies&f_year_month=2023-10,2023-11,2023-12,2024-01,2024-02,2024-03,2024-04&gmax=1052&gmin=72&label=clade:5a.2a&p=grid)
counts of recent submissions per clade (generated in separate Markdown files by the workflow)
tables of derived haplotype frequencies and titer references (generated in separate Markdown files by the workflow)
Avoid the need to update all URLs and the YAML front matter in the narrative to the date of the latest builds. We could define our own simple narrative template or use a standard template language like Jinja2. We could generate the stubbed narrative as part of the build and deploy process above, such that the date of the builds is available to plug into the template, and deploy the dated draft of the narrative along with the builds.
Parts of the current report that need to be templated include:
Nextstrain seasonal influenza report for April 2024
->Nextstrain seasonal influenza report for {long month} {year}
)April 15, 2024
->{long month} {day}, {year}
) in the frontmatterhttps://nextstrain.org/groups/nextflu-private/flu/seasonal/2024-04-11/h1n1pdm/2y/ha?c=gt-HA1_120,216&d=tree,map,frequencies&f_year_month=2023-10,2023-11,2023-12,2024-01,2024-02,2024-03,2024-04&gmax=1052&gmin=72&label=clade:5a.2a&p=grid
)