Commit Graph

883 Commits

Author SHA1 Message Date
Nok Lam Chan
17a84a6443
[doc] clarify units for `linkcheck_rate_limit_timeout` (#12225)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

This normalizes the description of the configuration value so that its default value's unit is the same as the internal one (i.e., seconds).
2024-04-05 11:51:02 +02:00
Bénédikt Tran
f44ff30673
[doc] cleanup references and update external URLs (#12182) 2024-03-25 11:39:05 +01:00
Chris Sewell
3bedde26a9
🔧 Ruff format python files within docs folder (#12139)
Remove `docs` files from the `exclude` list, and also add the `preview = false` format config, which is shown to reduce diffs to the current code base
2024-03-19 15:23:57 +01:00
Chris Sewell
565d4104d5
👌 Handle external references pointing to object types (#12133)
This commit fixes the issue of `objects.inv` denoting object names, whilst the `external` role only allows for role names. 

As an example, take the `objects.inv` for the sphinx documentation, which contains:

```
py:function
    compile                  : usage/domains/python.html#compile
```

A user might understandably expect that they could reference this using `` :external:py:function:`compile` ``, but actually this would previously error with:

```
WARNING: role for external cross-reference not found: py:function
```

this is because, `function` is the object type, yet `external` expects the related role name `func`.

It should not be necessary for the user to know about this distinction,
so in this commit, we add logic, to first look if the name relates to a role name (as previous, to not be back-breaking) but, if not, then also look if the name relates to an object that has a known role and, if so, use that.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 13:42:50 +01:00
Chris Sewell
b0f096f440
Add show_warning_types configuration variable (#12131)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 10:22:28 +01:00
Bénédikt Tran
b2069fb64f
[lint] update Makefile and lint doc (#12117) 2024-03-17 14:45:56 +01:00
Alexandre Franke
1281b158b4
Fix typos in usage/configuration.rst (#12024) 2024-03-07 20:50:46 +01:00
Demetrios Koziris
faa33a53a3
[docs] Clarify how to escape curly braces in `samp` text (#11987)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-02-22 09:48:12 +01:00
Harrissou Sant-anna
f4eea669e0
Fix wording for the number of default substitutions (#11985) 2024-02-19 10:14:07 +01:00
Hugo van Kemenade
95b2cce9a0
Add a `versionremoved` directive (#11905)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-21 20:12:52 +00:00
pcgaustad
2ccc9d315e
Give a more plausible example for a combination of tags (#11899) 2024-01-20 19:10:23 +00:00
Nicolas Peugnet
59cf4d4c35
Allow custom targets in the manpage role (#11825)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-17 01:09:18 +00:00
Adam Turner
587e01177d Provide example interface for ``Scorer` 2024-01-14 04:47:44 +00:00
Adam Turner
23cef9b59a Use `https://` where possible 2024-01-14 04:18:57 +00:00
James Addison
2b47fd4b4b
Update linkcheck_timeout value and documentation (#11875) 2024-01-13 17:41:28 +00:00
Alex Szatmary
bcb1825679
State that `exclude_patterns` has priority (#11872) 2024-01-12 04:28:47 +00:00
James Addison
5211c01646
Enable reporting HTTP 401 hyperlinks as broken in linkcheck (#11684)
Co-authored-by: picnixz <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-09 12:33:40 +00:00
Dimitri Papadopoulos Orfanos
460a63010f
Fix various spelling errors (#11735) 2024-01-04 02:37:44 +00:00
Adam Turner
3d8b00827e Promote underline levels 2023-10-03 19:39:36 +01:00
Adam Turner
81a8870eee Note that cross-referencing syntax has moved to a new location 2023-10-03 19:39:36 +01:00
Adam Turner
6a56592b30 Move cross-referencing to a new page 2023-10-03 19:32:37 +01:00
Adam Turner
5d58624227 Reformat the domains lists 2023-10-02 13:10:26 +01:00
Adam Turner
f7f41e6828 Fix and standardise markup 2023-10-02 13:10:26 +01:00
Adam Turner
3dd10e47d0 Add versionadded directives 2023-10-02 13:10:26 +01:00
Adam Turner
e15fc04e53 Promote underline levels 2023-10-02 13:10:26 +01:00
Adam Turner
385a9193a7 Remove redundant labels 2023-10-02 13:10:26 +01:00
Adam Turner
607aadc660 Split out the Maths domain 2023-10-02 13:10:26 +01:00
Adam Turner
c6dd47d2c8 Split out the reStructuredText domain 2023-10-02 13:10:26 +01:00
Adam Turner
f6bafc7dad Split out the JavaScript domain 2023-10-02 13:10:25 +01:00
Adam Turner
c8b2191059 Split out the Standard domain 2023-10-02 13:10:12 +01:00
Adam Turner
de3266ab25 Split out the C++ domain 2023-10-02 13:10:12 +01:00
Adam Turner
db6cc67f1a Split out the C domain 2023-10-02 13:10:12 +01:00
Adam Turner
d491d3e04c Split out the Python domain 2023-10-02 13:10:12 +01:00
Adam Turner
05682f12a6 Restore `usage/restructuredtext/domains` 2023-10-02 13:10:11 +01:00
Adam Turner
c0e17eca40 Move the domains reference up one level 2023-10-02 13:09:38 +01:00
Adam Turner
b935915c57
Improve make-mode documentation (#11692) 2023-09-21 09:39:39 +01:00
Nikita Sobolev
1bd261c3a0
Fix a typo in the `:final:` option for methods (#11670) 2023-09-14 09:50:49 +01:00
Hugo van Kemenade
359edc34fc
Use the Python 3 `print()` function in the documentation (#11683) 2023-09-14 09:45:20 +01:00
Adam Turner
7e9a2066c2 Be more ephemeral (in anchor link title text) 2023-08-12 05:30:38 +01: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
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
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
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
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