Skip to content

DOC: Adding redirects to API moved pages #24909

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

Merged
merged 6 commits into from
Jan 25, 2019
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ asv_bench/pandas/
# Documentation generated files #
#################################
doc/source/generated
doc/source/api/generated
doc/source/reference/api
doc/source/_static
doc/source/vbench
doc/source/vbench.rst
Expand Down
6 changes: 3 additions & 3 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, num_jobs=0, include_api=True, single_doc=None,
if single_doc and single_doc.endswith('.rst'):
self.single_doc_html = os.path.splitext(single_doc)[0] + '.html'
elif single_doc:
self.single_doc_html = 'api/generated/pandas.{}.html'.format(
self.single_doc_html = 'reference/api/pandas.{}.html'.format(
single_doc)

def _process_single_doc(self, single_doc):
Expand All @@ -63,7 +63,7 @@ def _process_single_doc(self, single_doc):

For example, categorial.rst or pandas.DataFrame.head. For the latter,
return the corresponding file path
(e.g. generated/pandas.DataFrame.head.rst).
(e.g. reference/api/pandas.DataFrame.head.rst).
"""
base_name, extension = os.path.splitext(single_doc)
if extension in ('.rst', '.ipynb'):
Expand Down Expand Up @@ -258,7 +258,7 @@ def clean():
Clean documentation generated files.
"""
shutil.rmtree(BUILD_PATH, ignore_errors=True)
shutil.rmtree(os.path.join(SOURCE_PATH, 'api', 'generated'),
shutil.rmtree(os.path.join(SOURCE_PATH, 'reference', 'api'),
ignore_errors=True)

def zip_html(self):
Expand Down
1,535 changes: 1,535 additions & 0 deletions doc/redirects.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/source/index.rst.template
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ See the package overview for more detail about what's in the library.
{{ single_doc[:-4] }}
{% elif single_doc %}
.. autosummary::
:toctree: api/generated/
:toctree: reference/api/

{{ single_doc }}
{% else -%}
Expand All @@ -135,7 +135,7 @@ See the package overview for more detail about what's in the library.
comparison_with_stata
{% endif -%}
{% if include_api -%}
api/index
reference/index
{% endif -%}
{% if not single_doc -%}
development/index
Expand Down
48 changes: 24 additions & 24 deletions doc/source/api/arrays.rst → doc/source/reference/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The top-level :meth:`array` method can be used to create a new array, which may
stored in a :class:`Series`, :class:`Index`, or as a column in a :class:`DataFrame`.

.. autosummary::
:toctree: generated/
:toctree: api/

array

Expand All @@ -48,14 +48,14 @@ or timezone-aware values.
scalar type for timezone-naive or timezone-aware datetime data.

.. autosummary::
:toctree: generated/
:toctree: api/

Timestamp

Properties
~~~~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Timestamp.asm8
Timestamp.day
Expand Down Expand Up @@ -91,7 +91,7 @@ Properties
Methods
~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Timestamp.astimezone
Timestamp.ceil
Expand Down Expand Up @@ -142,7 +142,7 @@ is used.
If the data are tz-aware, then every value in the array must have the same timezone.

.. autosummary::
:toctree: generated/
:toctree: api/

arrays.DatetimeArray
DatetimeTZDtype
Expand All @@ -156,14 +156,14 @@ NumPy can natively represent timedeltas. Pandas provides :class:`Timedelta`
for symmetry with :class:`Timestamp`.

.. autosummary::
:toctree: generated/
:toctree: api/

Timedelta

Properties
~~~~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Timedelta.asm8
Timedelta.components
Expand All @@ -183,7 +183,7 @@ Properties
Methods
~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Timedelta.ceil
Timedelta.floor
Expand All @@ -196,7 +196,7 @@ Methods
A collection of timedeltas may be stored in a :class:`TimedeltaArray`.

.. autosummary::
:toctree: generated/
:toctree: api/

arrays.TimedeltaArray

Expand All @@ -210,14 +210,14 @@ Pandas represents spans of times as :class:`Period` objects.
Period
------
.. autosummary::
:toctree: generated/
:toctree: api/

Period

Properties
~~~~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Period.day
Period.dayofweek
Expand All @@ -244,7 +244,7 @@ Properties
Methods
~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Period.asfreq
Period.now
Expand All @@ -255,7 +255,7 @@ A collection of timedeltas may be stored in a :class:`arrays.PeriodArray`.
Every period in a ``PeriodArray`` must have the same ``freq``.

.. autosummary::
:toctree: generated/
:toctree: api/

arrays.DatetimeArray
PeriodDtype
Expand All @@ -268,14 +268,14 @@ Interval Data
Arbitrary intervals can be represented as :class:`Interval` objects.

.. autosummary::
:toctree: generated/
:toctree: api/

Interval

Properties
~~~~~~~~~~
.. autosummary::
:toctree: generated/
:toctree: api/

Interval.closed
Interval.closed_left
Expand All @@ -291,7 +291,7 @@ Properties
A collection of intervals may be stored in an :class:`IntervalArray`.

.. autosummary::
:toctree: generated/
:toctree: api/

IntervalArray
IntervalDtype
Expand All @@ -305,7 +305,7 @@ Nullable Integer
Pandas provides this through :class:`arrays.IntegerArray`.

.. autosummary::
:toctree: generated/
:toctree: api/

arrays.IntegerArray
Int8Dtype
Expand All @@ -327,21 +327,21 @@ limited, fixed set of values. The dtype of a ``Categorical`` can be described by
a :class:`pandas.api.types.CategoricalDtype`.

.. autosummary::
:toctree: generated/
:toctree: api/
:template: autosummary/class_without_autosummary.rst

CategoricalDtype

.. autosummary::
:toctree: generated/
:toctree: api/

CategoricalDtype.categories
CategoricalDtype.ordered

Categorical data can be stored in a :class:`pandas.Categorical`

.. autosummary::
:toctree: generated/
:toctree: api/
:template: autosummary/class_without_autosummary.rst

Categorical
Expand All @@ -350,14 +350,14 @@ The alternative :meth:`Categorical.from_codes` constructor can be used when you
have the categories and integer codes already:

.. autosummary::
:toctree: generated/
:toctree: api/

Categorical.from_codes

The dtype information is available on the ``Categorical``

.. autosummary::
:toctree: generated/
:toctree: api/

Categorical.dtype
Categorical.categories
Expand All @@ -368,7 +368,7 @@ The dtype information is available on the ``Categorical``
the Categorical back to a NumPy array, so categories and order information is not preserved!

.. autosummary::
:toctree: generated/
:toctree: api/

Categorical.__array__

Expand All @@ -391,7 +391,7 @@ Data where a single value is repeated many times (e.g. ``0`` or ``NaN``) may
be stored efficiently as a :class:`SparseArray`.

.. autosummary::
:toctree: generated/
:toctree: api/

SparseArray
SparseDtype
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These are primarily intended for library authors looking to extend pandas
objects.

.. autosummary::
:toctree: generated/
:toctree: api/

api.extensions.register_extension_dtype
api.extensions.register_dataframe_accessor
Expand Down
Loading