Indeed, and a Track
header would reflect that, and allow making that more clear in PEP 1. Of course, this does mean we would want SC assent to the overall idea, beyond just being a display/backend change.
We could explicitly link that in PEP 1, since I don’t imagine it is expected to change too often.
UI/UX wise, that would be a lot cleaner and less disruptive solution than trying to add a bunch more headings on the PEP 0 page, and not require bikeshedding over any necessary frontend decisions, since it could just use the format of the existing PEP 0 (and not need to modify the same, aside from adding links to the track subpages).
From a technical perspective, it would only require a relatively low number and complexity of changes to the existing generation code [1] and would fit well with the existing architecture without being hacky or disruptive. All told, it would be a few dozen lines of code/text and, combined with the tweaks to add, parse and validate the track header, is something I could probably knock out in a few hours once consensus was reached.
It also shouldn’t have any meaningful performance impact, since the PEPs would only be read and parsed once (by far the most intensive part of the process), and only the actual writing out of the indices would be needed.
In fact, it should scale seamlessly to multiple tracks, as adding a new track name would be a only require changing a couple lines in the code (adding the name to a list of valid tracks in constants.py
and the pre-commit config, and optionally a custom intro paragraph if it was desired to describe the particulars of the track more specifically), while not affecting existing pages.
add the header to those parsed in
parser.PEP.__init__
; filter the PEPs by track and feed them to the PEP generation and writing code in a loop inpep_index_generator.create_pep_zero
, plus modifying the filepath generation logic accordingly; and tweakingwriter.PEPZeroWriter.write_pep0
to accept atrack
arg that controls using an appropriately modified intro paragraph ↩︎