From 2ac6c1cd91d22f59306fad5ea63323742c0d7eb5 Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Mon, 25 May 2026 08:57:07 -0600 Subject: [PATCH] docs: group user and contributor guide nav into captioned sections Reorganize the latest user-guide and the contributor-guide toctrees into captioned section groupings to replace the flat 14-item and 23-item lists. User guide (docs/source/user-guide/latest/index.rst): - Getting Started: Installing Comet, Configuration Settings - What Comet Supports: data sources, types, operators, expressions, ScalaUDF/Java UDF support - Compatibility: Compatibility Guide (and its sub-pages) - Operating Comet: Understanding Comet Plans, Tuning Guide, Metrics - Integrations: Iceberg, Kubernetes - Advanced: Building From Source Contributor guide (docs/source/contributor-guide/index.md): - Getting Started: Getting Started, Development Guide - Project Architecture: plugin overview, Arrow FFI, JVM/Native Shuffle, ANSI Error Propagation - Adding Functionality: operator, expression, Spark version - Testing: Comet SQL, Spark SQL, Iceberg Spark Tests - Debugging and Performance: Debugging, Benchmarking, Profiling, Tracing - Reference: Supported Spark Expressions and Configurations - Project Mechanics: Bug Triage, Release Process, Roadmap, GitHub The pydata-sphinx-theme used here flattens nested toctree captions when the sidebar is built from the global TOC, so the per-section captions only render if the sidebar starts from the section root. Update docs-sidebar.html to call generate_toctree_html with a section-relative startdepth (2 for user-guide/latest pages, 1 for contributor-guide pages, 0 otherwise) so the new captions appear in the left nav. Page bodies, file paths, and toctree entries are otherwise unchanged. Prev/next ordering follows the new section order. Part of #4421. --- docs/source/_templates/docs-sidebar.html | 13 +++- docs/source/contributor-guide/index.md | 60 ++++++++++++++++--- .../user-guide/latest/compatibility/index.md | 12 ---- docs/source/user-guide/latest/index.rst | 44 ++++++++++++-- 4 files changed, 103 insertions(+), 26 deletions(-) diff --git a/docs/source/_templates/docs-sidebar.html b/docs/source/_templates/docs-sidebar.html index 26e859eadc..a20c715d20 100644 --- a/docs/source/_templates/docs-sidebar.html +++ b/docs/source/_templates/docs-sidebar.html @@ -17,9 +17,20 @@ under the License. --> +{# Start the sidebar from the deepest captioned section the page lives under: + - user-guide/latest/* lives under user-guide/index.md → user-guide/latest/index.rst, so start at depth 2 + - contributor-guide/* lives under contributor-guide/index.md, so start at depth 1 + - root and orphan pages (search, genindex) fall back to the global toctree (depth 0). #} +{% if pagename.startswith("user-guide/latest/") and not suppress_sidebar_toctree(startdepth=2, includehidden=True) %} + {% set sidebar_startdepth = 2 %} +{% elif not suppress_sidebar_toctree(startdepth=1, includehidden=True) %} + {% set sidebar_startdepth = 1 %} +{% else %} + {% set sidebar_startdepth = 0 %} +{% endif %} diff --git a/docs/source/contributor-guide/index.md b/docs/source/contributor-guide/index.md index f3bbfba044..c601dab87d 100644 --- a/docs/source/contributor-guide/index.md +++ b/docs/source/contributor-guide/index.md @@ -32,30 +32,72 @@ menu to read more. ```{toctree} :maxdepth: 2 -:caption: Contributor Guide +:caption: Getting Started :hidden: Getting Started +Development Guide +``` + +```{toctree} +:maxdepth: 2 +:caption: Project Architecture +:hidden: + Comet Plugin Overview Arrow FFI JVM Shuffle Native Shuffle -Development Guide -Debugging Guide ANSI Error Propagation -Benchmarking Guide +``` + +```{toctree} +:maxdepth: 2 +:caption: Adding Functionality +:hidden: + Adding a New Operator Adding a New Expression Adding a New Spark Version -Supported Spark Expressions -Supported Spark Configurations -Tracing -Profiling +``` + +```{toctree} +:maxdepth: 2 +:caption: Testing +:hidden: + Comet SQL Tests Spark SQL Tests Iceberg Spark Tests +``` + +```{toctree} +:maxdepth: 2 +:caption: Debugging and Performance +:hidden: + +Debugging Guide +Benchmarking Guide +Profiling +Tracing +``` + +```{toctree} +:maxdepth: 2 +:caption: Reference +:hidden: + +Supported Spark Expressions +Supported Spark Configurations +``` + +```{toctree} +:maxdepth: 2 +:caption: Project Mechanics +:hidden: + Bug Triage -Roadmap Release Process +Roadmap Github and Issue Tracker ``` diff --git a/docs/source/user-guide/latest/compatibility/index.md b/docs/source/user-guide/latest/compatibility/index.md index 59c6a906f1..542d6902ec 100644 --- a/docs/source/user-guide/latest/compatibility/index.md +++ b/docs/source/user-guide/latest/compatibility/index.md @@ -29,15 +29,3 @@ This guide documents areas where Comet's behavior is known to differ from Spark. - **Operators**: operator-level compatibility notes, including window functions and round-robin partitioning. - **Expressions**: per-expression compatibility notes, including cast. - **Spark versions**: version-specific known issues and limitations. - -```{toctree} -:maxdepth: 1 -:hidden: - -scans -floating-point -regex -operators -expressions/index -spark-versions -``` diff --git a/docs/source/user-guide/latest/index.rst b/docs/source/user-guide/latest/index.rst index 9587b2ee03..236f284ce0 100644 --- a/docs/source/user-guide/latest/index.rst +++ b/docs/source/user-guide/latest/index.rst @@ -34,20 +34,56 @@ to read more. .. _toc.user-guide-links-$COMET_VERSION: .. toctree:: :maxdepth: 1 - :caption: Comet $COMET_VERSION User Guide + :caption: Getting Started :hidden: Installing Comet - Building From Source + Configuration Settings + +.. toctree:: + :maxdepth: 1 + :caption: What Comet Supports + :hidden: + Supported Data Sources Supported Data Types Supported Operators Supported Expressions ScalaUDF and Java UDF Support - Configuration Settings - Compatibility Guide + +.. toctree:: + :maxdepth: 1 + :caption: Compatibility + :hidden: + + Overview + compatibility/scans + compatibility/floating-point + compatibility/regex + compatibility/operators + compatibility/expressions/index + compatibility/spark-versions + +.. toctree:: + :maxdepth: 1 + :caption: Operating Comet + :hidden: + Understanding Comet Plans Tuning Guide Metrics Guide + +.. toctree:: + :maxdepth: 1 + :caption: Integrations + :hidden: + Iceberg Guide Kubernetes Guide + +.. toctree:: + :maxdepth: 1 + :caption: Advanced + :hidden: + + Building From Source