Skip to content

Commit d073622

Browse files
remigathoniremigathonipre-commit-ci[bot]
authored
Use more descriptive link texts (#7625)
* Use more descriptive link texts * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix link target name * Fix typos --------- Co-authored-by: remigathoni <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 70c8534 commit d073622

10 files changed

+42
-46
lines changed

doc/contributing.rst

+8-9
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Bug reports and enhancement requests
3535

3636
Bug reports are an important part of making *xarray* more stable. Having a complete bug
3737
report will allow others to reproduce the bug and provide insight into fixing. See
38-
`this stackoverflow article <https://stackoverflow.com/help/mcve>`_ for tips on
39-
writing a good bug report.
38+
this `stackoverflow article for tips on
39+
writing a good bug report <https://stackoverflow.com/help/mcve>`_ .
4040

4141
Trying out the bug-producing code on the *main* branch is often a worthwhile exercise
4242
to confirm that the bug still exists. It is also worth searching existing bug reports and
@@ -102,7 +102,7 @@ Some great resources for learning Git:
102102
Getting started with Git
103103
------------------------
104104

105-
`GitHub has instructions <https://help.github.com/set-up-git-redirect>`__ for installing git,
105+
`GitHub has instructions for setting up Git <https://help.github.com/set-up-git-redirect>`__ including installing git,
106106
setting up your SSH key, and configuring git. All these steps need to be completed before
107107
you can work seamlessly between your local repository and GitHub.
108108

@@ -238,7 +238,7 @@ To return to your root environment::
238238

239239
conda deactivate
240240

241-
See the full conda docs `here <http://conda.pydata.org/docs>`__.
241+
See the full `conda docs here <http://conda.pydata.org/docs>`__.
242242

243243
.. _contributing.documentation:
244244

@@ -277,7 +277,7 @@ Some other important things to know about the docs:
277277

278278
- The docstrings follow the **NumPy Docstring Standard**, which is used widely
279279
in the Scientific Python community. This standard specifies the format of
280-
the different sections of the docstring. See `this document
280+
the different sections of the docstring. Refer to the `documentation for the Numpy docstring format
281281
<https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard>`_
282282
for a detailed explanation, or look at some of the existing functions to
283283
extend it in a similar manner.
@@ -732,8 +732,8 @@ or, to use a specific Python interpreter,::
732732
This will display stderr from the benchmarks, and use your local
733733
``python`` that comes from your ``$PATH``.
734734
735-
Information on how to write a benchmark and how to use asv can be found in the
736-
`asv documentation <https://asv.readthedocs.io/en/latest/writing_benchmarks.html>`_.
735+
Learn `how to write a benchmark and how to use asv from the documentation <https://asv.readthedocs.io/en/latest/writing_benchmarks.html>`_ .
736+
737737
738738
..
739739
TODO: uncomment once we have a working setup
@@ -752,8 +752,7 @@ GitHub issue number when adding your entry (using ``:issue:`1234```, where ``123
752752
issue/pull request number).
753753
754754
If your code is an enhancement, it is most likely necessary to add usage
755-
examples to the existing documentation. This can be done following the section
756-
regarding documentation :ref:`above <contributing.documentation>`.
755+
examples to the existing documentation. This can be done by following the :ref:`guidelines for contributing to the documentation <contributing.documentation>`.
757756
758757
.. _contributing.changes:
759758

doc/developers-meeting.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Xarray developers meet bi-weekly every other Wednesday.
55

66
The meeting occurs on `Zoom <https://us02web.zoom.us/j/88251613296?pwd=azZsSkU1UWJZTVFKNnhIUVdZcENUZz09>`__.
77

8-
Notes for the meeting are kept `here <https://hackmd.io/@U4W-olO3TX-hc-cvbjNe4A/xarray-dev-meeting/edit>`__.
8+
Find the `notes for the meeting here <https://hackmd.io/@U4W-olO3TX-hc-cvbjNe4A/xarray-dev-meeting/edit>`__.
99

10-
There is a :issue:`GitHub issue <4001>` for changes to the meeting.
10+
There is a :issue:`GitHub issue for changes to the meeting<4001>`.
1111

1212
You can subscribe to this calendar to be notified of changes:
1313

doc/user-guide/computation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ to set ``axis=-1``. As an example, here is how we would wrap
804804
Because ``apply_ufunc`` follows a standard convention for ufuncs, it plays
805805
nicely with tools for building vectorized functions, like
806806
:py:func:`numpy.broadcast_arrays` and :py:class:`numpy.vectorize`. For high performance
807-
needs, consider using Numba's :doc:`vectorize and guvectorize <numba:user/vectorize>`.
807+
needs, consider using :doc:`Numba's vectorize and guvectorize <numba:user/vectorize>`.
808808

809809
In addition to wrapping functions, ``apply_ufunc`` can automatically parallelize
810810
many functions when using dask by setting ``dask='parallelized'``. See

doc/user-guide/dask.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The actual computation is controlled by a multi-processing or thread pool,
3939
which allows Dask to take full advantage of multiple processors available on
4040
most modern computers.
4141

42-
For more details on Dask, read `its documentation <https://docs.dask.org/>`__.
42+
For more details, read the `Dask documentation <https://docs.dask.org/>`__.
4343
Note that xarray only makes use of ``dask.array`` and ``dask.delayed``.
4444

4545
.. _dask.io:
@@ -234,7 +234,7 @@ disk.
234234
.. note::
235235

236236
For more on the differences between :py:meth:`~xarray.Dataset.persist` and
237-
:py:meth:`~xarray.Dataset.compute` see this `Stack Overflow answer <https://stackoverflow.com/questions/41806850/dask-difference-between-client-persist-and-client-compute>`_ and the `Dask documentation <https://distributed.dask.org/en/latest/manage-computation.html#dask-collections-to-futures>`_.
237+
:py:meth:`~xarray.Dataset.compute` see this `Stack Overflow answer on the differences between client persist and client compute <https://stackoverflow.com/questions/41806850/dask-difference-between-client-persist-and-client-compute>`_ and the `Dask documentation <https://distributed.dask.org/en/latest/manage-computation.html#dask-collections-to-futures>`_.
238238

239239
For performance you may wish to consider chunk sizes. The correct choice of
240240
chunk size depends both on your data and on the operations you want to perform.
@@ -549,7 +549,7 @@ larger chunksizes.
549549

550550
.. tip::
551551

552-
Check out the dask documentation on `chunks <https://docs.dask.org/en/latest/array-chunks.html>`_.
552+
Check out the `dask documentation on chunks <https://docs.dask.org/en/latest/array-chunks.html>`_.
553553

554554

555555
Optimization Tips
@@ -562,7 +562,7 @@ through experience:
562562
1. Do your spatial and temporal indexing (e.g. ``.sel()`` or ``.isel()``) early in the pipeline, especially before calling ``resample()`` or ``groupby()``. Grouping and resampling triggers some computation on all the blocks, which in theory should commute with indexing, but this optimization hasn't been implemented in Dask yet. (See `Dask issue #746 <https://github.com/dask/dask/issues/746>`_).
563563

564564
2. More generally, ``groupby()`` is a costly operation and will perform a lot better if the ``flox`` package is installed.
565-
See the `flox documentation <flox.readthedocs.io/>`_ for more. By default Xarray will use ``flox`` if installed.
565+
See the `flox documentation <https://flox.readthedocs.io>`_ for more. By default Xarray will use ``flox`` if installed.
566566

567567
3. Save intermediate results to disk as a netCDF files (using ``to_netcdf()``) and then load them again with ``open_dataset()`` for further computations. For example, if subtracting temporal mean from a dataset, save the temporal mean to disk before subtracting. Again, in theory, Dask should be able to do the computation in a streaming fashion, but in practice this is a fail case for the Dask scheduler, because it tries to keep every chunk of an array that it computes in memory. (See `Dask issue #874 <https://github.com/dask/dask/issues/874>`_)
568568

@@ -572,6 +572,6 @@ through experience:
572572

573573
6. Using the h5netcdf package by passing ``engine='h5netcdf'`` to :py:meth:`~xarray.open_mfdataset` can be quicker than the default ``engine='netcdf4'`` that uses the netCDF4 package.
574574

575-
7. Some dask-specific tips may be found `here <https://docs.dask.org/en/latest/array-best-practices.html>`_.
575+
7. Find `best practices specific to Dask arrays in the documentation <https://docs.dask.org/en/latest/array-best-practices.html>`_.
576576

577-
8. The dask `diagnostics <https://docs.dask.org/en/latest/understanding-performance.html>`_ can be useful in identifying performance bottlenecks.
577+
8. The `dask diagnostics <https://docs.dask.org/en/latest/understanding-performance.html>`_ can be useful in identifying performance bottlenecks.

doc/user-guide/groupby.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ the same pipeline.
2525
.. tip::
2626

2727
To substantially improve the performance of GroupBy operations, particularly
28-
with dask install the `flox <https://flox.readthedocs.io>`_ package. flox also
29-
`extends <https://flox.readthedocs.io/en/latest/xarray.html>`_
30-
Xarray's in-built GroupBy capabilities by allowing grouping by multiple variables,
31-
and lazy grouping by dask arrays. Xarray will automatically use flox by default
32-
if it is installed.
33-
28+
with dask `install the flox package <https://flox.readthedocs.io>`_. flox
29+
`extends Xarray's in-built GroupBy capabilities <https://flox.readthedocs.io/en/latest/xarray.html>`_
30+
by allowing grouping by multiple variables, and lazy grouping by dask arrays. If installed, Xarray will automatically use flox by default.
3431

3532
Split
3633
~~~~~

doc/user-guide/indexing.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ In this example, the selected is a subpart of the array
9595
in the range '2000-01-01':'2000-01-02' along the first coordinate `time`
9696
and with 'IA' value from the second coordinate `space`.
9797

98-
You can perform any of the label indexing operations `supported by pandas`__,
98+
You can perform any of the `label indexing operations supported by pandas`__,
9999
including indexing with individual, slices and lists/arrays of labels, as well as
100100
indexing with boolean arrays. Like pandas, label based indexing in xarray is
101101
*inclusive* of both the start and stop bounds.
@@ -140,14 +140,14 @@ use them explicitly to slice data. There are two ways to do this:
140140
141141
The arguments to these methods can be any objects that could index the array
142142
along the dimension given by the keyword, e.g., labels for an individual value,
143-
Python :py:class:`slice` objects or 1-dimensional arrays.
143+
:py:class:`Python slice` objects or 1-dimensional arrays.
144144

145145

146146
.. note::
147147

148148
We would love to be able to do indexing with labeled dimension names inside
149-
brackets, but unfortunately, Python `does yet not support`__ indexing with
150-
keyword arguments like ``da[space=0]``
149+
brackets, but unfortunately, `Python does not yet support indexing with
150+
keyword arguments`__ like ``da[space=0]``
151151

152152
__ https://legacy.python.org/dev/peps/pep-0472/
153153

@@ -372,12 +372,12 @@ indexers' dimension:
372372
ind = xr.DataArray([[0, 1], [0, 1]], dims=["a", "b"])
373373
da[ind]
374374
375-
Similar to how NumPy's `advanced indexing`_ works, vectorized
375+
Similar to how `NumPy's advanced indexing`_ works, vectorized
376376
indexing for xarray is based on our
377377
:ref:`broadcasting rules <compute.broadcasting>`.
378378
See :ref:`indexing.rules` for the complete specification.
379379

380-
.. _advanced indexing: https://numpy.org/doc/stable/reference/arrays.indexing.html
380+
.. _NumPy's advanced indexing: https://numpy.org/doc/stable/reference/arrays.indexing.html
381381

382382
Vectorized indexing also works with ``isel``, ``loc``, and ``sel``:
383383

doc/user-guide/io.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,9 @@ instance and pass this, as follows:
684684
Zarr Compressors and Filters
685685
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
686686

687-
There are many different options for compression and filtering possible with
688-
zarr. These are described in the
689-
`zarr documentation <https://zarr.readthedocs.io/en/stable/tutorial.html#compressors>`_.
687+
There are many different `options for compression and filtering possible with
688+
zarr <https://zarr.readthedocs.io/en/stable/tutorial.html#compressors>`_.
689+
690690
These options can be passed to the ``to_zarr`` method as variable encoding.
691691
For example:
692692

@@ -720,7 +720,7 @@ As of xarray version 0.18, xarray by default uses a feature called
720720
*consolidated metadata*, storing all metadata for the entire dataset with a
721721
single key (by default called ``.zmetadata``). This typically drastically speeds
722722
up opening the store. (For more information on this feature, consult the
723-
`zarr docs <https://zarr.readthedocs.io/en/latest/tutorial.html#consolidating-metadata>`_.)
723+
`zarr docs on consolidating metadata <https://zarr.readthedocs.io/en/latest/tutorial.html#consolidating-metadata>`_.)
724724

