Commit Graph

3872 Commits

Author SHA1 Message Date
Hugo van Kemenade
359edc34fc Use the Python 3 `print()` function in the documentation (#11683) 2023-09-14 09:45:20 +01:00
Matt Wozniski
43d69755df Leverage `importlib.reload` for reloading modules (#11679)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-09-13 22:58:35 +01:00
Adam Turner
ff18318613 Add an `'include-read'` event (#11657) 2023-08-30 22:21:16 +01:00
Bénédikt Tran
76658c49a9 Fix `sphinx.ext.autodoc.preserve_defaults` (#11550)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 01:19:25 +00:00
Bénédikt Tran
19018f01b6 Improve SigElementFallbackTransform fallback logic. (#11311)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-15 14:25:25 +01:00
Matthias Geier
65fd5be20d Use the 'toctree-wrapper' class for the `sphinx13` theme (#11129) 2023-08-14 23:40:42 +01:00
Adam Turner
9bcf1d8bb3 Fix TCH001 (move application import into a type-checking block) 2023-08-14 00:18:13 +01:00
Adam Turner
36012b7d96 Fix TCH002 (move third-party import into a type-checking block) 2023-08-13 22:50:03 +01:00
Adam Turner
db739afaeb Update permissions in the tutorial deployment workflow 2023-08-12 06:42:33 +01:00
Adam Turner
7e9a2066c2 Be more ephemeral (in anchor link title text) 2023-08-12 05:30:38 +01:00
Adam Turner
58b628263f Deprecate `css_files and script_files` (#11582) 2023-08-12 00:46:44 +00:00
blaisep
b0fe730146 Fix #11407 adjust the spelling in the example. 2023-07-30 15:08:49 +02:00
Adam Turner
1cfb68d8be Consistently name the object description options (#11533)
*  The directive option ``:noindex:`` was renamed to ``:no-index:``.
*  The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
*  The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.

The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
2023-07-28 22:30:26 +01:00
Adam Turner
ff20efcd7e Tweaks to `doctest_show_successes` (#11535) 2023-07-28 22:29:04 +01:00
latosha-maltba
97d2c5da2f Add the `:no-typesetting:` option for only creating targets (#10478)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 19:43:27 +01:00
Adam Turner
c9f0e67cca Add `sphinx.util.index_entries` (#11528) 2023-07-28 07:41:10 +01:00
benkrikler
762ed8540a Add line numbers in `sphinx.ext.viewdoc` (#6319)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 05:52:48 +01:00
Jorge Leitao
99f9209924 Add summary statistics to the coverage report (#5474)
The current implementation of ``sphinx.ext.coverage`` outputs which
methods,classes, and functions are documented.
This commit adds a short summary of this report in terms of
``documented objects / total number of objects``,
both per module and total.

The purpose of this is to support
a currently not mainstream but relevant use-case:
a coverage report on the number of objects that are documented.

By having the statistics on the report or on the stdout,
a regex expression can capture the coverage percentage
(e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``)
and use it e.g. in another report, a status badge, etc.

Two options were added to the configuration to allow a table
to be printed in the report and/or to stdout.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-07-28 02:33:42 +01:00
Adam Turner
49d8304670 Start using `pathlib.Path and deprecate sphinx.testing.path` (#11526) 2023-07-28 00:39:12 +01:00
Adam Turner
5cf3dce36e Deprecate `md5 and sha1 wrappers in sphinx.util` (#11512) 2023-07-25 02:29:28 +01:00
Adam Turner
ad61e41157 Drop support for Python 3.8 (#11511) 2023-07-25 02:07:23 +01:00
Adam Turner
066e0fabc6 Add translation progress information (#11509)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2023-07-24 20:19:31 +01:00
picnixz
82bc15aec3 Enable skipping anchor verification on a per-URL basis (#11489)
Add a new ``linkcheck_anchors_ignore_for_url`` configuration variable.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-24 12:15:42 +01:00
James Addison
d15a837c61 Emend hyperlinks within the CHANGES and EXAMPLES (#11506)
* Remove "dead" links
* Update project links to the correct hostnames
2023-07-24 11:49:44 +01:00
picnixz
480630c649 Support PEP 695 and PEP 696 syntax in the Python domain (#11444)
* Generic classes can be documented with ``.. py:class::`` using PEP 695 syntax:

  .. code:: rst

     .. py:class:: Sequence[T]

* Generic functions can be documented with ``.. py:function::`` using PEP 695 syntax:

  .. code:: rst

     .. py:function:: foo[T](x: T)

* Default values for type bounds are supported.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-23 23:22:40 +01:00
chrysle
d6f10904a3 Document `--no-color and --color options to sphinx-build` (#11443) 2023-07-20 18:19:14 +01:00
Adam Turner
7c8eda24a1 Resolve `sphinx-lint` warnings 2023-07-14 06:55:18 +01:00
Adam Turner
de3aa8a318 Replace non-functional Bitbucket URLs
- ``sphinx-contrib`` has moved to GitHub
- Replace personal project links with links to the Bitbucket archive
2023-07-14 06:52:25 +01:00
Stefanie Molin
e09d02e440 Allow `copyright` to contain multiple entries (#10983)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-11 22:43:48 +01:00
TLouf
86b07d4a97 Allow multi-line object description signatures (#11011)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
Co-authored-by: TLouf <loufthomas@gmail.com>
2023-05-11 14:28:57 +01:00
Adam Turner
706f5f9cc8 Warn on deprecated Python-specific index types (#11412) 2023-05-09 22:57:39 +01:00
Adam Turner
4be56f3b7d Remove deprecated `style` key for HTML templates (#11381) 2023-04-28 10:41:59 +01:00
Adam Turner
2a9e805206 Remove the deprecated Setuptools integration (#11363) 2023-04-27 01:22:04 +01:00
Adam Turner
4e27a5fba1 Remove unneeded JavaScript from `sphinx13` theme 2023-04-23 20:45:57 +01:00
Adam Turner
bffb54734f Note correct deprecation version for `sphinx.util.osutil.cd` 2023-04-23 20:45:25 +01:00
James Addison
59de8d5202 Revert "Support and prefer `.jinja to _t` for static templates (#11165)" (#11329)
This reverts commit 5d13215b58.
2023-04-23 19:06:44 +01:00
Tim Hoffmann
b430e05285 Create a 'search field' component for themes (#11045)
``searchfield.html`` is similar to the existing ``searchbox.html``, but does not
have the heading "Quick Search". Instead, it uses "Search" as a placeholder
text. This gives a cleaner and less cluttered appearance.

The searchfield component is added to the basic theme and thus can be used
in any derivative theme. It is not used by default for backward compatibility.

The searchfield compenent is made the default in the sphinx13 theme.

CSS changes ensure that the top of the search field is aligned with the
top of the main content.
2023-04-21 02:02:04 +01:00
Maciej Olko
5a6b2b16b6 Add link to Weblate's Sphinx docs in intl documentation (#11332)
Add link to Weblate in intl documentation
2023-04-16 21:21:57 +02:00
Jean-François B
188b869fa2 Use longtable for our document in PDF format
Previous commit applied longtable class to the next one, but this still
left the previous table prevent an earlier page break.
2023-04-11 22:59:28 +02:00
Jean-François B
256ac63bf9 Use a :class:longtable in our document for LaTeX PDF output
Now that #11268 has been fixed via #11319.
2023-04-11 20:48:24 +02:00
James Addison
94f4afafa5 Add a missing word in `doc/development/theming.rst` (#11301) 2023-04-07 20:59:27 +01:00
James Addison
5d13215b58 Support and prefer `.jinja to _t` for static templates (#11165)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-07 18:07:15 +01:00
Adam Turner
7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Adam Turner
4a3febb69a Add an option for displaying short `Literal` types (#11109)
The new ``python_display_short_literal_types`` configuration option
for the ``py`` domain controls display of PEP 586 ``Literal`` types.
The 'short' format is inspired by PEP 604, using the bitwise OR operator
to distinguish the possible legal values for the argument.
2023-04-05 13:07:25 +01:00
Jean-François B
e1b15a5c11 Update doc and CHANGES for PR #11281 2023-04-03 11:12:41 +02:00
Jean-François B
8f9bac9c4f LaTeX: rename `\sphinxnotetitle into \sphinxstylenotetitle` (etc)
Follow-up to #11266.  Using \sphinxstyle prefix looked a posteriori
better, for coherency, although it is a bit long.
2023-03-27 15:21:06 +02:00
Jean-François B
7cdd9b2679 LaTeX: let \sphinxremovefinalcolon work also if no colon in input 2023-03-27 12:21:26 +02:00
Dimitri Papadopoulos
669bcc0a19 Fix typos found by codespell 2023-03-27 07:22:07 +02:00
Jean-François B
7144f4924a LaTeX: add \sphinxnotetitle et al.
In passing I reverted some deprecation I had added at 6bf40599e to some
internals of the sphinxadmonition environment, as it does not look that
pressing anyhow and the redundant namings of two colors in particular
may nevertheless prove useful to user \renewcommand's, as they avoid to
have to refer to \spx@noticetype.
2023-03-26 23:57:04 +02:00
Jean-François B
a7949d4290 LaTeX: let mark-up for seealso directive use explicit colon (fix #11264) 2023-03-26 23:57:04 +02:00