Skip to content

Commit c9b9093

Browse files
committed
prepare release
1 parent 34e8288 commit c9b9093

27 files changed

+469
-191
lines changed

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,37 @@
55

66
This extension adds functionality to work with Spherical Harmonics to [Xarray](https://github.com/pydata/xarray).
77

8-
## Features and functionality (in progress)
8+
9+
## Features and functionality
910
* Gravity functionals: (convert from Stokes coefficients to various gravity functionals, such as equivalent water heights, geoid changes, etc.)
1011
* Filter (e.g. Gaussian or anisotropic filter applied in the spectral domain)
11-
* The use of Xarray like operations allow for applying functionality to multi-dimensional datasets
12-
12+
* The use of Xarray-like operations allow for applying functionality to multi-dimensional datasets
13+
* A spectral sea level equation solver
1314

1415
## Getting started
15-
The tutorials in the [documentation](https://shxarray.wobbly.earth/stable/tutorial.html) will gradually epxand and provide Jupyter notebook workflows to start with.
16+
The tutorials in the [documentation](https://shxarray.wobbly.earth/stable/tutorial.html) provide Jupyter Notebooks with examples of how to make use of the module. The notebooks can also be found on the [github repository](https://github.com/ITC-Water-Resources/shxarray/tree/main/docs/source/notebooks).
1617

18+
The functionality of shxarray becomes available when importing the module together with Xarray:
19+
20+
```
21+
import shxarray
22+
import xarray as xr
23+
```
24+
after which the shxarray accessor becomes available for use, e.g.:
25+
```
26+
nmax=20
27+
nmin=2
28+
dazeros=xr.DataArray.sh.ones(nmax=nmax,nmin=nmin)
29+
```
1730

1831
## Installation
1932
You can install this package from PyPi using:
2033
```
2134
pip install shxarray
2235
```
2336

37+
## Backends
38+
Shxarray comes with a default **shlib** backend written in C++ and Cython. In addition, a very fast 'shtns' backend can be used when [SHTns](https://nschaeff.bitbucket.io/shtns/) is installed. The backends can be specified in enabled routines as the options: `engine='shlib'` or `engine='shtns'`.
2439

2540
## Development Installation
2641
If you want to help in the development of this package, it's best to clone the repository to allow for modifications and pull requests. The extension makes use of [Cython](https://cython.readthedocs.io/en/latest/) generated code to speed up spherical harmonic synthesis and analysis.
@@ -41,15 +56,15 @@ will be much faster than using
4156
```pip install -e .```
4257

4358

44-
This will build the shared library in for example `./build/lib.linux-x86_64-cpython-3xx/shxarray/shlib.cpython-3xx-x86_64-linux-gnu.so`. To make sure changes are picked up in your editable install you can create a symbolic link in the Python part of the library e.g. :
59+
This will build the shared library in for example `./build/lib.linux-x86_64-cpython-3xx/shxarray/shlib.cpython-3xx-x86_64-linux-gnu.so`. To make sure changes are picked up in your editable install you should create a symbolic link in the Python part of the library e.g. :
4560

4661
```
4762
cd src/shxarray/
4863
ln -sf ../../build/lib.linux-x86_64-cpython-311/shxarray/shlib.cpython-311-x86_64-linux-gnu.so
4964
```
5065

5166
### Numpy version issues
52-
The provided c++ files are cythonized against numpy > 2. When building against older numpy versions (<2), the cpp files are re-cythonized upon install, this requires a working cython install.
67+
The provided c++ files are cythonized against numpy > 2. When building against older numpy versions (<2), the cpp files are re-cythonized upon install, this requires a working cython installation.
5368

5469

5570
## Contributing
-197 KB
Loading
-199 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{%- if show_headings %}
2+
{{- basename | e | heading }}
3+
4+
{% endif -%}
5+
.. automodule:: {{ qualname }}
6+
{%- for option in automodule_options %}
7+
:{{ option }}:
8+
{%- endfor %}
9+

docs/source/_templates/toc.rst_t

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{ header | heading }}
2+
3+
.. toctree::
4+
:maxdepth: {{ maxdepth }}
5+
{% for docname in docnames %}
6+
{{ docname }}
7+
{%- endfor %}
8+

docs/source/api.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ API Reference
44
.. toctree::
55
:maxdepth: 2
66

7-
references/shxarray.rst
7+
references/shxarray.core.rst
8+
references/shxarray.kernels.rst
9+
references/shxarray.earth.rst
10+
references/shxarray.geom.rst
11+
references/shxarray.io.rst
12+
references/shxarray.exp.rst
13+
references/shxarray.geoslurp.rst
14+
references/shxarray.shlib.rst

docs/source/changelog.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Releases
2+
========
3+
Change log for shxarray
4+
5+
Last change: |today|
6+
7+
Upcoming Version
8+
----------------
9+
- ..
10+
11+
12+
Version 1.3.0
13+
-------------
14+
- Add logo, favicon and change documentation theme
15+
- Add `SHtns <https://nschaeff.bitbucket.io/shtns/>`_ as a (very fast) computational backend for analysis and synthesis operations of spherical harmonic data.
16+
- Fix code such that it can be compiled on Windows with MSVC see: `Installation fails on Windows <https://github.com/ITC-Water-Resources/shxarray/issues/3>`_
17+
- Add Xarray reading backend to read SINEX files
18+
- Add option to decorate xarray with user defined attributes which can be saved to file
19+
- Add a Spectral Sea Level Equation solver
20+
21+
22+
Version <= 1.2.0
23+
----------------
24+
Consult the `commit messages <https://github.com/ITC-Water-Resources/shxarray/commits/v1.2.0>`_ for information on earlier releases

docs/source/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
apidoc_module_dir=os.path.dirname(shxarray.__file__)
2828

2929
apidoc_output_dir = 'references'
30-
apidoc_separate_modules = False
30+
apidoc_separate_modules = True
3131
apidoc_module_first=True
3232
apidoc_toc_file=False
3333

@@ -61,8 +61,7 @@
6161
],
6262
"logo": {
6363
"alt_text": "shxarray - Home",
64-
"text": "shxarray",
65-
"image_light": "_static/shxarraylogo_light.png",
64+
"image_light": "_static/shxarraylogo_dark.png",
6665
"image_dark": "_static/shxarraylogo_light.png",
6766
}
6867
}

docs/source/dev.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Development
2+
===========
3+
4+
5+
Development install
6+
-------------------
7+
Users interested in developing can install the latest version from `github <https://github.com/ITC-Water-Resources/shxarray/tree/main>`_. Cython is needed in case the binary extension is being developed, and users can consult the dedicated instructions on the github repository.
8+
9+
10+
11+
12+
Testing suite with pytest
13+
-------------------------
14+
From the repositories root directory, the entire test suite can be run with the following command:
15+
16+
.. code-block:: console
17+
18+
python -m pytest tests/
19+
20+
21+
Coding style
22+
------------
23+
Code can be supplied with `numpy docstrings <https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html>`_ so they can be parsed into this documentation.

docs/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Welcome to shxarray's documentation!
1515
installation.rst
1616
tutorial.rst
1717
api.rst
18+
dev.rst
19+
changelog.rst
1820

1921
Indices and tables
2022
==================

0 commit comments

Comments
 (0)