725725
By default, xarray writes consolidated metadata and attempts to read stores
726726
with consolidated metadata, falling back to use non-consolidated metadata for
@@ -1165,7 +1165,7 @@ rasterio is installed. Here is an example of how to use
11651165

11661166
Deprecated in favor of rioxarray.
11671167
For information about transitioning, see:
1168-
https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html
1168+
`rioxarray getting started docs<https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html>``
11691169

11701170
.. ipython::
11711171
:verbatim:
@@ -1277,7 +1277,7 @@ Formats supported by PyNIO
12771277

12781278
.. warning::
12791279

1280-
The PyNIO backend is deprecated_. PyNIO is no longer maintained_.
1280+
The `PyNIO backend is deprecated`_. `PyNIO is no longer maintained`_.
12811281

12821282
Xarray can also read GRIB, HDF4 and other file formats supported by PyNIO_,
12831283
if PyNIO is installed. To use PyNIO to read such files, supply
@@ -1288,8 +1288,8 @@ We recommend installing PyNIO via conda::
12881288
conda install -c conda-forge pynio
12891289

12901290
.. _PyNIO: https://www.pyngl.ucar.edu/Nio.shtml
1291-
.. _deprecated: https://github.com/pydata/xarray/issues/4491
1292-
.. _maintained: https://github.com/NCAR/pynio/issues/53
1291+
.. _PyNIO backend is deprecated: https://github.com/pydata/xarray/issues/4491
1292+
.. _PyNIO is no longer maintained: https://github.com/NCAR/pynio/issues/53
12931293

12941294
.. _io.PseudoNetCDF:
12951295

doc/user-guide/pandas.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Working with pandas
88
One of the most important features of xarray is the ability to convert to and
99
from :py:mod:`pandas` objects to interact with the rest of the PyData
1010
ecosystem. For example, for plotting labeled data, we highly recommend
11-
using the visualization `built in to pandas itself`__ or provided by the pandas
11+
using the `visualization built in to pandas itself`__ or provided by the pandas
1212
aware libraries such as `Seaborn`__.
1313

1414
__ https://pandas.pydata.org/pandas-docs/stable/visualization.html
@@ -168,7 +168,7 @@ multi-dimensional arrays to xarray.
168168
Xarray has most of ``Panel``'s features, a more explicit API (particularly around
169169
indexing), and the ability to scale to >3 dimensions with the same interface.
170170

171-
As discussed :ref:`elsewhere <data structures>` in the docs, there are two primary data structures in
171+
As discussed in the :ref:`data structures section of the docs <data structures>`, there are two primary data structures in
172172
xarray: ``DataArray`` and ``Dataset``. You can imagine a ``DataArray`` as a
173173
n-dimensional pandas ``Series`` (i.e. a single typed array), and a ``Dataset``
174174
as the ``DataFrame`` equivalent (i.e. a dict of aligned ``DataArray`` objects).
@@ -240,6 +240,6 @@ While the xarray docs are relatively complete, a few items stand out for Panel u
240240
the Person dimension of a Dataset of Person x Score x Time.
241241

242242
While xarray may take some getting used to, it's worth it! If anything is unclear,
243-
please post an issue on `GitHub <https://github.com/pydata/xarray>`__ or
243+
please `post an issue on GitHub <https://github.com/pydata/xarray>`__ or
244244
`StackOverflow <https://stackoverflow.com/questions/tagged/python-xarray>`__,
245245
and we'll endeavor to respond to the specific case or improve the general docs.

