From e6ec6060e2b867a45324c25f7f46d03457c34fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Wed, 24 Jan 2024 18:51:29 +0100 Subject: [PATCH 1/3] tox: v4 doesn't inherit stuff across testenvs In tox v4, "reuse of environments" was disabled [1]. This is then later explained [2] to refer to exactly that thing which we were using for inheriting the dependencies from the top-level testenv all the way to the docs build. That's why the docs build in GitHub CI started failing. [1] https://tox.wiki/en/4.11.4/upgrading.html#reuse-of-environments [2] https://tox.wiki/en/4.11.4/upgrading.html#packaging-configuration-and-inheritance Change-Id: I26378d55751f6719a6daee1cdcc57563243c1b01 --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 1b8c67dac..61cfb0ca0 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ skipsdist = True deps = -r{toxinidir}/requirements.txt -r{toxinidir}/tests/requirements.txt + docs: -r{toxinidir}/docs/requirements.txt cover: pytest-cov linters: flake8 linters: pep8-naming @@ -22,8 +23,6 @@ commands = python -m build [testenv:docs] -deps = - -r{toxinidir}/docs/requirements.txt allowlist_externals = /bin/sh commands = From 48376f6e2c65944e34c2d00b93021a56e97d48b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Wed, 24 Jan 2024 19:03:16 +0100 Subject: [PATCH 2/3] docs: don't repeat top-level dependencies Now that the top-level `tox` inheritance is fixed, there's no need to repeat the dependencies across several files. We're going to require a newer Sphinx because some automagic version deps bring sphinxcontrib-applehelp which now requires Sphinx v5. While we're at it, let's bring this to Sphinx v7. This required that `lang` change (changed in v5). Of course, because of the version pinning hell, Sphinx v7 requires newer myst-parser, so let's be bold and go all the way to v2. What could possibly go wrong? This (partially) reverts commit 47c89626e3398b2abf9686a49287e9b909ce8e38. Change-Id: Ie60ed866b14ac7ac424ea2cea05c99d0f996f854 --- docs/requirements.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0059c8177..136fbcdfa 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,12 +1,7 @@ alabaster>=0.7.12,<1 docutils>=0.17.1,<1 -matplotlib>=3.7.3,<4 -myst-parser>=0.16.1,<1 -networkx>=3.1,<4 -numpy>=1.24.4,<2 +myst-parser>=2,<3 Pygments>=2.11.2,<3 rstcheck -scipy>=1.10.1,<2 -Sphinx>=5.3.0,<6 +Sphinx>=7.2.6,<8 sphinxcontrib-bibtex>=2.4.1,<3 -xlrd>=1.2.0,<2 \ No newline at end of file From e5dba9eb9a540dbfafe80abd7ec7d343a42d3361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Wed, 24 Jan 2024 18:30:51 +0100 Subject: [PATCH 3/3] docs: try to unbreak the readthedocs.io build It was failing with a message: Config validation error in build.os. Value os not found. Apparently, the v2 config file is mandatory, so let's do that. Change-Id: I267d5314db026de532b2b6644f500d25de08e343 --- .readthedocs.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 0ee7e5c8d..515a3c9bf 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,15 @@ +version: 2 build: - image: latest + os: ubuntu-22.04 + tools: + python: "3.12" + python: - version: 3.8 -requirements_file: docs/requirements.txt + install: + - method: pip + path: . + extra_requirements: + - docs + +sphinx: + configuration: docs/conf.py