Commit Graph

12 Commits

Author SHA1 Message Date
Adam Turner 08d688fdca
All PEPs: Move to ``peps/`` folder (#3418) 2023-09-09 18:39:29 +01:00
Adam Turner 497250afe0
Infra: Update documentation and ``build.py`` (#3420)
- Always fail on warnings, remove the related flag
- Nitpicky is now enabled in ``conf.py``, remove the related flag
- Use direct links to PEPs rather than Sphinx-only ``:doc:`` roles
- Remove references to ``AUTHOR_OVERRIDES.csv``, which is no longer used
- Fix indentation for an enumerated list
2023-09-03 22:08:42 +01:00
Adam Turner 2c5152bb40
Update GitHub Actions workflows (#3270) 2023-08-05 13:24:46 +01:00
Hugo van Kemenade 0f56290a30
Infra: override RTD build commands (#2728) 2022-07-29 16:07:03 +03:00
Adam Turner 1a79345130
PRS: Enable preview rendering on pull requests (#2023) 2022-03-11 15:34:31 +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 c69fdbf5e1
Add config option in `build.py` for Sphinx builders (#1988) 2021-06-09 14:02:16 +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
Adam Turner 353379966d
Sphinx support: add Sphinx core files (#1930)
See #2, #1385 for context. Superseeds #1565.

This is the minimal core Sphinx support part, adding a bare minimum of useful things to get Sphinx to build and deploy, whilst not affecting the current build system. There is no theming or custom parsing needed to properly deal with PEPs.

- `build.py` - build script
- `conf.py` - Sphinx configuration
- `Makefile` - new targets for Sphinx
- `.gitignore` - add ignores for `venv` and `package` directories
- `contents.rst` - Sphinx page to discover all PEPs
- `deploy-gh-pages.yaml` - builds and deploys to github pages
- `requirements.txt`
2021-06-09 00:11:26 +01:00