doc/user-guide/time-series.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ For more details, read the pandas documentation and the section on :ref:`datetim
108108
Datetime components
109109
-------------------
110110

111-
Similar `to pandas`_, the components of datetime objects contained in a
111+
Similar to `pandas accessors`_, the components of datetime objects contained in a
112112
given ``DataArray`` can be quickly computed using a special ``.dt`` accessor.
113113

114-
.. _to pandas: https://pandas.pydata.org/pandas-docs/stable/basics.html#basics-dt-accessors
114+
.. _pandas accessors: https://pandas.pydata.org/pandas-docs/stable/basics.html#basics-dt-accessors
115115

116116
.. ipython:: python
117117

doc/user-guide/weather-climate.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Weather and climate data
1010
1111
import xarray as xr
1212
13-
Xarray can leverage metadata that follows the `Climate and Forecast (CF) conventions`_ if present. Examples include automatic labelling of plots with descriptive names and units if proper metadata is present (see :ref:`plotting`) and support for non-standard calendars used in climate science through the ``cftime`` module (see :ref:`CFTimeIndex`). There are also a number of geosciences-focused projects that build on xarray (see :ref:`ecosystem`).
13+
Xarray can leverage metadata that follows the `Climate and Forecast (CF) conventions`_ if present. Examples include :ref:`automatic labelling of plots<plotting>` with descriptive names and units if proper metadata is present and support for non-standard calendars used in climate science through the ``cftime`` module(Explained in the :ref:`CFTimeIndex` section). There are also a number of :ref:`geosciences-focused projects that build on xarray<ecosystem>`.
1414

1515
.. _Climate and Forecast (CF) conventions: https://cfconventions.org
1616

@@ -49,10 +49,10 @@ variable with the attribute, rather than with the dimensions.
4949
CF-compliant coordinate variables
5050
---------------------------------
5151

52-
`MetPy`_ adds a ``metpy`` accessor that allows accessing coordinates with appropriate CF metadata using generic names ``x``, ``y``, ``vertical`` and ``time``. There is also a `cartopy_crs` attribute that provides projection information, parsed from the appropriate CF metadata, as a `Cartopy`_ projection object. See `their documentation`_ for more information.
52+
`MetPy`_ adds a ``metpy`` accessor that allows accessing coordinates with appropriate CF metadata using generic names ``x``, ``y``, ``vertical`` and ``time``. There is also a `cartopy_crs` attribute that provides projection information, parsed from the appropriate CF metadata, as a `Cartopy`_ projection object. See the `metpy documentation`_ for more information.
5353

5454
.. _`MetPy`: https://unidata.github.io/MetPy/dev/index.html
55-
.. _`their documentation`: https://unidata.github.io/MetPy/dev/tutorials/xarray_tutorial.html#coordinates
55+
.. _`metpy documentation`: https://unidata.github.io/MetPy/dev/tutorials/xarray_tutorial.html#coordinates
5656
.. _`Cartopy`: https://scitools.org.uk/cartopy/docs/latest/crs/projections.html
5757

5858
.. _CFTimeIndex:

0 commit comments

Comments
 (0)