Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Pradyun Gedam fa659f01c8
Infra: Tweak PEP references to work on topic sub-index pages (#2658) 2022-06-20 06:36:01 -07:00
Adam Turner 0bd513148a
Explicitly list files to render in `conf.py` (#2415) 2022-03-14 01:44:36 +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
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 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
Adam Turner 3d60b84e35
PEP 676: Implementation updates (#2208) 2022-01-09 10:07:03 -08: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