From patchwork Mon Nov 13 16:30:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 1863288 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4STZhn3q7cz1yR8 for ; Tue, 14 Nov 2023 03:32:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 53D32420F3; Mon, 13 Nov 2023 16:32:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 53D32420F3 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rlsXvzWxtJdM; Mon, 13 Nov 2023 16:32:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6ED2B42076; Mon, 13 Nov 2023 16:32:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6ED2B42076 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 313A9C0DD3; Mon, 13 Nov 2023 16:32:19 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D2F2CC0DD2 for ; Mon, 13 Nov 2023 16:32:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BAF49612F8 for ; Mon, 13 Nov 2023 16:32:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BAF49612F8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gmq5JyiJ2P9n for ; Mon, 13 Nov 2023 16:32:15 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6B4DA61439 for ; Mon, 13 Nov 2023 16:32:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6B4DA61439 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4CBC3240003; Mon, 13 Nov 2023 16:32:13 +0000 (UTC) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Mon, 13 Nov 2023 17:30:48 +0100 Message-ID: <20231113163212.737909-2-i.maximets@ovn.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231113163212.737909-1-i.maximets@ovn.org> References: <20231113163212.737909-1-i.maximets@ovn.org> MIME-Version: 1.0 X-GND-Sasl: i.maximets@ovn.org Cc: Dumitru Ceara , Ilya Maximets Subject: [ovs-dev] [PATCH ovn v2 1/2] Documentation: Use theme from Read The Docs. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 'ovs-sphinx-theme' is designed to look like an openvswitch.org website. It contains OVS logo and navigation bars from the openvswitch.org. And that doesn't really make a lot of sense for OVN. Also, currently the ovs-sphinx-theme is not actually installed by the Read The Docs configuration, so the docs.ovn.org is using default alabaster theme instead. Switch to sphinx_rtd_theme, it looks close to the main ovn.org website. Remove the upper limit on sphinx version, because the theme may require higher versions and also sphinx 2.0 is very old and fails to be installed on Read The Docs servers. Signed-off-by: Ilya Maximets --- Documentation/conf.py | 22 +++++++--------------- Documentation/internals/documentation.rst | 18 +++++++----------- Documentation/requirements.txt | 4 ++-- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/Documentation/conf.py b/Documentation/conf.py index f7eceaec8..f8fc0125f 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -12,16 +12,14 @@ # All configuration values have a default; values that are commented out # serve to show the default. +import importlib import string import sys -try: - import ovs_sphinx_theme - use_ovs_theme = True -except ImportError: - print("Cannot find 'ovs-sphinx-theme' package. " +use_rtd_theme = importlib.util.find_spec('sphinx_rtd_theme') is not None +if not use_rtd_theme: + print("Cannot find 'sphinx_rtd_theme' package. " "Falling back to default theme.") - use_ovs_theme = False # -- General configuration ------------------------------------------------ @@ -48,7 +46,7 @@ master_doc = 'contents' # General information about the project. project = u'Open Virtual Network (OVN)' -copyright = u'2020, The Open Virtual Network (OVN) Development Community' +copyright = u'2020-2023, The Open Virtual Network (OVN) Development Community' author = u'The Open Virtual Network (OVN) Development Community' # The version info for the project you're documenting, acts as replacement for @@ -89,14 +87,8 @@ linkcheck_anchors = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -if use_ovs_theme: - html_theme = 'ovs' - -# Add any paths that contain custom themes here, relative to this directory. -if use_ovs_theme: - html_theme_path = [ovs_sphinx_theme.get_theme_dir()] -else: - html_theme_path = [] +if use_rtd_theme: + html_theme = 'sphinx_rtd_theme' # The name of an image file (relative to this directory) to place at the top # of the sidebar. diff --git a/Documentation/internals/documentation.rst b/Documentation/internals/documentation.rst index 72a120bef..59c18b3a2 100644 --- a/Documentation/internals/documentation.rst +++ b/Documentation/internals/documentation.rst @@ -41,17 +41,13 @@ variety of other output formats but also allows for things like cross-referencing and indexing. for more information on the two, refer to the :doc:`contributing/documentation-style`. -ovs-sphinx-theme +sphinx_rtd_theme ---------------- -The documentation uses its own theme, `ovs-sphinx-theme`, which can be found on -GitHub__ and is published on pypi__. This is shared by Open vSwitch and OVN. -It is packaged separately to ensure all documentation gets the latest version -of the theme (assuming there are no major version bumps in that package). If -building locally and the package is installed, it will be used. If the package -is not installed, Sphinx will fallback to the default theme. - -The package is currently maintained by Stephen Finucane and Russell Bryant. +The documentation uses `sphinx_rtd_theme`, which can be found on GitHub__ and +is published on pypi__. It is also packaged in major distributions. +If building locally and the package is installed, it will be used. If the +package is not installed, Sphinx will fallback to the default theme. Read the Docs ------------- @@ -72,6 +68,6 @@ modifications to this site, refer to the `GitHub project`__. __ http://docutils.sourceforge.net/rst.html __ http://www.sphinx-doc.org/ -__ https://github.com/openvswitch/ovs-sphinx-theme -__ https://pypi.python.org/pypi/ovs-sphinx-theme +__ https://github.com/readthedocs/sphinx_rtd_theme +__ https://pypi.python.org/pypi/sphinx_rtd_theme __ https://github.com/ovn-org/ovn-org.github.io diff --git a/Documentation/requirements.txt b/Documentation/requirements.txt index 77130c6e0..63a7997f7 100644 --- a/Documentation/requirements.txt +++ b/Documentation/requirements.txt @@ -1,2 +1,2 @@ -sphinx>=1.1,<2.0 -ovs_sphinx_theme>=1.0,<1.1 +sphinx>=1.1 +sphinx_rtd_theme>=1.0,<2.0 From patchwork Mon Nov 13 16:30:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 1863289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4STZhq3VG3z1yR8 for ; Tue, 14 Nov 2023 03:32:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 933BB8238F; Mon, 13 Nov 2023 16:32:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 933BB8238F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id utjysZn8I6wi; Mon, 13 Nov 2023 16:32:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8EF0082531; Mon, 13 Nov 2023 16:32:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8EF0082531 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B6FC8C0DDA; Mon, 13 Nov 2023 16:32:19 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B990CC0071 for ; Mon, 13 Nov 2023 16:32:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 95BED823F6 for ; Mon, 13 Nov 2023 16:32:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 95BED823F6 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P9KuhYz6mDbB for ; Mon, 13 Nov 2023 16:32:17 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by smtp1.osuosl.org (Postfix) with ESMTPS id 76ACB822FB for ; Mon, 13 Nov 2023 16:32:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 76ACB822FB Received: by mail.gandi.net (Postfix) with ESMTPSA id 87530240009; Mon, 13 Nov 2023 16:32:15 +0000 (UTC) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Mon, 13 Nov 2023 17:30:49 +0100 Message-ID: <20231113163212.737909-3-i.maximets@ovn.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231113163212.737909-1-i.maximets@ovn.org> References: <20231113163212.737909-1-i.maximets@ovn.org> MIME-Version: 1.0 X-GND-Sasl: i.maximets@ovn.org Cc: Dumitru Ceara , Ilya Maximets Subject: [ovs-dev] [PATCH ovn v2 2/2] readthedocs: Add the configuration file. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Since last month ReadTheDocs only supports building with a new configuration file provided in the repository itself: https://blog.readthedocs.com/migrate-configuration-v2/ So, all our documentation builds are failing for quite some time. Add the configuration file to unblock documentation updates. Acked-by: Mark Michelson Signed-off-by: Ilya Maximets --- .readthedocs.yaml | 26 ++++++++++++++++++++++++++ Makefile.am | 1 + 2 files changed, 27 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..8c451663a --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,26 @@ +# .readthedocs.yaml +# Read the Docs configuration file. +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details. + +# Required. +version: 2 + +# Set the OS, Python version, etc. +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +# Build documentation in the "Documentation/" directory with Sphinx. +sphinx: + configuration: Documentation/conf.py + # Default HTML builder. + builder: "html" + +# Build all formats: HTML, PDF, ePub. +formats: all + +# Declare the Python requirements. +python: + install: + - requirements: Documentation/requirements.txt diff --git a/Makefile.am b/Makefile.am index 06045760a..98bbb9a1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,6 +100,7 @@ EXTRA_DIST = \ .github/workflows/test.yml \ .github/workflows/ovn-kubernetes.yml \ .github/workflows/ovn-fake-multinode-tests.yml \ + .readthedocs.yaml \ boot.sh \ $(MAN_FRAGMENTS) \ $(MAN_ROOTS) \