From 2db250258cfde6e8c8faab4bf736db3eb9cb22d9 Mon Sep 17 00:00:00 2001 From: Saurabh Khanduja Date: Thu, 7 Dec 2023 00:47:01 +0100 Subject: [PATCH] Remove extra documentation build for python examples (#6487) * Print output path for doxygen and sphinx documentation as uri. * Do not double build rst for python examples --- docs/make_docs.py | 9 ++++++++- util/ci_utils.sh | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/make_docs.py b/docs/make_docs.py index 8249f66b29e..0803b36bba8 100644 --- a/docs/make_docs.py +++ b/docs/make_docs.py @@ -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: @@ -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): diff --git a/util/ci_utils.sh b/util/ci_utils.sh index 1487cf193ca..e490b0d2282 100644 --- a/util/ci_utils.sh +++ b/util/ci_utils.sh @@ -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 @@ -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 }