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

Backport PR #25134 on branch 0.24.x (DOC: restore toctree maxdepth) #25664

Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions doc/source/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Development
===========

.. If you update this toctree, also update the manual toctree in the
main index.rst.template

.. toctree::
:maxdepth: 2

Expand Down
3 changes: 3 additions & 0 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Getting started
===============

.. If you update this toctree, also update the manual toctree in the
main index.rst.template

.. toctree::
:maxdepth: 2

Expand Down
70 changes: 67 additions & 3 deletions doc/source/index.rst.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See the :ref:`overview` for more detail about what's in the library.

{% if single_doc and single_doc.endswith('.rst') -%}
.. toctree::
:maxdepth: 2
:maxdepth: 3

{{ single_doc[:-4] }}
{% elif single_doc %}
Expand All @@ -35,7 +35,8 @@ See the :ref:`overview` for more detail about what's in the library.
{{ single_doc }}
{% else -%}
.. toctree::
:maxdepth: 2
:maxdepth: 3
:hidden:
{% endif %}

{% if not single_doc -%}
Expand All @@ -51,4 +52,67 @@ See the :ref:`overview` for more detail about what's in the library.
{% if not single_doc -%}
development/index
whatsnew/index
{% endif -%}
{% endif -%}


* :doc:`whatsnew/v0.25.0`
* :doc:`install`
* :doc:`getting_started/index`

* :doc:`getting_started/overview`
* :doc:`getting_started/10min`
* :doc:`getting_started/basics`
* :doc:`getting_started/dsintro`
* :doc:`getting_started/comparison/index`
* :doc:`getting_started/tutorials`

* :doc:`user_guide/index`

* :doc:`user_guide/io`
* :doc:`user_guide/indexing`
* :doc:`user_guide/advanced`
* :doc:`user_guide/merging`
* :doc:`user_guide/reshaping`
* :doc:`user_guide/text`
* :doc:`user_guide/missing_data`
* :doc:`user_guide/categorical`
* :doc:`user_guide/integer_na`
* :doc:`user_guide/visualization`
* :doc:`user_guide/computation`
* :doc:`user_guide/groupby`
* :doc:`user_guide/timeseries`
* :doc:`user_guide/timedeltas`
* :doc:`user_guide/style`
* :doc:`user_guide/options`
* :doc:`user_guide/enhancingperf`
* :doc:`user_guide/sparse`
* :doc:`user_guide/gotchas`
* :doc:`user_guide/cookbook`

* :doc:`ecosystem`
* :doc:`reference/index`

* :doc:`reference/io`
* :doc:`reference/general_functions`
* :doc:`reference/series`
* :doc:`reference/frame`
* :doc:`reference/arrays`
* :doc:`reference/panel`
* :doc:`reference/indexing`
* :doc:`reference/offset_frequency`
* :doc:`reference/window`
* :doc:`reference/groupby`
* :doc:`reference/resampling`
* :doc:`reference/style`
* :doc:`reference/plotting`
* :doc:`reference/general_utility_functions`
* :doc:`reference/extensions`

* :doc:`development/index`

* :doc:`development/contributing`
* :doc:`development/internals`
* :doc:`development/extending`
* :doc:`development/developer`

* :doc:`whatsnew/index`
65 changes: 34 additions & 31 deletions doc/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public functions related to data types in pandas.

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

.. If you update this toctree, also update the manual toctree in the
main index.rst.template

.. toctree::
:maxdepth: 2

Expand All @@ -41,40 +44,40 @@ public functions related to data types in pandas.
.. This is to prevent warnings in the doc build. We don't want to encourage
.. these methods.

.. toctree::
:hidden:

api/pandas.DataFrame.blocks
api/pandas.DataFrame.as_matrix
api/pandas.DataFrame.ix
api/pandas.Index.asi8
api/pandas.Index.data
api/pandas.Index.flags
api/pandas.Index.holds_integer
api/pandas.Index.is_type_compatible
api/pandas.Index.nlevels
api/pandas.Index.sort
api/pandas.Panel.agg
api/pandas.Panel.aggregate
api/pandas.Panel.blocks
api/pandas.Panel.empty
api/pandas.Panel.is_copy
api/pandas.Panel.items
api/pandas.Panel.ix
api/pandas.Panel.major_axis
api/pandas.Panel.minor_axis
api/pandas.Series.asobject
api/pandas.Series.blocks
api/pandas.Series.from_array
api/pandas.Series.ix
api/pandas.Series.imag
api/pandas.Series.real
..
.. toctree::

api/pandas.DataFrame.blocks
api/pandas.DataFrame.as_matrix
api/pandas.DataFrame.ix
api/pandas.Index.asi8
api/pandas.Index.data
api/pandas.Index.flags
api/pandas.Index.holds_integer
api/pandas.Index.is_type_compatible
api/pandas.Index.nlevels
api/pandas.Index.sort
api/pandas.Panel.agg
api/pandas.Panel.aggregate
api/pandas.Panel.blocks
api/pandas.Panel.empty
api/pandas.Panel.is_copy
api/pandas.Panel.items
api/pandas.Panel.ix
api/pandas.Panel.major_axis
api/pandas.Panel.minor_axis
api/pandas.Series.asobject
api/pandas.Series.blocks
api/pandas.Series.from_array
api/pandas.Series.ix
api/pandas.Series.imag
api/pandas.Series.real


.. Can't convince sphinx to generate toctree for this class attribute.
.. So we do it manually to avoid a warning

.. toctree::
:hidden:
..
.. toctree::

api/pandas.api.extensions.ExtensionDtype.na_value
api/pandas.api.extensions.ExtensionDtype.na_value
4 changes: 2 additions & 2 deletions doc/source/themes/nature_with_gtoc/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{%- block sidebar1 %}
{%- block sidebartoc %}
<h3>{{ _('Table Of Contents') }}</h3>
{{ toctree() }}
{{ toctree(includehidden=True) }}
{%- endblock %}
{%- block sidebarsearch %}
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
Expand Down Expand Up @@ -105,4 +105,4 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endblock %}
{% endblock %}
3 changes: 3 additions & 0 deletions doc/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Users brand-new to pandas should start with :ref:`10min`.
Further information on any specific method can be obtained in the
:ref:`api`.

.. If you update this toctree, also update the manual toctree in the
main index.rst.template

.. toctree::
:maxdepth: 2

Expand Down