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

In documentation on adding a new backend, add missing import and tweak headings #6330

Merged
merged 1 commit into from
Mar 7, 2022
Merged
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
14 changes: 11 additions & 3 deletions doc/internals/how-to-add-new-backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Xarray :py:meth:`~xarray.open_dataset`, and returns a boolean.

Decoders
^^^^^^^^

The decoders implement specific operations to transform data from on-disk
representation to Xarray representation.

Expand Down Expand Up @@ -199,6 +200,11 @@ performs the inverse transformation.

In the following an example on how to use the coders ``decode`` method:

.. ipython:: python
:suppress:

import xarray as xr

.. ipython:: python

var = xr.Variable(
Expand Down Expand Up @@ -239,7 +245,7 @@ interface only the boolean keywords related to the supported decoders.
.. _RST backend_registration:

How to register a backend
+++++++++++++++++++++++++++
+++++++++++++++++++++++++

Define a new entrypoint in your ``setup.py`` (or ``setup.cfg``) with:

Expand Down Expand Up @@ -280,8 +286,9 @@ See https://python-poetry.org/docs/pyproject/#plugins for more information on Po

.. _RST lazy_loading:

How to support Lazy Loading
How to support lazy loading
+++++++++++++++++++++++++++

If you want to make your backend effective with big datasets, then you should
support lazy loading.
Basically, you shall replace the :py:class:`numpy.ndarray` inside the
Expand Down Expand Up @@ -380,8 +387,9 @@ opening files, we therefore suggest to use the helper class provided by Xarray

.. _RST indexing:

Indexing Examples
Indexing examples
^^^^^^^^^^^^^^^^^

**BASIC**

In the ``BASIC`` indexing support, numbers and slices are supported.
Expand Down