Commit Graph

114 Commits

Author SHA1 Message Date
Hugo van Kemenade ed92c0697c
Infra: Only emit a category table when it has entries (#2839)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-22 10:44:36 +03:00
Hugo van Kemenade c0b28dab5b
Infra: Add tooltips to type/status in PEP 0 (#2838)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-10-22 10:43:36 +03:00
C.A.M. Gerlach bf3465d3e3
Packaging PEPs: Update headers & link canonical PyPA specs (#2690)
* Update headers/etc. of older packaging PEPs to reflect replacement PEPs

* Infra: Fix lowercase and tweak plural in text for PyPA spec banner

* Add banner to all relevant PEPs pointing to their canonical PyPA specs

Co-authored-by: Brett Cannon <brett@python.org>
2022-10-07 08:29:13 -07:00
Jelle Zijlstra e46b83661d
Add Topic for release schedule PEPs (#2669)
Release PEPs are a pretty unusual kind of PEP and it's useful to me to have
them all listed together. Happy to adjust the name of the topic if desired.

I took the opportunity to adjust the status of a few release PEPs. Now all
releases for EOL versions are Final (3.5 was previously Active), and all
releases for released versions are Active (3.10 was still draft). 3.11 remains
Draft as 3.11 has not yet been released.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-06 18:01:52 -07:00
Jelle Zijlstra 83b976da18
Add Typing Topic (#2670)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-06 17:36:39 -07:00
Jelle Zijlstra 520cc0bbe7
Topic pages: remove authors table (#2823)
This table is not too useful, and for some reason we're not properly
mangling email addresses in the table. For simplicity, just omit the
table.
2022-10-06 17:36:15 -07:00
Hugo van Kemenade 7fa80c34d7
Infra + many PEPs: Add Sphinx Lint and fix errors (#2816)
* PEP 555, 653: Fix inline literal missing (escaped) space after literal

* Add newline at end of file

* PEP 692: Add newline at end of file

* PEP 633: Fix missing space before role

* Run sphinx-lint in pre-commit

* PEP 639: Remove rogue backticks

* PEP 372: Remove rogue backticks

* PEP 462: Add missing underscore after closing backtick in hyperlink

* PEP 481: Add missing underscore after closing backtick in hyperlinks

* PEP 507: Add missing underscore after closing backtick in hyperlinks

* PEP 453: Add missing underscore after closing backtick in hyperlinks, and convert to links

* PEP 534: Fix inline literal missing (escaped) space after literal

* PEP 372, 453, 462: Redirect BPO to GH
2022-10-06 12:14:32 -07:00
Adam Turner 80c69055a5
Remove ``include_patterns`` monkeypatching (#2810)
This is included in Sphinx core from version 5.1
2022-10-05 18:03:04 +01:00
C.A.M. Gerlach 326e5623a5
Style: Fix zebra stripes and improve table & code presentation (#2805)
* Style: Further lighten table zebra stripes
* Style: Ensure consistent contrast for code blocks in zebra tables
* Style: Add padding around inline code literal BG to not be so tight
* Style: Add horizontal rules and header color to tables
* Style: Remove zebra striping from tables	
* Style: Use more sensible color name for admonition + header color
2022-10-01 19:36:50 -05:00
Hugo van Kemenade 97e3dbde98
Infra: Mute table zebra stripes to de-emphasise different rows (#2740)
* Infra: Mute table zebra stripes to de-emphasise different rows

* Infra: change #eee to #ddd
2022-08-28 22:55:26 +03:00
CAM Gerlach f87de8284c
Infra: Add new directives to point to PEP's canonical content (#2702)
As originally discussed in #2692 , this adds a three new custom directives intended to be used at the top of PEPs:

* `pep-banner`, a generic admonition banner that can be subclassed with an arbitrary message,
* `canonical-docs`, which renders a banner linking to a `Final` PEP's canonical documentation/specification.
* `canonical-pypa-spec`, a banner for packaging interoperability PEPs linking to the canonical PyPA specs.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-08-02 22:48:56 -05:00
CAM Gerlach 0b788056de
Infra: Fix canonical link tag to point to correct PEP URL (#2687)
* Fix canonical link tag to point to correct PEP URL
* Use shorter, standard HTML5 syntax for self-closing tags
* Avoid depr clip prop & use better supported transform prop in CSS
* Use strict mode in the color scheme JS
2022-07-10 15:40:09 -05:00
CAM Gerlach 5d2f8d10ea
Style: Fix colors and style for all admonitions (#2691)
Since the basic admonition admonition styles are just applied to a couple individual admonitions, rather than admonitions in general, those other than "warning" and "note" won't display as admonitions at all. In addition to fixing that, this PR adds appropriate, standard colors for each of the additional admonition types in both light and dark mode.
2022-07-06 13:59:41 -05:00
CAM Gerlach 135e66f311
Infra: Link topic index pages in rendered PEP topic headers (#2689) 2022-06-29 06:03:49 -07:00
Pradyun Gedam fa659f01c8
Infra: Tweak PEP references to work on topic sub-index pages (#2658) 2022-06-20 06:36:01 -07:00
Hugo van Kemenade b4032e7e3d
Infra: Make colour theme cycler button accessible (#2619) 2022-06-18 20:07:06 +02:00
Adam Turner a2f2d6cc5a
Add support for topic indices (#2579)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-18 20:04:46 +02:00
Hugo van Kemenade 2d9a9462dd
PEP 0: Remove 'PEP' from table headers (#2635) 2022-06-08 18:49:36 +01:00
Adam Turner e92d085a35
Infra: Refactor `peps.json` logic into PEP class (#2585) 2022-06-08 10:14:36 -07:00
Adam Turner f7c9e62c9f
Infra: Use Docutils' `list-table` syntax for PEP 0 (#2616) 2022-06-08 10:11:14 -07:00
wookie184 278070ac97
Include the PEP index in `peps.json` (#2567) 2022-05-01 16:38:40 +01:00
Philipp A ebff37d5e7
Enable resetting HTML colour scheme preferences
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-04-28 16:49:31 +01:00
Hugo van Kemenade 0b0dd6ddd5
Add tests for `pep_sphinx_extensions` (#2545)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-04-26 20:07:20 +01:00
CAM Gerlach e0d4ae5855
Style: Retitle inline 'Contents' to 'Table of Contents' for clarity (#2541) 2022-04-20 04:54:38 -05:00
Hugo van Kemenade 53d6d5987b
Infra: remove two of the five instances of title at top of pages (#2532)
* Infra: remove one of the four instances of title at top of pages

* Infra: remove another of the five instances of title at top of pages

* Infra: but keep PEP number in the breadcrumbs
2022-04-19 02:28:45 -05:00
CAM Gerlach efeae28e9e
Infra: Improve email and link processing and rendering in headers (#2467)
* Infra: Include mailing list link type in text for clarity, & refactor

* Infra: Support mailing list info pages as well as archives

* Infra: Pretty-format Discourse categories/threads in headers as well

* Infra: Show friendly-name of target in Post-History link hover text

* Infra: Automatically link list addresses to list pages in Discussions-To

* Infra: Use simpler check for title in Discourse URL header processing

* Infra: Automatically trim trailing commas & whitespace in header values
2022-04-19 09:27:27 +03:00
CAM Gerlach 4a5751f0d3
Style: Reduce space consumed by headers and improve alignment (#2533) 2022-04-19 09:24:27 +03:00
Hugo van Kemenade 3f6aec0937
Infra: Restore PEPs RSS feed in <head> (#2509) 2022-04-15 00:18:57 +03:00
Hugo van Kemenade 642ad67260
Infra: don't wrap PEP numbers in PEP 0 tables (#2524)
Fixes #2520
2022-04-13 08:01:43 -07:00
Mark Amery 75cc6853e1
Infra: Remove pre-wrap CSS rule that breaks multi-line inline literals (#2512)
As written up in detail at https://github.com/python/peps/issues/2511, this rule breaks the rendering of 199 inline literals across all the PEPs, and appears to have no reason to exist. I therefore propose to remove it.
2022-04-11 12:09:26 -07:00
wookie184 67fe49b322
Fix colour scheme toggling when switching from default dark mode (#2494)
* Fix colour scheme toggling when switching from default dark mode

* Add workaround for Chrome bug where disabling element doesn't cause rerender
2022-04-02 09:05:13 +03:00
Hugo van Kemenade fe2d145d5a
Infra: generate machine-readable PEP index (#2475)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-04-01 23:07:39 +03:00
CAM Gerlach dae03bb7ec
Style: Fix unbounded max width causing very wide spans to overflow (#2478) 2022-03-30 23:42:33 -05:00
CAM Gerlach 75235028b7
PEP 0: Make PEP titles in table clickable links (#2429) 2022-03-24 15:08:07 -05:00
CAM Gerlach 55bed7dca5
Style: Scroll code blocks instead of wrapping them (#2463) 2022-03-24 15:03:39 -05:00
CAM Gerlach f30bc4caa8
Style: Reduce size of code font and improve responsiveness at narrow screen widths (#2439) 2022-03-22 23:14:36 +02:00
CAM Gerlach 41086f5258
Style: Fix vertical margins of def lists w/o <p>s to match those with (#2427)
* Style: Fix vertical margins of def lists w/o <p>s to match those with

* Style: Specify line-height without rem
2022-03-16 20:06:15 -05:00
Hugo van Kemenade 9900fa894c
Accessibility: Add aria-label to clearly describe the dark mode button (#2426) 2022-03-15 16:03:35 +02:00
Adam Turner 13aa4b16fb
Make the table of contents collapsed by default (#2364) 2022-03-14 01:49:03 +00:00
Adam Turner 4c76e963f2
Styling: Remove field block highlights and restore definition list indent (#2425) 2022-03-14 01:46:48 +00:00
Adam Turner 0bd513148a
Explicitly list files to render in `conf.py` (#2415) 2022-03-14 01:44:36 +00:00
CAM Gerlach ce2ef0473e
Meta: Classify Accepted Process PEPs as current; PEP 8001: Mark as Final (#2385) 2022-03-12 16:04:54 +00:00
Hugo van Kemenade 5d0ebd014a
Dark mode: Invert some images (#2409)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-03-11 20:41:57 +00:00
Adam Turner 1a79345130
PRS: Enable preview rendering on pull requests (#2023) 2022-03-11 15:34:31 +00:00
Adam Turner 4bdabc6000
The PEP Rendering System is dead; long live the PEP Rendering System (#2399) 2022-03-10 10:27:31 +02:00
Hugo van Kemenade 08e37f7c23
PEP 0: Fix 'Page Source (GitHub)' (#2401)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-03-09 23:15:24 +00:00
Adam Turner 563de32559 PRS: Add CNAME generation and `rel="canonical"` 2022-03-09 19:00:38 +00:00
Adam Turner 358854aac9 PRS: Remove country language tag in page template 2022-03-01 00:03:40 +00:00
Adam Turner b76fe4351e
Use PEP titles and sections as title text for `:pep:` references (#2366) 2022-02-27 22:58:15 +00:00
Adam Turner 42f88f1ce2
Display list names in Resolution and Discussions-To headers (#2361) 2022-02-27 14:46:36 -08:00
Adam Turner 94225885de
PEP 676: Use `docutils.nodes.Node.findall` (#2363) 2022-02-25 18:38:24 +00:00
Adam Turner 7efe7fb433
PEP 676: Display mailing list names for thread links in Discussions-To (#2351) 2022-02-21 21:04:55 +00:00
CAM Gerlach 8e33abd30f
PEP 12: Recommend reST hyperlinks over footnotes (#2302) 2022-02-17 17:26:37 +00:00
Adam Turner 5c62d9d2de
Fail the Sphinx render workflow on warnings from Docutils (#2288) 2022-01-28 23:24:08 +00:00
Adam Turner 113e490701
Several PEPs: Use explicit `:pep:` and `:rfc:` roles (#2209) 2022-01-21 11:03:51 +00:00
Adam Turner 50e5de2d28
PEP 676: 'dark mode', documentation, spec update, implementation update (#2239)
Co-authored-by: C.A.M. Gerlach <cam.gerlach@gerlach.cam>
2022-01-16 14:33:05 -08:00
CAM Gerlach 57c9a36dca
Fix refs section removal breaking external links on Sphinx build too (#2229) 2022-01-11 18:37:31 -08:00
Adam Turner 3d60b84e35
PEP 676: Implementation updates (#2208) 2022-01-09 10:07:03 -08:00
CAM Gerlach f82973df46
Don't auto-add inline links to ref section & rm if empty, per #2130 (#2155)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2021-12-18 15:23:14 -08:00
Hugo van Kemenade e47f9242f8
Rename master to main (#2178) 2021-12-03 06:59:24 -08:00
Dimitri Papadopoulos Orfanos 57d9baf04d
Typos found by codespell (#2073)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-09-17 11:18:24 -07:00
Adam Turner 0d93abf9bf
Sphinx support: theming (#1933)
See #2, #1385 for context. Superseeds #1568.

This is the Sphinx-theming part, building on PR #1930.

### Stylesheets:
- `style.css` - styles
- `mq.css` - media queries

### Jinja2 Templates:
- `page.html` - overarching template

### Javascript:
- `doctools.js` - fixes footnote brackets

### Theme miscellany
- `theme.conf` - sets pygments styles, theme internals
2021-06-30 20:19:44 +01:00
Adam Turner 749c2d9a37
Sphinx support: add PEP 0 generation extension (1932)
* Add PEP 0 parser

* Add PEP 0 writer

* Add PEP 0 generator and authors override

* Add/update build and run

* Simplify `create_index_file`

* Special status handling

* Add constants for PEP related magic strings

* Prefer checking on class

* Add PEP.hide_status, use constants

* Remove comment from 2008 (current method works fine)

* Clarify intent of for-else loop

* Hook in to Sphinx (oops, missed when splitting out this PR)

* Rename AUTHORS.csv for clarity

* Sort and strip spaces

* Prefer `authors_overrides` name

* Add pep_0_errors.py

* Move author_sort_by to writer

* PEP init misc

* Split out Author

* Drop pep_0 prefix

* Pass title length as an argument

* Add constants.py to hold global type / status values

* Capitalise constants

* Capitalise constants

* Update PEP classification algorithm

* Extract static methods to module level

* Add emit_text, emit_pep_row

* Use constants in writer.py

* Sort imports

* Sort constants

* Fix sorting in historical and dead PEPs

* Extract static methods to module level

* Extract static methods to module level (parser.py

* Make Author a NamedTuple

* Fix author duplication bug with NamedTuples

* Revert to old PEP classification algorithm

* Define PEP equality
2021-06-12 18:51:14 +01:00
Adam Turner 0f3bbd9ad9
Sphinx support: add docutils support files (#1931)
See #2, #1385 for context. Superseeds #1566.

This is the docutils parsing, transforms and writing part, building on PR #1930. It contains a pseudo-package, `sphinx_pep_extensions`, which itself contains:

### Docutils parsing:
- `PEPParser` - collates transforms and interfaces with Sphinx core
- `PEPRole` - deals with :PEP:`blah` in RST source

### Docutils transforms:
- `PEPContents` (Creates table of contents without page title)
- `PEPFooter` (Dels with footnotes, link to source, last modified commit)
- `PEPHeaders` (Parses RFC2822 headers)
- `PEPTitle` - Creates document title from PEP headers
- `PEPZero` - Masks email addresses and creates links to PEP numbers from tables in `pep-0000.rst`

### Docutils HTML output:
- `PEPTranslator` - Overrides to the default HTML translator to enable better matching of the current PEP styles
2021-06-09 01:37:55 +01:00