Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v1.7.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdawson committed Aug 21, 2018
2 parents c48417d + d25a534 commit a4a2972
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 49 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ Frequently asked questions
Installation
------------

The easiest way to install is via [conda](http://conda.pydata.org) or pip:
The easiest way to install is via [conda](http://conda.pydata.org):

conda install -c conda-forge windspharm

or

pip install windspharm

You can also install from the source distribution.
Just download the archive, unpack it, then enter the source directory and use:
Download the archive, unpack it, then enter the source directory and use:

python setup.py install
53 changes: 34 additions & 19 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,49 @@ Changelog

Source code downloads for released versions can be downloaded from `Github <https://github.com/ajdawson/windspharm/releases>`_.

v1.6.x
------
v1.7
----

:Release: v1.7.0
:Date: 21 August 2018

The v1.7.0 release makes further progress on the road to more modern tooling and processes. The significant changes for users/contributors are:

* Support for using Legendre functions computed on-the-fly or stored, implemented by `@rcomer <https://github.com/rcomer>`_ [:issue:`97`, :pr:`98`].
* The source code directories have been reorganised, the ``lib/windspharm`` directory has been moved to ``windspharm/`` (``lib/`` is removed) and the ``doc/`` directory has been renamed ``docs/`` [:pr:`105`].
* The package version is now controlled by `versioneer <https://github.com/warner/python-versioneer>`_.

In addition, this is the first release where documentation and PyPI packages will be built automatically as part of the continuous integration system.


v1.6
----

:Release: v1.6.0
:Date: 9 May 2018

This release has no major user-facing changes, its main purpose is to modernise the test suite and fix problems with NumPy compatibility, although the modifications to the test suite may have knock-on effects for package maintainers.

* Fixes for NumPy compatibility [`#89 <https://github.com/ajdawson/windspharm/issues/89>`_, `#90 <https://github.com/ajdawson/windspharm/pull/90>`_].
* Switch from `nose` to `pytest <http://pytest.org>`_ for the test suite [`#91 <https://github.com/ajdawson/windspharm/pull/91>`_, `#94 <https://github.com/ajdawson/windspharm/pull/94>`_].
* Fixes for NumPy compatibility [:issue:`89`, :pr:`90`].
* Switch from `nose` to `pytest <http://pytest.org>`_ for the test suite [:pr:`91`, :pr:`94`].


v1.5.x
------
v1.5
----

:Release: v1.5.1
:Date: 9 January 2017

* Improved recognition of Gaussian grids [`#78 <https://github.com/ajdawson/windspharm/issues/78>`_, `#76 <https://github.com/ajdawson/windspharm/pull/76>`_, `#79 <https://github.com/ajdawson/windspharm/pull/79>`_].
* Improved recognition of Gaussian grids [:issue:`78`, :pr:`76`, :pr:`79`].

:Release: v1.5.0
:Date: 27 April 2016

* Added a keyword argument to control the radius of the sphere used in the spherical harmonic computations. The `rsphere` keyword is available for all interfaces.


v1.4.x
------
v1.4
----

:Release: v1.4.0
:Date: 1 March 2016
Expand All @@ -40,8 +55,8 @@ v1.4.x
* Fixed a bug where the `truncate` method would not work on inverted latitude grids in the iris interface.


v1.3.x
------
v1.3
----

:Release: v1.3.2
:Date: 18 May 2015
Expand All @@ -61,25 +76,25 @@ v1.3.x
* Basic Python3 compatibility using 2to3 (pyspharm does not yet have Python3 support but some Linux distros provide a patched package).


v1.2.x
------
v1.2
----

:Release: v1.2.1
:Date: 8 August 2013

* Fixed error in the iris interface where cubes with a south-north latitude dimension
could not be used [`#22 <https://github.com/ajdawson/windspharm/pull/22>`_].
could not be used [:pr:`22`].

:Release: v1.2.0
:Date: 20 May 2013

* Prevented possible double copying of data in `order_latdim` [`#16 <https://github.com/ajdawson/windspharm/pull/16>`_].
* Refactored test suite and added more test coverage [`#14 <https://github.com/ajdawson/windspharm/pull/14>`_].
* Fixed bug in calculation of the magnitude of a vector wind [`#13 <https://github.com/ajdawson/windspharm/pull/13>`_, `#11 <https://github.com/ajdawson/windspharm/issues/11>`_].
* Prevented possible double copying of data in `order_latdim` [:pr:`16`].
* Refactored test suite and added more test coverage [:pr:`14`].
* Fixed bug in calculation of the magnitude of a vector wind [:pr:`13`, :issue:`11`].


v1.1.x
------
v1.1
----

:Release: v1.1.0
:Date: 10 January 2013
Expand Down
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'matplotlib.sphinxext.plot_directive',
]

Expand Down Expand Up @@ -94,6 +95,13 @@
#modindex_common_prefix = []


# -- extlinks configuration ----------------------------------------------------

# Allow e.g. :issue:`42` and :pr:`42` roles:
extlinks = {'issue': ('https://github.com/ajdawson/windspharm/issues/%s', '#'),
'pr': ('https://github.com/ajdawson/windspharm/pull/%s', '#')}


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
22 changes: 5 additions & 17 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,21 @@ Introduction
Download & Installation
-----------------------

Released versions of `windspharm` can be downloaded from `Github <https://github.com/ajdawson/windspharm/releases>`_.
After downloading the source code archive, unzip it and change into the unzipped archive's directory, then to install it:

.. code-block:: bash
$ python setup.py install
`windspharm` can also be installed from PyPI using pip:
The easiest way to install is via conda_:

.. code-block:: bash
$ pip install windspharm
$ conda install -c conda-forge windspharm
Releases are also available via conda_, packages are built for both Python 2 and 3 on Linux and OSX:
Released versions of `windspharm` can be downloaded from `Github <https://github.com/ajdawson/windspharm/releases>`_.
After downloading the source code archive, unzip it and change into the unzipped archive's directory, then to install it:

.. code-block:: bash
$ conda install -c conda-forge windspharm
$ python setup.py install
You can also check out the source code for the development version from the `github repository <https://github.com/ajdawson/windspharm>`_ to access features which are not yet in the released version.

.. note::

When installing via pip it may appear that the installation has hung.
However, it is likely that pip is just trying to install the dependency pyspharm, whose setup process requires the user to accept a license.
If you think your install has hung, try typing *yes* and pressing enter, the install should continue after a short pause (but know that in doing so you are accepting the terms of the Spherepack license: http://www2.cisl.ucar.edu/resources/legacy/spherepack/license).


Requirements
------------
Expand Down
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Build and install the windspharm package."""
# Copyright (c) 2012-2016 Andrew Dawson
# Copyright (c) 2012-2018 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,6 +18,8 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os.path

from setuptools import setup
import versioneer

Expand All @@ -29,18 +31,18 @@
'windspharm.examples': ['example_data/*'],
'windspharm.tests': ['data/regular/*.npy', 'data/gaussian/*.npy']}

with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
long_description = f.read()

setup(name='windspharm',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='vector wind analysis in spherical coordinates',
author='Andrew Dawson',
author_email='[email protected]',
url='http://ajdawson.github.com/windspharm/',
long_description="""
windspharm provides a simple interface for doing calculations on
vector wind fields (e.g., computing streamfunction) in spherical
geometry using spherical harmonics
""",
long_description=long_description,
long_description_content_type='text/markdown',
packages=packages,
package_data=package_data,
install_requires=['numpy', 'pyspharm >= 1.0.8'],)
2 changes: 1 addition & 1 deletion windspharm/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def planetaryvorticity(self, omega=None):
except (TypeError, ValueError):
raise ValueError('invalid value for omega: {!r}'.format(omega))
indices = [slice(0, None)] + [np.newaxis] * (len(self.u.shape) - 1)
f = cp[indices] * np.ones(self.u.shape, dtype=np.float32)
f = cp[tuple(indices)] * np.ones(self.u.shape, dtype=np.float32)
return f

def absolutevorticity(self, omega=None, truncation=None):
Expand Down

0 comments on commit a4a2972

Please sign in to comment.