From 0d2586fd9d82c0e7d8b9239509884867455701f9 Mon Sep 17 00:00:00 2001 From: ToineSiebelink Date: Tue, 15 Jul 2025 17:05:28 +0100 Subject: [PATCH] Upgrade OS, Python and Sphinx for RTD build Config - Updated .readthedocs.yaml (build config) to use OS: ubuntu-24.04 Python 3.12 (as this is what Ubunut-24 includes) - tox.ini basepython to 3 (will use whatever release OS has) - tox.ini Removed all python dependency constraints as they prevented using newer sphinx version) - requirement-docs: Sphinx to version 8.2.0 (to work with python 3.12 or higher) - conf.py add required extension and exclusion patterns for unused files Issue-ID:CPS-2864 Change-Id: Ieba43ec84f1f1397b1c2bd2358b2dd65e2c7143f Signed-off-by: ToineSiebelink --- .readthedocs.yaml | 6 +++--- docs/conf.py | 10 ++++++++-- docs/requirements-docs.txt | 2 +- docs/tox.ini | 12 +++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bd580e5f25..f2697c9175 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2021 Nordix Foundation +# Copyright (C) 2021-2025 OpenInfra Foundation Europe # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,9 +24,9 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-24.04 tools: - python: "3.8" + python: "3.12" python: install: diff --git a/docs/conf.py b/docs/conf.py index d3ec5df1ec..5a7974f279 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,7 +39,7 @@ html_static_path = ["_static"] html_show_sphinx = False extensions = [ - 'sphinx.ext.intersphinx','sphinxcontrib.blockdiag', + 'sphinx.ext.intersphinx', 'sphinxcontrib.blockdiag', 'sphinx.ext.autosummary', 'sphinxcontrib.seqdiag', 'sphinxcontrib.swaggerdoc', 'sphinx.ext.graphviz', 'sphinxcontrib.spelling'] @@ -53,7 +53,13 @@ branch = 'latest' doc_url = 'https://docs.onap.org/projects' master_doc = 'index' -exclude_patterns = ['.tox'] +exclude_patterns = [ + '.tox', + '/site-packages//LICENSE.rst', + '/site-packages//licenses/.rst', + '/site-packages//templates/**/.rst', + '/site-packages//DESCRIPTION.rst' ] + spelling_word_list_filename='spelling_wordlist.txt' spelling_lang = "en_GB" diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index b95c29fb2f..7cbc1602c3 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,5 +1,5 @@ six -sphinx>=4.2.0 # BSD +sphinx>=8.2.0 # BSD sphinx-rtd-theme>=1.0.0 # MIT sphinxcontrib-blockdiag # BSD sphinxcontrib-seqdiag # BSD diff --git a/docs/tox.ini b/docs/tox.ini index 97012a2f3c..a1c89916ac 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -21,26 +21,20 @@ minversion = 1.6 envlist = docs,docs-linkcheck,docs-spellcheck skipsdist = true [testenv:docs] -basepython = python3.10 +basepython = python3 deps = -r{toxinidir}/requirements-docs.txt - -chttps://releases.openstack.org/constraints/upper/yoga - -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master commands = sphinx-build -W -q -b html -n -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/html [testenv:docs-linkcheck] -basepython = python3.10 +basepython = python3 deps = -r{toxinidir}/requirements-docs.txt - -chttps://releases.openstack.org/constraints/upper/yoga - -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master commands = sphinx-build -W -q -b linkcheck -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/linkcheck [testenv:docs-spellcheck] -basepython = python3.10 +basepython = python3 deps = -r{toxinidir}/requirements-docs.txt - -chttps://releases.openstack.org/constraints/upper/yoga - -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master commands = sphinx-build -b spelling -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/spellcheck -- 2.16.6