From 55b4b0ee7fed683e3aa60536ea6e150e8ed4fb23 Mon Sep 17 00:00:00 2001
From: PrimozGodec
Date: Fri, 11 Nov 2022 13:24:46 +0100
Subject: [PATCH] Use sphinx-multiproject for subprojects at rtd
---
.readthedocs.yaml | 14 ++++++
doc/conf.py | 47 +++++++++++++++++++
doc/data-mining-library/source/conf.py | 2 +-
.../source/reference/data.table.rst | 2 -
doc/development/source/conf.py | 2 +-
doc/visual-programming/source/conf.py | 2 +-
requirements-doc.txt | 1 +
requirements-readthedocs.txt | 1 +
8 files changed, 66 insertions(+), 5 deletions(-)
create mode 100644 .readthedocs.yaml
create mode 100644 doc/conf.py
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 00000000000..2045da41085
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,14 @@
+version: 2
+
+build:
+ os: ubuntu-20.04
+ tools:
+ python: "3.10"
+
+sphinx:
+ # Path to the shared conf.py file.
+ configuration: doc/conf.py
+
+python:
+ install:
+ - requirements: requirements-readthedocs.txt
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 00000000000..20009721f95
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,47 @@
+"""
+This configuration use sphinx-multiproject which builds multiple
+Sphinx projects for the Read the Docs. We publish each project at read-the-docs
+as orange3 RTD project's subproject. This config file is only required for the
+Read the Docs build. Each documentation project can still be built separately
+with sphinx-build (make html).
+
+To select a documentation project that the RTD will build, set the PROJECT
+environment variable in RTD subprojects to the documentation project name
+(e.g. PROJECT=data-mining-library)
+
+To test the documentation build locally run (from doc directory):
+```
+PROJECT="" sphinx-build . ./_build
+```
+More about shpinx-multiproject:
+https://sphinx-multiproject.readthedocs.io/en/latest/index.html
+"""
+
+# pylint: disable=duplicate-code
+extensions = [
+ "multiproject",
+ "sphinx.ext.autodoc",
+ "sphinx.ext.doctest",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.todo",
+ "sphinx.ext.coverage",
+ "sphinx.ext.mathjax",
+ "sphinx.ext.ifconfig",
+ "sphinx.ext.viewcode",
+ "sphinx.ext.autosummary",
+ "sphinx.ext.napoleon",
+ "recommonmark",
+]
+
+# Define the projects that will share this configuration file.
+multiproject_projects = {
+ "data-mining-library": {
+ "path": "data-mining-library/source/"
+ },
+ "development": {
+ "path": "development/source/"
+ },
+ "visual-programming": {
+ "path": "visual-programming/source/"
+ },
+}
diff --git a/doc/data-mining-library/source/conf.py b/doc/data-mining-library/source/conf.py
index 66e5ecde25f..a7987bc4505 100644
--- a/doc/data-mining-library/source/conf.py
+++ b/doc/data-mining-library/source/conf.py
@@ -80,7 +80,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = "english"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
diff --git a/doc/data-mining-library/source/reference/data.table.rst b/doc/data-mining-library/source/reference/data.table.rst
index edf8eac0f0d..00e9d68d82c 100644
--- a/doc/data-mining-library/source/reference/data.table.rst
+++ b/doc/data-mining-library/source/reference/data.table.rst
@@ -86,8 +86,6 @@ The preferred way to construct a table is to invoke a named constructor.
Inspection
----------
-.. automethod:: Table.is_view
-.. automethod:: Table.is_copy
.. automethod:: Table.ensure_copy
.. automethod:: Table.has_missing
.. automethod:: Table.has_missing_class
diff --git a/doc/development/source/conf.py b/doc/development/source/conf.py
index 9c52bc1e2b7..5a3002d423c 100644
--- a/doc/development/source/conf.py
+++ b/doc/development/source/conf.py
@@ -79,7 +79,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = "english"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
diff --git a/doc/visual-programming/source/conf.py b/doc/visual-programming/source/conf.py
index 8d88cc320f4..31182075ca7 100644
--- a/doc/visual-programming/source/conf.py
+++ b/doc/visual-programming/source/conf.py
@@ -74,7 +74,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = "english"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
diff --git a/requirements-doc.txt b/requirements-doc.txt
index d58c68d09d6..48a5a157f84 100644
--- a/requirements-doc.txt
+++ b/requirements-doc.txt
@@ -3,3 +3,4 @@
docutils<0.17
Sphinx>=4.2.0
recommonmark
+sphinx-multiproject
diff --git a/requirements-readthedocs.txt b/requirements-readthedocs.txt
index cd9334bf2ac..7db6a67749f 100644
--- a/requirements-readthedocs.txt
+++ b/requirements-readthedocs.txt
@@ -5,3 +5,4 @@ cython
-r requirements-pyqt.txt
# for orange data mining library catboost and xgboost required
-r requirements-opt.txt
+-e .