-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Explicit installation of Sphinx versions #1971
base: main
Are you sure you want to change the base?
Changes from all commits
d7c6d8a
d84198f
9f8436b
61267a8
6468bed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,9 +223,6 @@ To run the build tests with `tox`, run the following command: | |
# this will compile the assets and run the tests (with test coverage) | ||
# note the use of the `-m` flag vs. other commands in this guide | ||
$ tox run -m tests | ||
|
||
# to run the tests only without pre-compiling the assets and without coverage (for example if you recently compiled the assets) | ||
$ tox run -e tests-no-cov | ||
Comment on lines
-226
to
-228
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the compilation is required, let's remove this |
||
``` | ||
|
||
To run the accessibility checks: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ env_list = | |
# helping contributors run tests locally | ||
# tox run -m tests | ||
labels = | ||
tests = compile, py312-tests | ||
tests = compile, py312-sphinxlatest-tests | ||
a11y = compile, py312-docs, a11y-tests | ||
|
||
# general tox env configuration | ||
|
@@ -41,30 +41,38 @@ commands = | |
# example tox run -e py39-profile-docs -- -o profile.svg -n 100 | ||
profile-docs: python ./tools/profile.py {posargs} | ||
|
||
# tests can be ran with or without coverage (see examples below), | ||
# it is recommended to run compile before running tests (see examples below), | ||
# tox run -e compile,py39-tests | ||
# if you want to skip the assets compilation step you can run the tests without | ||
#`compile`, for example: | ||
# tox run -e py39-tests | ||
# run tests with a specific Sphinx version | ||
# tox run -e compile,py39-sphinx61-tests | ||
# run tests without coverage | ||
# tox run -e compile,py39-tests-no-cov | ||
[testenv:py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests{,-no-cov}] | ||
description = "Run tests Python and Sphinx versions. If a Sphinx version is specified, it will use that version vs the default in pyproject.toml" | ||
# tox run -e compile,py310-sphinxdev-tests | ||
# all possible combinations are listed below, and are based on the Python | ||
# version supported by the Sphinx version (expanding here because it is easier to read) | ||
#py3{9,10}-sphinx{61,62,70,71}-tests, | ||
#py3{10,11,12}-sphinx{latest,dev}-tests, | ||
#py3{9,10,11,12}-sphinx{72,73,74,80}-tests, | ||
[testenv:py3{9,10}-sphinx{61,62,70,71}-tests,py3{9,10,11,12}-sphinx{72,73,74,80}-tests,py3{10,11,12}-sphinx{latest,dev}-tests] | ||
description = "Run tests with a specific Sphinx version" | ||
# need to ensure the package is installed in editable mode | ||
package = editable | ||
extras = | ||
test # install dependencies - defined in pyproject.toml | ||
test # test dependencies - defined in pyproject.toml | ||
deps = | ||
coverage[toml] | ||
py39-sphinx61-tests: sphinx~=6.1.0 | ||
py312-sphinxdev: sphinx[test] @ git+https://github.com/sphinx-doc/sphinx.git@master | ||
sphinx61: Sphinx>=6.1,<6.2 | ||
sphinx62: Sphinx>=6.2,<6.3 | ||
sphinx70: Sphinx>=7.0,<7.1 | ||
sphinx71: Sphinx>=7.1,<7.2 | ||
sphinx72: Sphinx>=7.2,<7.3 | ||
sphinx80: Sphinx>=8.0,<8.1 | ||
sphinxlatest: Sphinx | ||
sphinxdev: sphinx[test] @ git+https://github.com/sphinx-doc/sphinx.git@master | ||
Comment on lines
+65
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I erred on adding all versions here but since we are not running tests against all of them I can remove some of them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO the latest point-release of 6.x, 7.x, 8.x, plus current main is enough |
||
depends = compile | ||
commands = | ||
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests: coverage run -m pytest -m "not a11y" {posargs} | ||
py3{9,10,11,12}{,-sphinx61,-sphinxdev,}-tests-no-cov: pytest -m "not a11y" {posargs} | ||
coverage run -m pytest -m "not a11y" {posargs} | ||
|
||
# run accessibility tests with Playwright and axe-core | ||
# compiling the assets is needed before running the tests | ||
|
@@ -89,15 +97,17 @@ commands = | |
# build PST documentation with the default or a specific Sphinx version | ||
# since we are building the documentation we install the packaged dev version of PST | ||
# tox run -e py39-docs | ||
# tox run -e py39-sphinx61-docs | ||
[testenv:py3{9,12}{,-sphinx61}-docs] | ||
# tox run -e py39-sphinx62-docs | ||
[testenv:py3{9,12}-sphinx{62,latest,dev}-docs] | ||
description = build the documentation and place in docs/_build/html | ||
# suppress Py3.11's new "can't debug frozen modules" warning | ||
set_env = PYDEVD_DISABLE_FILE_VALIDATION=1 | ||
# keep this in sync across all docs environments | ||
extras = {[testenv:docs-no-checks]extras} | ||
deps = | ||
py39-sphinx61-docs: sphinx~=6.1.0 | ||
sphinx62: Sphinx>=6.2,<6.3 | ||
sphinxlatest: Sphinx | ||
sphinxdev: sphinx[test] @ git+https://github.com/sphinx-doc/sphinx.git@master | ||
commands = | ||
sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} | ||
python tests/utils/check_warnings.py | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have been installing
6.1
, but I think we should bump it to6.2