Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade documentation techstack #6470

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Fix printing of tensor in gpu and add validation check for bounds of axis-aligned bounding box (PR #6444)
* Python 3.11 support. bump pybind11 v2.6.2 -> v2.11.1
* Check for support of CUDA Memory Pools at runtime (#4679)
* Migrate Open3d documentation to furo theme ✨ (#6470)
ssheorey marked this conversation as resolved.
Show resolved Hide resolved

## 0.13

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ data structures and algorithms in both C++ and Python. The backend is highly
optimized and is set up for parallelization. We welcome contributions from
the open-source community.

[![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)
[![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)
[![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)
[![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)
[![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)
[![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)

**Core features of Open3D include:**

Expand Down
19 changes: 0 additions & 19 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,3 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/getting_started.in.rst
${CMAKE_CURRENT_SOURCE_DIR}/getting_started.rst @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker.in.rst
${CMAKE_CURRENT_SOURCE_DIR}/docker.rst @ONLY)

include(FetchContent)

FetchContent_Declare(
ext_open3d_sphinx_theme
PREFIX open3d_sphinx_theme
URL https://github.com/isl-org/open3d_sphinx_theme/archive/c71d2728eb5afd1aeeb20dc27a5a0d42bb402d83.tar.gz
URL_HASH SHA256=98af8b7fdb75a74280b6187dbb58ea601db978d4f3f8956d3d87c59c20786f73
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/open3d_sphinx_theme"
)

if(NOT ext_open3d_sphinx_theme_POPULATED)
FetchContent_Populate(ext_open3d_sphinx_theme)

set(OPEN3D_SPHINX_THEME_SOURCE_DIR ${ext_open3d_sphinx_theme_SOURCE_DIR})
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py
${CMAKE_CURRENT_SOURCE_DIR}/conf.py @ONLY)
44 changes: 44 additions & 0 deletions docs/_static/css/furo_overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* In furo, toctree captions needs to be enlarged. */
.toctree-wrapper.compound .caption {
font-size: 150%;
font-weight: bold;
}

/* Apply custom CSS for displaying docs version - https://github.com/pradyunsg/furo/pull/500 */
#furo-versions {
font-size: var(--sidebar-item-font-size);
}

#furo-versions .caption {
display: inline-block;
color: var(--color-sidebar-caption-text);
font-weight: bold;
text-transform: uppercase;
font-size: var(--sidebar-caption-font-size);
padding-right: var(--sidebar-expander-width);
margin-top: 0;
}

#furo-versions input[type=checkbox] {
display: none;
position: absolute;
box-sizing: border-box;
padding: 0;
overflow: visible;
}

#furo-versions input[type=checkbox]:checked ~ .rst-other-versions {
display: inline-block;
line-height: var(--sidebar-item-line-height);
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
text-decoration: none;
}

#furo-versions .rst-other-versions {
display: none;
}

#furo-versions .versions-label {
position: relative;
float: right;
}
20 changes: 0 additions & 20 deletions docs/_static/theme_overrides.css

This file was deleted.

21 changes: 21 additions & 0 deletions docs/_templates/sidebar/variant-selector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% if display_all_docs_versions %}
{# Add rst-badge after rst-versions for small badge style. #}
<div id="furo-versions" class="rst-versions sidebar-tree" role="note" aria-label="versions" tabindex="0">
<p class="caption">Docs Version</p>
<input type="checkbox" id="checkbox_toggle" class="toctree-checkbox versions-checkbox" role="switch">
<label id="versions-label" class="versions-label" for="checkbox_toggle">
<div class="visually-hidden">Toggle child pages in navigation</div>
<i class="icon">
<svg>
<use href="#svg-arrow-right"></use>
</svg>
</i>
</label>

<!-- A hack to include an external page to get around CORS policy -->
<!-- https://stackoverflow.com/a/15250208/1255535 -->
<div class="rst-other-versions">
<script src="http://www.open3d.org/docs/versions.js"></script>
</div>
</div>
{% endif %}
28 changes: 11 additions & 17 deletions docs/conf.in.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# -*- coding: utf-8 -*-
#
# Open3D documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 3 14:18:28 2017.
# sphinx-quickstart on Mon Apr 3 14:18:28 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand Down Expand Up @@ -68,7 +68,7 @@ def get_git_short_hash():
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"nbsphinx",
'm2r2',
"m2r2",
]

