Skip to content

Commit

Permalink
Merge pull request #6197 from PrimozGodec/sphinx-multiproject
Browse files Browse the repository at this point in the history
Doc - use sphinx-multiproject for RTD subprojects
  • Loading branch information
markotoplak authored Nov 19, 2022
2 parents 7d18600 + 55b4b0e commit f1726c2
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -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="<project name>" 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/"
},
}
2 changes: 1 addition & 1 deletion doc/data-mining-library/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions doc/data-mining-library/source/reference/data.table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/development/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion doc/visual-programming/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
docutils<0.17
Sphinx>=4.2.0
recommonmark
sphinx-multiproject
1 change: 1 addition & 0 deletions requirements-readthedocs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ cython
-r requirements-pyqt.txt
# for orange data mining library catboost and xgboost required
-r requirements-opt.txt
-e .

0 comments on commit f1726c2

Please sign in to comment.