Commit Graph

20905 Commits

Author SHA1 Message Date
Chris Sewell
d130c2e710
[docs] Improve tutorials (#12473)
This commit make it clearer, from the filenames and titles,
what the extension tutorials are intended to teach.
2024-06-27 22:30:03 +02:00
Chris Sewell
0b5fd6289d
[docs] Improve contents title style (#12485) 2024-06-27 21:31:15 +02:00
Chris Sewell
ad6f659eb2
[docs] Add Previous/Next links after content (#12466) 2024-06-27 14:58:50 +02:00
EcaleD
f85f50e526
[DOCS] Fix typo (#12476) 2024-06-25 12:18:34 +02:00
Tim Hoffmann
a53a758d40
DOC: Rewrite installation instructions (#12458)
- Put pip and conda as the most common options first
- Don't distinguish Linux / Windows in the pip commands.
- Replace the venv instructions by a general tip to use environments and link out for details.
- Collect all OS-specific package manager in one section
- Remove the "Windows - Other methods" secion. 
- Move latest development release to a separate entry. 

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-06-25 12:17:55 +02:00
dependabot[bot]
b70578f80c
Bump ruff from 0.4.7 to 0.4.10 (#12452) 2024-06-25 09:42:31 +02:00
dependabot[bot]
a0610f4f33
Bump mypy from 1.10.0 to 1.10.1 (#12475) 2024-06-25 09:37:05 +02:00
James Addison
6b237d9a70
[linkcheck] Allow integer for linkcheck_rate_limit_timeout (#12470)
Eliminate type-related warnings when users configure a valid integer value for the `linkcheck_rate_limit_timeout` config setting.

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-06-24 17:26:24 +00:00
Rafael Fontenelle
2ccae70089
[docs] Fix typos in autodoc.rst (#12469) 2024-06-24 14:48:54 +02:00
James Addison
d42db153df
[ci] Ensure files within tests/js trigger NodeJS tests (#12445)
Ensure that any changes to the JS tests,
introduced in PR/commit pushes,
re-runs the relevant GitHub Actions workflow.
2024-06-23 00:23:04 +02:00
Chris Sewell
53119133f2
[docs] Keep top-bar visible (#12464)
This commit ensures the top-bar is always visible, rather than being hidden on scrolling or navigating to a target.
2024-06-23 00:19:43 +02:00
Tim Hoffmann
be92d6545a
DOC: Reduce horizontal padding on small screens (#12465)
Maximize used horizontal space when the screen is small.
2024-06-23 00:04:52 +02:00
Chris Sewell
a1bb165685
[docs] Add Github repo icon-link to topbar (#12462)
Add a link to sphinx-doc/sphinx, via an icon on the right of the top-bar
2024-06-22 20:48:18 +02:00
Chris Sewell
bcf32428c8
[docs] Improve sidebar (#12461)
- Remove "Site navigation" header
  - this is already contextually clear (especially since separators were added in #12439)
- Hide "On this page" if `display_toc is False`
- Format "On this page" header similar to top-level site-nav sections
2024-06-22 15:32:06 +02:00
Chris Sewell
c5bd2d42c5
[docs] improve RTD version selector (#12460)
ensure the border-radius is applied correctly
2024-06-22 14:50:38 +02:00
Chris Sewell
93e4eea307
[docs] Style ReadTheDocs version selector (#12457)
Style the ReadTheDocs version selector
(see https://docs.readthedocs.io/en/stable/flyout-menu.html)
inline with the rest of the theme.
2024-06-21 20:46:19 +02:00
Chris Sewell
8f97fd276a
[docs] Improve landing page (#12453)
This commit is intended to improve new user's first-interaction with the Sphinx site:

- Make page header icon/text smaller and not capitalized
- Give min-width to left sidebar (it was getting too small at certain window sizes)
- Replace features list on landing page with admonition boxes, with adaptive layout
- Add landing page "used by" section
- Slightly restructure the Extension section, into Tutorials and How-tos
- Add code to `conf.py` to write HTML write redirect pages for moved documents
- Improve support page, by adding link to Stackoverflow, GH discussion and ReadtheDocs,
  and remove defunct link to libera chat and matplotlib tutorial
2024-06-21 20:12:57 +02:00
Chris Sewell
bc1a5c5c88
[autogen] Add --remove-old option (#12456)
A common "gotcha" of re-running `sphinx-autogen`, is that if there are changes it will not remove old files, leading to build errors for files not in a `toctree`

This commit introduces a `--remove-old` option to remove these files.

Note, a key detail here is that we don't want to simply clear the directory before running `sphinx-autogen`,
since this would lead to all files having a new `mtime`,
and then `sphinx-build` would rebuild all of them even if they have not changed.
So we must first collect the list of all correct files, then remove any not in the list.
2024-06-21 19:29:46 +02:00
Nicolas Peugnet
f5eb0b2df1
[docs] Fix horizontal overflow in theme header (#12455) 2024-06-21 16:01:13 +02:00
Chris Sewell
11abfb90ba
[docs] Update changelog (#12454)
Some additions to the changelog,
that were not added in the relevant PRs.
2024-06-21 15:48:59 +02:00
Chris Sewell
d7e1bfeb4b
[apidoc] Add --remove-old option (#12448)
A common "gotcha" of re-running `sphinx-apidoc`, is that if the modules API changes it will not remove old files, leading to build errors for files not in a `toctree`

This commit introduces a `--remove-old` option to remove these files.

Note, a key detail here is that we don't want to simply clear the directory before running `sphinx-apidoc`,
since this would lead to all files having a new `mtime`,
and then `sphinx-build` would rebuild all of them even if they have not changed.
So we must first collect the list of all correct files, then remove any not in the list.

The commit also improves some typing of the code and replace `os.path` by `pathlib.Path` in most instances
2024-06-20 13:12:37 +02:00
Chris Sewell
0e3f5b4ab2
[DOCS] Improve events (#12446)
Split the events callback API into a separate document, add a flow graph of the events within the build process, add parameters to the events,
and link the `EnvironmentCollector` docs to the relevant events.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-20 10:40:22 +02:00
Chris Sewell
ee92847a0a
[format] Add ruff formating for apidoc/autosummary (#12447) 2024-06-20 09:37:49 +02:00
Chris Sewell
13b16c9b04
DOCS: hide todo admonitions on RTD (#12442)
`todo` admonitions should not be present in the user-facing documentation (built on ReadTheDocs)
2024-06-19 15:15:31 +02:00
Chris Sewell
37ff33dff7
[builder] type Builder core methods with @final and improve docs (#12436)
This commit:

- annotates the `Builder`'s "core" methods, with [`final`](https://docs.python.org/3/library/typing.html#typing.final)
- adds a UML graph to the Builder API docs
- Adds more methods to the Builder API docs

to make it clearer for extension developers, what is expected from a new builder subclass.
2024-06-19 14:51:20 +02:00
Tim Hoffmann
e30430d2ba
DOC: Improve internal sphinx13 style (#12439)
This commit adds a few changes to the theme to make it more readable and visually more appealing. In particular:

- Slightly increase the font weight of headings (300 --> 400).
- Adapt the color of the search box border to sphinx-blue.
- Add horizontal bars between the components of the side bar. 
- Re-style admonitions to use colored title backgrounds.
2024-06-19 00:44:44 +02:00
Thomas Weißschuh
6471027d19
[themes]: Include project name in logo_alt by default (#12421)
The "alt" attribute of an `<img>` is required to convey all information.
Make it clear which logo is shown.
Also make it possible for users to override the logo_alt with a custom value.
2024-06-18 01:47:14 +02:00
Bénédikt Tran
581bcdd140
[config] correctly synchronize `root_doc and master_doc` (#12417) 2024-06-17 18:04:33 +02:00
Thomas Weißschuh
d5bdabdd80
themes: Don't duplicate "navigation" in aria-label (#12422)
The word "navigation" is not supposed to be included as part of the aria-label attribute:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/navigation_role
2024-06-17 12:50:34 +02:00
Chris Sewell
1e297bb8c5
🔧 Narrow typing for Builder.build method (#12357) 2024-06-17 12:44:04 +02:00
James Addison
799ae16a01
Intersphinx: log warnings for ambiguous target resolutions. (#12329)
This commit adds detection of ambiguous ``std:label`` and ``std:term`` references (due to case-insensitivity)
during loading and resolution of Intersphinx targets,
and emits a warning if found.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-06-17 12:42:22 +02:00
Chris Sewell
9c834ff8c5
Remove doctree cache from pickled BuildEnvironment (#12431)
This commit removes `_write_doc_doctree_cache` from the pickled `BuildEnvironment`,
greatly reducing the on-disk and parallel forking memory consumption,
and ensuring outdated doctrees are not used for re-builds.
2024-06-17 12:36:20 +02:00
Tim Hoffmann
1e77e6bc9a
DOC: Move autodoc setup/usage to extension docs (#12435)
Leaving just the link in the quickstart guide
2024-06-17 11:58:55 +02:00
Chris Sewell
b97d14a8b0
Improve tox docs config (#12434)
For example, allow for `CLEAN=true BUILDER=man tox -e docs -- -j4`, 
to use the `man` builder on a clean build, with 4 processes
2024-06-17 11:52:52 +02:00
James Addison
568e26c797
[tests] JavaScript: refactor test fixtures (#12102)
This PR allows to serve JavaScript test fixtures using a fixture-based logic as for Python tests.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-13 13:07:46 +02:00
Tim Hoffmann
4fbd3682d5
DOC: Add autodoc section "Ensuring the code can be imported" (#12426)
This explains the requirements for importablilty (can be found and dependencies can be resolved). It also explains two common approaches how this can be achieved.
2024-06-12 11:43:33 +02:00
Rafael Fontenelle
da076d1854
DOCS: Improve Internationalization guide (#12377)
Documentation needs to mention the new Transifex CLI tool instead of the deprecated transifex-client

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-06-07 12:30:01 +02:00
Rafael Fontenelle
20ec3bd69d
[docs] fix a typo in `markupapi.rst` (#12413) 2024-06-06 12:52:31 +02:00
Jean-François B
b90482fc81
LaTeX: fix docs for `'babel' key of latex_elements` (#12411)
This fixes the documentation which was faulty since v1.7.6, but #12410 is left open until a decision is taken.
2024-06-05 12:52:35 +02:00
Chris Sewell
f0dc8239cd
[app] Allow extensions to detect freshenv builds (#12358)
Some extensions cache data outside of the `BuildEnvironment` (usually for memory/performance reasons).
For these extensions, it would be helpful to detect when `sphinx-build -E` has been called, which in essence suggests the user wishes to remove cached data before building.

This commit adds the `Sphinx.fresh_env_used` public property, exposing `Sphinx._fresh_env_used` in an immutable manner.
2024-06-03 12:01:10 +02:00
Dimitri Papadopoulos Orfanos
53c31f77b6
🔧 Apply ruff rule ISC001 (#12401) 2024-06-03 08:35:48 +02:00
dependabot[bot]
7550588b42
Bump ruff from 0.4.4 to 0.4.7 (#12404)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 08:33:20 +02:00
Nicolas Peugnet
90574bc966
[patch] fix undefined label after readthedocs update (#12395) 2024-05-29 12:32:26 +02:00
Inada Naoki
48cbb43e28
[console] improve `progress_message` context (#12387)
This allows statements executed within a ``progress_message`` context
to emit log messages without polluting the console output.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-05-22 14:09:19 +02:00
quotuva
9cc0ea1408
[build] texinfo: fix crash in `reference` nodes without children (#12389)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-05-22 09:51:27 +02:00
Chris Sewell
548f0f928a
👌 Allow access to the parser during the read phase (#12361)
This commit allows access to the `Parser` instance during the read phase, using the read-only property `BuildEnvironment.parser`.

This aims to allow for parser agnostic logic within roles and directives,
as opposed to hard-coding for implementation details of the default docutils `RSTParser`.
2024-05-21 14:46:43 +02:00
Nicolas Peugnet
ac3f74a3e0
[tests] Add intl regression test for term not found warning (#12388)
Add test for term not found warning in test_intl to prevent future regressions
2024-05-19 12:14:13 +02:00
Jelle Zijlstra
6ce4f96c85
More precise types in preserve_defaults.py (#12385) 2024-05-18 19:48:24 +02:00
Jean-François B
a51331c4b7
LaTeX: fix #12380 (#12382) 2024-05-17 12:28:50 +02:00
Chris Sewell
43276dcbac
🔧 add tox environment for mypy (#12376) 2024-05-15 07:18:31 +02:00