Decouple and unify PEP header processing for rendering, PEP 0, JSON, RSS and linting
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- documentation, tooling
Rechercherichtung
Überprüfe zuerst #2584, #2585 und #2579, da diese Arbeit von ihnen abhängt. Vergleiche anschließend pep_zero_generator.parser, pep_processor.transforms.header_transform und die pygrep-Hooks in .pre-commit-config.yaml; abgeschlossen ist die Arbeit, wenn ein strukturiertes Header-Format konsistent für PEP-Rendering, PEP 0, JSON, RSS und Linting verwendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
As a followup to #2584 and #2585 and as I've already been thinking about lately and discussed with @JelleZijlstra and @warsaw at PyCon, right now we parse the headers three different places with three different sets of logic:
pep_zero_generator.parserfor PEP 0, the JSON and the RSS with some additional sub-parsing in those callerspep_processor.transforms.header_transformfor the PEP renderingThe .pre-commit-config.yamlpygrep hooks for linting),
Instead, we should just use the structured format I suggest in #2584 (with the parsing presumably in the PEP class) for all of them (starting with PEP rendering initially), for several reasons:
- Simpler, more DRY, reliable and maintainable in the long run
- Easier to add new headers in one central place, as in #2572
- Enables simplifying/loosening the allowed input syntax for authors without fear of breaking anything
- Simplifies adding requested features in the various outputs (e.g.
:abbr:from #2514 ) - Decouples the header format from reST/Sphinx and ensures the format-independence @AA-Turner originally wanted in #2358
- Avoids cryptic regexes for linting (as @hugovk requested on #2484)
Of course, we should decide on and implement the structured format proposed in #2584 first, as it is a perquisite for this (alongside the changes in #2585 and #2579 needing to be merged before work on this begins), but I've opened this to keep track of it.
- Vorherrschende Sprache
- reStructuredText
- Sterne
- 5k
- Forks
- 1.8k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 25
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python/peps
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
New PEP Editors? Offenmeta
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
infra
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 48/100
Ähnliche Issues
-
sync-en
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
agilepathway/label-checker#640 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
BasedHardware/omi#15662 · 1 Kommentar ·
-
documentation help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100