Commit Graph

128 Commits

Author SHA1 Message Date
Zac Hatfield-Dodds f4e3b4ad98 Drop Python 3.7 2023-06-30 14:55:42 -07:00
Ville Skyttä 6041511fb4
Spelling and grammar fixes (#11014) 2023-05-18 10:10:44 -03:00
Philipp A 245a8c23dd
Revamp good practices (#10206)
* Recommend importlib import mode for new projects
* Recommend src layout more strongly
* Switch to hatchling as the packaging tool in the example (following PyPA)
* Add explanation about the different import modes
2022-09-01 07:55:41 -03:00
Ran Benita 7431750bb6 doc: have tighter control on what autodoc shows
New versions of sphinx starting showing `__init__` parameters even when
we don't want them to show because they are private (have `_ispytest`
argument).

The only working solution I found was to switch to
`autodoc_typehints_description_target = "documented"` and explicitly
document parameters for which we want to show the types. It's a little
tedious and repetitive in some simple cases, but overall it results in
nicer API docs.
2022-08-13 21:46:49 +03:00
Ran Benita cb7f5ed3b1 doc: require sphinx 5
Fix #9836.
2022-08-13 21:45:54 +03:00
pre-commit-ci[bot] cba65e74b3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-22 15:32:05 +00:00
Sandro Tosi fe2c74cb1a
Update location of `usage.rst` to fix manpage compilation
`usage.rst` has been moved from `doc/en` to `doc/en/how-to`, so the `man_pages` configuration
value needs to be updated to the new location, so that we dont get this warning:

    writing... WARNING: "man_pages" config value references unknown document usage
2022-06-07 14:43:34 -04:00
Tim Hoffmann 9a9acf13f8
Declutter doc entry page (#9969)
- Remove the index page https://docs.pytest.org/en/7.1.x/genindex.html
  Such an index is reasonable in books but not so much in HTML pages.
  IMHO the integrated search is much more user-friendly and sufficient.

- Remove the PDF link from the entry page. The PDF is already linked
  in the sidebar. I anticipate that getting the PDF documentation is
  not a major concern for users.

- Remove the sections "Changelog" and "License" from the entry page.
  These section only contain links to the respective pages.
  These topics are purely technical. They should be easily accessible
  (which they still are through sidebar section "About the project"),
  but they don't need additional advertisement through a dedicated
  section on the entry page.
2022-05-24 10:23:39 +02:00
Ran Benita 1612d3d1af doc: remove django intersphinx mapping
Initially I just wanted to fix http -> https, but I think it's not worth
having at all just for this one reference.
2022-02-08 00:46:20 +02:00
Ran Benita 0e69c62ece doc: add a `hook` crossref type
Allow writing

    🪝`pytest_cmdline_main`

instead of

    :func:`pytest_cmdline_main <_pytest.hookspec.pytest_cmdline_main>`
2021-12-12 16:29:30 +02:00
Bruno Oliveira ed24f29e60 Change copyright notice so yearly updates are not needed
Just learned that we don't need to do this every year: https://hynek.me/til/copyright-years

Followed Go's example of only stating the starting year: https://github.com/golang/go/blob/master/LICENSE

Btw any ideas why the dates vary? Some start in 2004, others 2013, 2015... shouldn't be the same year for all locations?
2021-11-30 09:28:23 -03:00
oleg.hoefling 2f1096cd55
replace hardcoded links to github user profiles with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-10 20:47:27 +01:00
Bruno Oliveira b378f9a6e0
Merge pull request #9276 from hoefling/doc/extlinks-bpo 2021-11-08 09:41:26 -03:00
oleg.hoefling 16e15b99ae
sphinx 3 compat
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:24:57 +01:00
oleg.hoefling 36265ccbf6
replace hardcoded links to bugs.python.org with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:24:57 +01:00
oleg.hoefling bba0ce4877
replace hardcoded links to github pull requests with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:18:36 +01:00
Oleg Höfling 49f934618c
Replace hardcoded links to Github issues with extlinks (#9234) 2021-11-06 11:16:11 +02:00
Ran Benita a53abe93d8
Merge pull request #9208 from bluetech/legacypath-plugin
Add legacypath plugin, move py.path stuff there
2021-11-02 20:35:12 +02:00
andrewdotn 1824349f74
Use Ubuntu 20.04, lualatex for readthedocs builds (#9242) 2021-10-30 11:21:14 -03:00
Ran Benita 1df28a4450 Move testdir to legacypath plugin 2021-10-28 21:51:51 +03:00
Oleg Höfling 1e9e16d829
Replace hardcoded links to PyPI with extlinks (#9224) 2021-10-22 09:47:57 -03:00
Bruno Oliveira 5fc7b21391
Use xelatex engine for better Unicode support (#9197) 2021-10-12 10:12:15 -03:00
Bruno Oliveira fb52fc5163
Merge pull request #9070 from andrewdotn/main 2021-10-05 16:51:58 -03:00
oleg.hoefling d58ee2b677
replace hardcoded urls to docs.pytest.org with internal crossrefs, add external crossrefs where possible
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-10-04 00:23:41 +02:00
Andrew Neitsch a9edfdf9db Run black on conf.py 2021-09-02 20:42:29 -06:00
Andrew Neitsch b46d5f4657 Only use inkscapeconverter if inkscape installed 2021-09-02 20:40:17 -06:00
Andrew Neitsch e929d15848 Include figures in PDF docs
The PDF documentation on readthedocs was missing the figures in the
fixtures reference chapter. This PR uses a Sphinx plugin that
automatically converts the checked-in SVG files to the PDF input files
that LaTeX requires.

The SVG-to-PDF conversion is done by inkscape, which gave the best
conversion among the tools I tried. However, it [does not yet
understand][href-bug] that you can write a plain `href` instead of
`xlink:href` in svg files, so I’ve had to edit the SVG files
accordingly.

[href-bug]: https://github.com/TeX-Live/luatex.git
2021-09-02 17:40:41 -06:00
oleg.hoefling d1aea7d7a8
use intersphinx crossrefs to stdlib docs where possible instead of hardcoded URLs
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-08-26 16:05:03 +02:00
Saiprasad Kale 6b53714d57
Update conf.py 2021-05-08 23:43:33 +05:30
Nico Schlömer 9ef608ef76
"fix" a couple of http -> https redirects
Found with
urli-fix . -a http: -i pytest
2021-04-26 17:44:27 +02:00
Bruno Oliveira 7c792e96c6 Add type annotations to the description instead of signature
This configures Sphinx autodoc to include the type annotations
along with the description of the function/method, instead of including
it into the signature.

Fix #8405
2021-03-05 22:22:53 -03:00
Bruno Oliveira cab16f3aac
Use transparent PNG for logo (#8159) 2020-12-16 11:19:45 -03:00
Ran Benita 7705e5e624 doc: patch Sphinx to detect our `@final` for marking classes as `final`
Thanks to Dominic Davis-Foster for code & assistance.
2020-10-03 13:13:14 +03:00
Anthony Sottile a238d1f37d py36+: remove TYPE_CHECKING from _pytest.compat
automated with:

```bash
git grep -l 'from .* import TYPE_CHECKING' |
    xargs reorder-python-imports \
        --application-directories .:src \
        --remove-import 'from _pytest.compat import TYPE_CHECKING' \
        --add-import 'from typing import TYPE_CHECKING'
```
2020-10-02 15:03:24 -07:00
Bruno Oliveira 906d8496c9 New doc role: globalvar for special variables
This introduces a new role, `:globalvar:`, so we can mark/reference
variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful
also makes the documentation look more consistent.
2020-07-10 09:50:03 -03:00
Bruno Oliveira 2f406bb9cb
Replace custom flask theme by the official one (#6453)
Ref: #6402
2020-06-01 14:21:08 +02:00
Daniel Hahler 327ec54248
Doc fixes (#6861) 2020-03-27 02:22:03 +01:00
Daniel Hahler 9e8540f25f
docs: remove doc/en/links.inc (#6853) 2020-03-06 03:11:24 +01:00
Daniel Hahler 9b32794391 intersphinx_mapping: add pluggy 2020-03-05 05:53:42 +01:00
Daniel Hahler f77d606d4e
docs: generate index and add it to globaltoc sidebar (#6808) 2020-02-27 00:34:18 +01:00
kpinc eeebcd77dd
doc: add list of fixtures to start of fixture chapter (#6696)
- Add list of fixtures to start of fixture chapter
- Add "fixture" cross ref type
2020-02-22 14:56:19 +01:00
Hugo van Kemenade c9eeafade5
Fix favicon for Chrome and Opera (#6639)
* Fix favicon for Chrome and Opera

* Delete pytest1favi.ico

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-31 20:56:45 -03:00
Daniel Hahler 4630e2725e Use `TYPE_CHECKING` instead of `False`
This allows for e.g. Jedi to infer types (it checks the name).

It was only used to support Python 3.5.0/3.5.1, where this is is not
available in the `typing` module.

Ref: https://github.com/davidhalter/jedi/issues/1472

Uses `TYPE_CHECKING = False` in `_pytest.outcomes` to avoid having to
work around circular import.
2020-01-16 16:11:39 +01:00
Bruno Oliveira deb4287d1c Update copyright year to 2020
Merge pull request #6392 from hugovk/4.6-maintenance-2020
2020-01-04 08:46:58 -03:00
Daniel Hahler d3ab56f531 docs: move changelog to docs/en and allow sphinx directives
Now `tox -e docs` will also include the draft changelog for the
next version (locally only).

`CHANGELOG.rst` now only points to the changelog on READTHEDOCS so
sphinx diretives can be used.

Followup to https://github.com/pytest-dev/pytest/pull/6272
2019-11-28 21:23:58 -03:00
Daniel Hahler 8b7aeefd7d
Merge pull request #6248 from blueyed/default-role
docs: configure default_role=literal
2019-11-21 18:44:17 +01:00
Daniel Hahler be722652f0 docs: configure default_role=literal
This configures the default role for interpreted text (single
backticks), avoiding the need to check for / enforce double backticks.

Fixes also one instance in the existing changelog:

    - Detect `pytest_` prefixed hooks using the internal plugin manager since
      ``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
      (`#3487 <https://github.com/pytest-dev/pytest/issues/3487>`_)
2019-11-21 00:35:00 +01:00
Steffen Schroeder 1cecdf6619 Added checklinks to tox and release.py 2019-11-06 20:54:41 +01:00
Bruno Oliveira 628ff4d619
Improve docs sidebar layout (#5568)
Improve docs sidebar layout
2019-07-08 19:24:48 -03:00
Bruno Oliveira 9b78a216a2 Remove unused import 2019-07-08 19:08:09 -03:00