Skip to content

Commit dc7b466

Browse files
DOC: restore toctree maxdepth (#25134)
* DOC: restore toctree maxdepth * make it hidden + make sure it is still in sidebar * Add toctree for front page manually * use commented toctree's instead of hidden for api pages to avoid warnings * 0.24.1 -> 0.25.0 * add comment in subsection toctrees to also update main manual toctree
1 parent 6375549 commit dc7b466

File tree

6 files changed

+112
-36
lines changed

6 files changed

+112
-36
lines changed

doc/source/development/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Development
77
===========
88

9+
.. If you update this toctree, also update the manual toctree in the
10+
main index.rst.template
11+
912
.. toctree::
1013
:maxdepth: 2
1114

doc/source/getting_started/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Getting started
77
===============
88

9+
.. If you update this toctree, also update the manual toctree in the
10+
main index.rst.template
11+
912
.. toctree::
1013
:maxdepth: 2
1114

doc/source/index.rst.template

+67-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See the :ref:`overview` for more detail about what's in the library.
2525

2626
{% if single_doc and single_doc.endswith('.rst') -%}
2727
.. toctree::
28-
:maxdepth: 2
28+
:maxdepth: 3
2929

3030
{{ single_doc[:-4] }}
3131
{% elif single_doc %}
@@ -35,7 +35,8 @@ See the :ref:`overview` for more detail about what's in the library.
3535
{{ single_doc }}
3636
{% else -%}
3737
.. toctree::
38-
:maxdepth: 2
38+
:maxdepth: 3
39+
:hidden:
3940
{% endif %}
4041

4142
{% if not single_doc -%}
@@ -51,4 +52,67 @@ See the :ref:`overview` for more detail about what's in the library.
5152
{% if not single_doc -%}
5253
development/index
5354
whatsnew/index
54-
{% endif -%}
55+
{% endif -%}
56+
57+
58+
* :doc:`whatsnew/v0.25.0`
59+
* :doc:`install`
60+
* :doc:`getting_started/index`
61+
62+
* :doc:`getting_started/overview`
63+
* :doc:`getting_started/10min`
64+
* :doc:`getting_started/basics`
65+
* :doc:`getting_started/dsintro`
66+
* :doc:`getting_started/comparison/index`
67+
* :doc:`getting_started/tutorials`
68+
69+
* :doc:`user_guide/index`
70+
71+
* :doc:`user_guide/io`
72+
* :doc:`user_guide/indexing`
73+
* :doc:`user_guide/advanced`
74+
* :doc:`user_guide/merging`
75+
* :doc:`user_guide/reshaping`
76+
* :doc:`user_guide/text`
77+
* :doc:`user_guide/missing_data`
78+
* :doc:`user_guide/categorical`
79+
* :doc:`user_guide/integer_na`
80+
* :doc:`user_guide/visualization`
81+
* :doc:`user_guide/computation`
82+
* :doc:`user_guide/groupby`
83+
* :doc:`user_guide/timeseries`
84+
* :doc:`user_guide/timedeltas`
85+
* :doc:`user_guide/style`
86+
* :doc:`user_guide/options`
87+
* :doc:`user_guide/enhancingperf`
88+
* :doc:`user_guide/sparse`
89+
* :doc:`user_guide/gotchas`
90+
* :doc:`user_guide/cookbook`
91+
92+
* :doc:`ecosystem`
93+
* :doc:`reference/index`
94+
95+
* :doc:`reference/io`
96+
* :doc:`reference/general_functions`
97+
* :doc:`reference/series`
98+
* :doc:`reference/frame`
99+
* :doc:`reference/arrays`
100+
* :doc:`reference/panel`
101+
* :doc:`reference/indexing`
102+
* :doc:`reference/offset_frequency`
103+
* :doc:`reference/window`
104+
* :doc:`reference/groupby`
105+
* :doc:`reference/resampling`
106+
* :doc:`reference/style`
107+
* :doc:`reference/plotting`
108+
* :doc:`reference/general_utility_functions`
109+
* :doc:`reference/extensions`
110+
111+
* :doc:`development/index`
112+
113+
* :doc:`development/contributing`
114+
* :doc:`development/internals`
115+
* :doc:`development/extending`
116+
* :doc:`development/developer`
117+
118+
* :doc:`whatsnew/index`

doc/source/reference/index.rst

+34-31
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public functions related to data types in pandas.
1919

2020
The ``pandas.core``, ``pandas.compat``, and ``pandas.util`` top-level modules are PRIVATE. Stable functionality in such modules is not guaranteed.
2121

22+
.. If you update this toctree, also update the manual toctree in the
23+
main index.rst.template
24+
2225
.. toctree::
2326
:maxdepth: 2
2427

@@ -41,40 +44,40 @@ public functions related to data types in pandas.
4144
.. This is to prevent warnings in the doc build. We don't want to encourage
4245
.. these methods.
4346
44-
.. toctree::
45-
:hidden:
46-
47-
api/pandas.DataFrame.blocks
48-
api/pandas.DataFrame.as_matrix
49-
api/pandas.DataFrame.ix
50-
api/pandas.Index.asi8
51-
api/pandas.Index.data
52-
api/pandas.Index.flags
53-
api/pandas.Index.holds_integer
54-
api/pandas.Index.is_type_compatible
55-
api/pandas.Index.nlevels
56-
api/pandas.Index.sort
57-
api/pandas.Panel.agg
58-
api/pandas.Panel.aggregate
59-
api/pandas.Panel.blocks
60-
api/pandas.Panel.empty
61-
api/pandas.Panel.is_copy
62-
api/pandas.Panel.items
63-
api/pandas.Panel.ix
64-
api/pandas.Panel.major_axis
65-
api/pandas.Panel.minor_axis
66-
api/pandas.Series.asobject
67-
api/pandas.Series.blocks
68-
api/pandas.Series.from_array
69-
api/pandas.Series.ix
70-
api/pandas.Series.imag
71-
api/pandas.Series.real
47+
..
48+
.. toctree::
49+
50+
api/pandas.DataFrame.blocks
51+
api/pandas.DataFrame.as_matrix
52+
api/pandas.DataFrame.ix
53+
api/pandas.Index.asi8
54+
api/pandas.Index.data
55+
api/pandas.Index.flags
56+
api/pandas.Index.holds_integer
57+
api/pandas.Index.is_type_compatible
58+
api/pandas.Index.nlevels
59+
api/pandas.Index.sort
60+
api/pandas.Panel.agg
61+
api/pandas.Panel.aggregate
62+
api/pandas.Panel.blocks
63+
api/pandas.Panel.empty
64+
api/pandas.Panel.is_copy
65+
api/pandas.Panel.items
66+
api/pandas.Panel.ix
67+
api/pandas.Panel.major_axis
68+
api/pandas.Panel.minor_axis
69+
api/pandas.Series.asobject
70+
api/pandas.Series.blocks
71+
api/pandas.Series.from_array
72+
api/pandas.Series.ix
73+
api/pandas.Series.imag
74+
api/pandas.Series.real
7275

7376

7477
.. Can't convince sphinx to generate toctree for this class attribute.
7578
.. So we do it manually to avoid a warning
7679
77-
.. toctree::
78-
:hidden:
80+
..
81+
.. toctree::
7982
80-
api/pandas.api.extensions.ExtensionDtype.na_value
83+
api/pandas.api.extensions.ExtensionDtype.na_value

doc/source/themes/nature_with_gtoc/layout.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{%- block sidebar1 %}
2020
{%- block sidebartoc %}
2121
<h3>{{ _('Table Of Contents') }}</h3>
22-
{{ toctree() }}
22+
{{ toctree(includehidden=True) }}
2323
{%- endblock %}
2424
{%- block sidebarsearch %}
2525
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
@@ -105,4 +105,4 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
105105
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
106106
})();
107107
</script>
108-
{% endblock %}
108+
{% endblock %}

doc/source/user_guide/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Users brand-new to pandas should start with :ref:`10min`.
1515
Further information on any specific method can be obtained in the
1616
:ref:`api`.
1717

18+
.. If you update this toctree, also update the manual toctree in the
19+
main index.rst.template
20+
1821
.. toctree::
1922
:maxdepth: 2
2023

0 commit comments

Comments
 (0)