Skip to content

Commit

Permalink
Enhance documentation (#7)
Browse files Browse the repository at this point in the history
Changed to APACHE license; enhanced documentation
  • Loading branch information
crusaderky authored Nov 23, 2018
1 parent 9d8207f commit e3bdfec
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 172 deletions.
356 changes: 191 additions & 165 deletions LICENSE

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'dask': ('https://dask.pydata.org/en/latest/', None),
'dask': ('https://docs.dask.org/en/latest/', None),
'distributed': ('https://distributed.dask.org/en/latest/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'numba': ('https://numba.pydata.org/numba-doc/latest/', None),
Expand Down
35 changes: 33 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
xarray_extras: Advanced algorithms for xarray
=============================================
This module offers several extensions to :mod:`xarray`, which could not be
included into the main xarray module because they fall into one or more of the
following categories:

- They're too experimental
- They're too niche
- They introduce major new dependencies (e.g. :mod:`numba` or a C compiler)
- They would be better done by doing major rework on multiple packages, and
then one would need to wait for said changes to reach a stable release of
each package - *in the right order*.

The API of xarray-extras is unstable by definition, as features will be
progressively migrated upwards towards xarray, dask, numpy etc.

Features
--------
:doc:`api/csv`
Multi-threaded CSV writer, much faster than
:meth:`pandas.DataFrame.to_csv`, with full support for :mod:`dask` and
:mod:`distributed`
:doc:`api/cumulatives`
Advanced cumulative sum/productory/mean functions
:doc:`api/interpolate`
dask-optimized n-dimensional spline interpolation
:doc:`api/numba_extras`
Additions to :mod:`numba`
:doc:`api/sort`
Advanced sort/take functions

Index
-----

.. toctree::

Expand All @@ -20,6 +51,6 @@ API Reference
License
-------

xarray_extras is available under the open source `LGPL License`__.
xarray-extras is available under the open source `Apache License`__.

__ https://www.gnu.org/licenses/lgpl-3.0.en.html
__ http://www.apache.org/licenses/LICENSE-2.0.html
7 changes: 7 additions & 0 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Required dependencies
- `numba <http://numba.pydata.org>`__
- C compiler (only if building from sources)

Deployment
----------

- With pip: :command:`pip install xarray-extras`
- With `anaconda <https://www.anaconda.com/>`_:
:command:`conda install -c conda-forge xarray-extras`

Testing
-------

Expand Down
1 change: 1 addition & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ What's New

v0.3.0 (unreleased)
-------------------
- Changed license to Apache 2.0


.. _whats-new.0.2.2:
Expand Down
7 changes: 5 additions & 2 deletions xarray_extras/csv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""CSV file type support
"""Multi-threaded CSV writer, much faster than
:meth:`pandas.DataFrame.to_csv`, with full support for :mod:`dask` and
:mod:`distributed`
"""
import xarray
from dask.base import tokenize
Expand All @@ -13,7 +15,8 @@
def to_csv(x, path, *, nogil=True, **kwargs):
"""Print DataArray to CSV.
When x has numpy backend, this function is equivalent to::
When x has numpy backend, this function is functionally equivalent to (but
much) faster than)::
x.to_pandas().to_csv(path_or_buf, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion xarray_extras/cumulatives.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""xarray extensions to cumsum and cumprod
"""Advanced cumulative sum/productory/mean functions
"""
import dask.array as da
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion xarray_extras/interpolate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""xarray interpolation functions
"""xarray spline interpolation functions
"""
import xarray
import numpy as np
Expand Down

0 comments on commit e3bdfec

Please sign in to comment.