Skip to content

Commit 2a11e0e

Browse files
Upgrade documentation techstack (#6470)
* Move conf.in.py to conf.py. * Upgrade all docs dependencies and replace open3d_sphinx_theme with sphinx_rtd_theme * Lower docutils to version 0.17.0 and sort dependencies * Fix CI badges. * Move to furo and upgrade all dependencies. * Fix display of caption of toctree in furo theme. * Add css overrides and minor html changes to show documentation version selector. * todo_include_todos was given twice in conf.py, remove earlier entry. * Fix for references rendering. --------- Co-authored-by: Sameer Sheorey <sameer.sheorey@intel.com>
1 parent 392fcb9 commit 2a11e0e

12 files changed

Lines changed: 101 additions & 79 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
* Changed TriangleMesh to store materials in a list so they can be accessed by the material index (PR #5938)
1919
* Support multi-threading in the RayCastingScene function to commit scene (PR #6051).
2020
* Fix some bad triangle generation in TriangleMesh::SimplifyQuadricDecimation
21-
* Fix printing of tensor in gpu and add validation check for bounds of axis-aligned bounding box (PR #6444)
21+
* Fix printing of tensor in gpu and add validation check for bounds of axis-aligned bounding box (PR #6444)
2222
* Python 3.11 support. bump pybind11 v2.6.2 -> v2.11.1
2323
* Check for support of CUDA Memory Pools at runtime (#4679)
2424
* Fix `toString`, `CreateFromPoints` methods and improve docs in `AxisAlignedBoundingBox`. 🐛📝
25+
* Migrate Open3d documentation to furo theme ✨ (#6470)
2526

2627
## 0.13
2728

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ data structures and algorithms in both C++ and Python. The backend is highly
2424
optimized and is set up for parallelization. We welcome contributions from
2525
the open-source community.
2626

27-
[![Ubuntu CI](https://github.com/isl-org/Open3D/workflows/Ubuntu%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Ubuntu+CI%22)
28-
[![macOS CI](https://github.com/isl-org/Open3D/workflows/macOS%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22macOS+CI%22)
29-
[![Windows CI](https://github.com/isl-org/Open3D/workflows/Windows%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Windows+CI%22)
27+
[![Ubuntu CI](https://github.com/isl-org/Open3D/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Ubuntu+CI%22)
28+
[![macOS CI](https://github.com/isl-org/Open3D/actions/workflows/macos.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22macOS+CI%22)
29+
[![Windows CI](https://github.com/isl-org/Open3D/actions/workflows/windows.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Windows+CI%22)
3030

3131
**Core features of Open3D include:**
3232

docs/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,3 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/getting_started.in.rst
44
${CMAKE_CURRENT_SOURCE_DIR}/getting_started.rst @ONLY)
55
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker.in.rst
66
${CMAKE_CURRENT_SOURCE_DIR}/docker.rst @ONLY)
7-
8-
include(FetchContent)
9-
10-
FetchContent_Declare(
11-
ext_open3d_sphinx_theme
12-
PREFIX open3d_sphinx_theme
13-
URL https://github.com/isl-org/open3d_sphinx_theme/archive/c71d2728eb5afd1aeeb20dc27a5a0d42bb402d83.tar.gz
14-
URL_HASH SHA256=98af8b7fdb75a74280b6187dbb58ea601db978d4f3f8956d3d87c59c20786f73
15-
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/open3d_sphinx_theme"
16-
)
17-
18-
if(NOT ext_open3d_sphinx_theme_POPULATED)
19-
FetchContent_Populate(ext_open3d_sphinx_theme)
20-
21-
set(OPEN3D_SPHINX_THEME_SOURCE_DIR ${ext_open3d_sphinx_theme_SOURCE_DIR})
22-
endif()
23-
24-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py
25-
${CMAKE_CURRENT_SOURCE_DIR}/conf.py @ONLY)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* In furo, toctree captions needs to be enlarged. */
2+
.toctree-wrapper.compound .caption {
3+
font-size: 150%;
4+
font-weight: bold;
5+
}
6+
7+
/* Apply custom CSS for displaying docs version - https://github.com/pradyunsg/furo/pull/500 */
8+
#furo-versions {
9+
font-size: var(--sidebar-item-font-size);
10+
}
11+
12+
#furo-versions .caption {
13+
display: inline-block;
14+
color: var(--color-sidebar-caption-text);
15+
font-weight: bold;
16+
text-transform: uppercase;
17+
font-size: var(--sidebar-caption-font-size);
18+
padding-right: var(--sidebar-expander-width);
19+
margin-top: 0;
20+
}
21+
22+
#furo-versions input[type=checkbox] {
23+
display: none;
24+
position: absolute;
25+
box-sizing: border-box;
26+
padding: 0;
27+
overflow: visible;
28+
}
29+
30+
#furo-versions input[type=checkbox]:checked ~ .rst-other-versions {
31+
display: inline-block;
32+
line-height: var(--sidebar-item-line-height);
33+
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
34+
text-decoration: none;
35+
}
36+
37+
#furo-versions .rst-other-versions {
38+
display: none;
39+
}
40+
41+
#furo-versions .versions-label {
42+
position: relative;
43+
float: right;
44+
}
45+
46+
/* Fix for references. See Open3D PR #6470 */
47+
div.citation > span {
48+
padding-right: 2rem;
49+
}

docs/_static/theme_overrides.css

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{% if display_all_docs_versions %}
2+
{# Add rst-badge after rst-versions for small badge style. #}
3+
<div id="furo-versions" class="rst-versions sidebar-tree" role="note" aria-label="versions" tabindex="0">
4+
<p class="caption">Docs Version</p>
5+
<input type="checkbox" id="checkbox_toggle" class="toctree-checkbox versions-checkbox" role="switch">
6+
<label id="versions-label" class="versions-label" for="checkbox_toggle">
7+
<div class="visually-hidden">Toggle child pages in navigation</div>
8+
<i class="icon">
9+
<svg>
10+
<use href="#svg-arrow-right"></use>
11+
</svg>
12+
</i>
13+
</label>
14+
15+
<!-- A hack to include an external page to get around CORS policy -->
16+
<!-- https://stackoverflow.com/a/15250208/1255535 -->
17+
<div class="rst-other-versions">
18+
<script src="http://www.open3d.org/docs/versions.js"></script>
19+
</div>
20+
</div>
21+
{% endif %}

docs/conf.in.py renamed to docs/conf.py

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# -*- coding: utf-8 -*-
99
#
1010
# Open3D documentation build configuration file, created by
11-
# sphinx-quickstart on Mon Apr 3 14:18:28 2017.
11+
# sphinx-quickstart on Mon Apr 3 14:18:28 2017.
1212
#
1313
# This file is execfile()d with the current directory set to its
1414
# containing dir.
@@ -68,7 +68,7 @@ def get_git_short_hash():
6868
"sphinx.ext.napoleon",
6969
"sphinx.ext.todo",
7070
"nbsphinx",
71-
'm2r2',
71+
"m2r2",
7272
]
7373

7474
if os.environ.get("skip_notebooks", "false") == "true":
@@ -131,25 +131,18 @@ def get_git_short_hash():
131131

132132
# The name of the Pygments (syntax highlighting) style to use.
133133
pygments_style = "sphinx"
134-
135-
# If true, `todo` and `todoList` produce output, else they produce nothing.
136-
todo_include_todos = False
134+
pygments_dark_style = "monokai"
137135

138136
# -- Options for HTML output ----------------------------------------------
139137

140138
# The theme to use for HTML and HTML Help pages. See the documentation for
141139
# a list of builtin themes.
142-
#
143-
# html_theme = 'alabaster'
144-
theme_path = "@OPEN3D_SPHINX_THEME_SOURCE_DIR@"
145-
html_theme = "sphinx_rtd_theme"
146-
html_theme_path = [theme_path]
140+
html_theme = "furo"
147141
html_favicon = "_static/open3d_logo.ico"
148142

149143
# Theme options are theme-specific and customize the look and feel of a theme
150144
# further. For a list of options available for each theme, see the
151145
# documentation.
152-
#
153146
html_theme_options = {
154147
# 'display_version': True
155148
}
@@ -159,15 +152,13 @@ def get_git_short_hash():
159152
# so a file named "default.css" will overwrite the builtin "default.css".
160153

161154
# '_static' contains the theme overwrite
162-
static_path = os.path.join(theme_path, "sphinx_rtd_theme", "static")
163-
html_static_path = [static_path, "_static"]
164-
165-
# Force table wrap: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
166-
html_context = {
167-
"css_files": [
168-
"_static/theme_overrides.css" # override wide tables in RTD theme
169-
]
170-
}
155+
html_static_path = ["_static"]
156+
157+
# Theme overrides
158+
html_css_files = ['css/furo_overrides.css']
159+
160+
# Display selection of all documentation versions.
161+
html_context = {'display_all_docs_versions': True}
171162

172163
# added by Jaesik to hide "View page source"
173164
html_show_sourcelink = False

docs/getting_started.in.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ Pip (PyPI)
3535
pip install open3d # or
3636
pip install open3d-cpu # Smaller CPU only wheel on x86_64 Linux (since v0.17+)
3737
38+
.. warning::
3839

39-
.. note::
4040
Please upgrade your ``pip`` to a version >=20.3 to install Open3D in Linux,
4141
e.g. with
4242

43-
``pip install -U pip>=20.3``
43+
.. code-block:: bash
44+
45+
pip install -U pip>=20.3
4446
4547
.. note::
4648
In general, we recommend using a
@@ -99,7 +101,7 @@ install the latest development version directly with pip:
99101
100102
pip install -U --trusted-host www.open3d.org -f http://www.open3d.org/docs/latest/getting_started.html open3d
101103
102-
.. note::
104+
.. warning::
103105
The development wheels for Linux are named according to PEP600. Please
104106
use ``pip`` version >=20.3 to install them. The wheels are not yet fully
105107
PEP600 compliant.
@@ -182,7 +184,7 @@ provided here [#]_:
182184
only.
183185
.. [#] To check the `glibc` version on your system, run :code:`ldd --version`.
184186
185-
.. note:: In Linux, do not link code with different CXX11 ABIs, since this will
187+
.. warning:: In Linux, do not link code with different CXX11 ABIs, since this will
186188
most likely cause linker errors or crashes. Most system libraries in recent
187189
Linux versions (e.g. if the OS came with GCC versions 5+) use the CXX11 ABI,
188190
while PyTorch and Tensorflow libraries typically use the pre CXX11 ABI.

docs/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
Open3D: A Modern Library for 3D Data Processing
1414
===============================================
1515

16-
.. only: not latex
17-
18-
Contents:
19-
2016
.. toctree::
2117
:maxdepth: 1
2218
:caption: Getting Started

docs/jupyter/geometry/distance_queries.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
" axis=-1)\n",
309309
"intersection_counts = scene.count_intersections(rays).numpy()\n",
310310
"# A point is inside if the number of intersections with the scene is even\n",
311-
"# This sssumes that inside and outside is we ll defined for the scene.\n",
311+
"# This assumes that inside and outside are well-defined for the scene.\n",
312312
"is_inside = intersection_counts % 2 == 1"
313313
]
314314
},

0 commit comments

Comments
 (0)