Commit Graph

16 Commits

Author SHA1 Message Date
Adam Turner
3af48520d2 Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
Adam Turner
cb5318bdc8
Use `_StrPath in sphinx.theming` (#13048) 2024-10-20 20:15:42 +01:00
Adam Turner
0b17bb1029
Always define the builder and `testroot when using the app` fixtureture (#12775) 2024-08-12 22:34:03 +01:00
Adam Turner
d03156e078
Format `tests/` (#12760) 2024-08-11 14:58:56 +01:00
Adam Turner
1f2891530d
Use `app.status and app.warning` in tests (#12663) 2024-07-23 15:35:55 +01:00
Adam Turner
af82d70c60 Raise `ThemeError` for invalid theme sections 2024-07-20 19:40:29 +01:00
Adam Turner
82edc3d385
Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
James Addison
0806a00f05
Support `.jinja` for theme static templates (#11916)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-04-23 10:40:24 +01:00
Adam Turner
44a42d53af Add basic tests for `_ConfigFile` 2024-04-11 19:01:17 +01:00
Adam Turner
8976fa4498 Support `theme.toml` 2024-04-11 19:01:17 +01:00
Adam Turner
6fd8b30043
Parse `theme.conf to a new _ConfigFile` type (#12254) 2024-04-10 00:10:26 +01:00
Chris Sewell
66fa790b3a
[tests] Add basic build test for all builtin themes (#12168)
Add `tests/test_theming/test_theming.py::test_theme_builds`, which is a parametrized test against all builtin sphinx HTML themes, that tests:

1. that the themes builds without warnings for a basic project, and
2. that all `.html` files it produces are valid XML (see https://html.spec.whatwg.org/)

https://pypi.org/project/defusedxml/ was added to the test dependencies, in order to safely parse the XML

This required one fix for `sphinx/themes/basic/search.html`, and one for `sphinx/themes/bizstyle/layout.html`

Also, `tests/test_theming` was removed from the `ruff format` exclude list
2024-03-22 12:57:34 +01:00
Adam Turner
360c7a8022 Load themes through iteration rather than recursion 2024-01-21 03:59:31 +00:00
Adam Turner
99dd0cb4c6 Refactor `sphinx.theming` to prepare for iterative loading 2024-01-21 03:59:31 +00:00
Adam Turner
0ca2ddf924 Make various theme-related objects private 2024-01-21 03:59:31 +00:00
Adam Turner
462404cb25 Organise tests into directories 2024-01-17 03:56:35 +00:00