Decouple and unify PEP header processing for rendering, PEP 0, JSON, RSS and linting
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- documentation, tooling
Hướng nghiên cứu
Trước tiên, hãy xem xét #2584, #2585 và #2579, vì công việc này phụ thuộc vào chúng. Sau đó, hãy so sánh pep_zero_generator.parser, pep_processor.transforms.header_transform và các hook pygrep trong .pre-commit-config.yaml; công việc được hoàn tất khi một định dạng header có cấu trúc duy nhất được sử dụng nhất quán cho việc render PEP, PEP 0, JSON, RSS và linting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- reStructuredText
- Star
- 5k
- Fork
- 1.8k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python/peps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
New PEP Editors? Đang mởmeta
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
infra
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Docs are out of date: README structure tree, "Make It Yours" pointer, CONTRIBUTING test notes Đang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Kong/developer.konghq.com#7316 ·