Skip to content

Commit

Permalink
Remove extra documentation build for python examples (#6487)
Browse files Browse the repository at this point in the history
* Print output path for doxygen and sphinx documentation as uri.
* Do not double build rst for python examples
  • Loading branch information
saurabheights authored Dec 6, 2023
1 parent 680d663 commit 2db2502
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/make_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ def run(self):
env=sphinx_env,
stdout=sys.stdout,
stderr=sys.stderr)
print(
f"Sphinx docs are generated at {(Path(build_dir)/'index.html').as_uri()}"
)


class DoxygenDocsBuilder:
Expand All @@ -449,9 +452,13 @@ def run(self):
cmd = ["doxygen", "Doxyfile"]
print('Calling: "%s"' % " ".join(cmd))
subprocess.check_call(cmd, stdout=sys.stdout, stderr=sys.stderr)
output_path = os.path.join(self.html_output_dir, "html", "cpp_api")
shutil.copytree(
os.path.join("doxygen", "html"),
os.path.join(self.html_output_dir, "html", "cpp_api"),
output_path,
)
print(
f"Doxygen docs are generated at {(Path(output_path)/'index.html').as_uri()}"
)

if os.path.exists(doxygen_temp_dir):
Expand Down
4 changes: 2 additions & 2 deletions util/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ build_docs() {
export PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:$PWD/lib/python_package"
python -c "from open3d import *; import open3d; print(open3d)"
cd ../docs # To Open3D/docs
python make_docs.py $DOC_ARGS --clean_notebooks --execute_notebooks=always --py_api_rst=never
python make_docs.py $DOC_ARGS --clean_notebooks --execute_notebooks=always --py_api_rst=never --py_example_rst=never
python -m pip uninstall --yes open3d
cd ../build
set +x # Echo commands off
Expand All @@ -440,7 +440,7 @@ build_docs() {
bin/GLInfo || echo "Expect failure since HEADLESS_RENDERING=OFF"
python -c "from open3d import *; import open3d; print(open3d)"
cd ../docs # To Open3D/docs
python make_docs.py $DOC_ARGS --py_api_rst=always --execute_notebooks=never --sphinx --doxygen
python make_docs.py $DOC_ARGS --py_api_rst=always --py_example_rst=always --execute_notebooks=never --sphinx --doxygen
set +x # Echo commands off
}

Expand Down

0 comments on commit 2db2502

Please sign in to comment.