From 8bb953b47f1b58357def41e883f8ba46595fdc4d Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Mon, 20 Aug 2018 22:07:22 +0100 Subject: [PATCH 1/5] Revise install instructions --- docs/index.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 4b0c0bb..6bb371d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,24 +36,24 @@ Introduction Download & Installation ----------------------- -Released versions of `windspharm` can be downloaded from `Github `_. -After downloading the source code archive, unzip it and change into the unzipped archive's directory, then to install it: +The easiest way to install is via conda_: .. code-block:: bash - $ python setup.py install + $ conda install -c conda-forge windspharm -`windspharm` can also be installed from PyPI using pip: +You can also install from PyPI via pip: .. code-block:: bash $ pip install 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 `_. +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 `_ to access features which are not yet in the released version. From ba30655fa521955075feb31b9ff76e924ebc3f03 Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Tue, 21 Aug 2018 11:27:27 +0100 Subject: [PATCH 2/5] Use tuple indexing for numpy arrays --- windspharm/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windspharm/standard.py b/windspharm/standard.py index e67224e..8215fee 100644 --- a/windspharm/standard.py +++ b/windspharm/standard.py @@ -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): From 940af958cfab4d5ebbae8e82a28c680d50c016dd Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Tue, 21 Aug 2018 11:27:49 +0100 Subject: [PATCH 3/5] Update the changelog for v1.7.0 --- docs/changelog.rst | 53 +++++++++++++++++++++++++++++----------------- docs/conf.py | 8 +++++++ 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 313ec0e..b2a4b3d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,25 +3,40 @@ Changelog Source code downloads for released versions can be downloaded from `Github `_. -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 `_ [: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 `_. + +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 `_, `#90 `_]. -* Switch from `nose` to `pytest `_ for the test suite [`#91 `_, `#94 `_]. +* Fixes for NumPy compatibility [:issue:`89`, :pr:`90`]. +* Switch from `nose` to `pytest `_ 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 `_, `#76 `_, `#79 `_]. +* Improved recognition of Gaussian grids [:issue:`78`, :pr:`76`, :pr:`79`]. :Release: v1.5.0 :Date: 27 April 2016 @@ -29,8 +44,8 @@ v1.5.x * 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 @@ -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 @@ -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 `_]. + could not be used [:pr:`22`]. :Release: v1.2.0 :Date: 20 May 2013 -* Prevented possible double copying of data in `order_latdim` [`#16 `_]. -* Refactored test suite and added more test coverage [`#14 `_]. -* Fixed bug in calculation of the magnitude of a vector wind [`#13 `_, `#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 diff --git a/docs/conf.py b/docs/conf.py index 3fd25d9..c895ab4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,6 +30,7 @@ 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', + 'sphinx.ext.extlinks', 'matplotlib.sphinxext.plot_directive', ] @@ -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 From aa6243c717ed3941b6bd4206cf04aaf466b8f842 Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Tue, 21 Aug 2018 12:59:36 +0100 Subject: [PATCH 4/5] Remove pip install instructions pyspharm is no longer available to install via pip, so omit the instructions. --- README.md | 8 ++------ docs/index.rst | 12 ------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 60c8969..098fdb6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/index.rst b/docs/index.rst index 6bb371d..38de5e0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,12 +42,6 @@ The easiest way to install is via conda_: $ conda install -c conda-forge windspharm -You can also install from PyPI via pip: - -.. code-block:: bash - - $ pip install windspharm - Released versions of `windspharm` can be downloaded from `Github `_. After downloading the source code archive, unzip it and change into the unzipped archive's directory, then to install it: @@ -57,12 +51,6 @@ After downloading the source code archive, unzip it and change into the unzipped You can also check out the source code for the development version from the `github repository `_ 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 ------------ From d25a5348245c08cfa4be93a329cebf334b0a2ea3 Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Tue, 21 Aug 2018 13:03:59 +0100 Subject: [PATCH 5/5] Use the README as the package description --- setup.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 1f7a0d5..51fdec6 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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 @@ -29,6 +31,9 @@ '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(), @@ -36,11 +41,8 @@ author='Andrew Dawson', author_email='dawson@atm.ox.ac.uk', 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'],)