if os.environ.get("skip_notebooks", "false") == "true":
Expand Down Expand Up @@ -131,6 +131,7 @@ def get_git_short_hash():

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_dark_style = "monokai"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -139,17 +140,12 @@ def get_git_short_hash():

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
theme_path = "@OPEN3D_SPHINX_THEME_SOURCE_DIR@"
html_theme = "sphinx_rtd_theme"
html_theme_path = [theme_path]
html_theme = "furo"
html_favicon = "_static/open3d_logo.ico"

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

# '_static' contains the theme overwrite
static_path = os.path.join(theme_path, "sphinx_rtd_theme", "static")
html_static_path = [static_path, "_static"]

# Force table wrap: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
html_context = {
"css_files": [
"_static/theme_overrides.css" # override wide tables in RTD theme
]
}
html_static_path = ["_static"]

# Theme overrides
html_css_files = ['css/furo_overrides.css']

# Display selection of all documentation versions.
html_context = {'display_all_docs_versions': True}

# added by Jaesik to hide "View page source"
html_show_sourcelink = False
Expand Down
10 changes: 6 additions & 4 deletions docs/getting_started.in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ Pip (PyPI)
pip install open3d # or
pip install open3d-cpu # Smaller CPU only wheel on x86_64 Linux (since v0.17+)

.. warning::

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

``pip install -U pip>=20.3``
.. code-block:: bash

pip install -U pip>=20.3

.. note::
In general, we recommend using a
Expand Down Expand Up @@ -99,7 +101,7 @@ install the latest development version directly with pip:

pip install -U --trusted-host www.open3d.org -f http://www.open3d.org/docs/latest/getting_started.html open3d

.. note::
.. warning::
The development wheels for Linux are named according to PEP600. Please
use ``pip`` version >=20.3 to install them. The wheels are not yet fully
PEP600 compliant.
Expand Down Expand Up @@ -182,7 +184,7 @@ provided here [#]_:
only.
.. [#] To check the `glibc` version on your system, run :code:`ldd --version`.

.. note:: In Linux, do not link code with different CXX11 ABIs, since this will
.. warning:: In Linux, do not link code with different CXX11 ABIs, since this will
most likely cause linker errors or crashes. Most system libraries in recent
Linux versions (e.g. if the OS came with GCC versions 5+) use the CXX11 ABI,
while PyTorch and Tensorflow libraries typically use the pre CXX11 ABI.
Expand Down
4 changes: 0 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
Open3D: A Modern Library for 3D Data Processing
===============================================

.. only: not latex

Contents:

.. toctree::
:maxdepth: 1
:caption: Getting Started
Expand Down
2 changes: 1 addition & 1 deletion docs/jupyter/geometry/distance_queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
" axis=-1)\n",
"intersection_counts = scene.count_intersections(rays).numpy()\n",
"# A point is inside if the number of intersections with the scene is even\n",
"# This sssumes that inside and outside is we ll defined for the scene.\n",
"# This assumes that inside and outside are well-defined for the scene.\n",
"is_inside = intersection_counts % 2 == 1"
]
},
Expand Down
1 change: 1 addition & 0 deletions docs/open3d_ml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Open3D-ML

.. image:: https://raw.githubusercontent.com/isl-org/Open3D-ML/master/docs/images/getting_started_ml_visualizer.gif
:width: 480px
:align: center
Copy link
Contributor Author

@saurabheights saurabheights Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to highlight that since furo is center-aligned theme, unlike rtd, its better to go for center alignment for images. (IMO, although correct me if you have a contradicting thoughts).


Open3D-ML is an extension of Open3D for 3D machine learning tasks. It builds on
top of the Open3D core library and extends it with machine learning tools for
Expand Down
14 changes: 7 additions & 7 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sphinx==3.3.1
sphinx-rtd-theme==0.5.2
nbsphinx==0.8.3
matplotlib==3.3.3
jinja2==3.0.3
m2r2==0.2.7
mistune==0.8.4
docutils==0.20.1
furo==2023.9.10
jinja2==3.1.2
m2r2==0.3.3.post2
matplotlib==3.7.3
nbsphinx==0.9.3
sphinx==7.1.2
Loading