diff --git a/.travis.yml b/.travis.yml index 5f8b569cb..507f18c52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,59 @@ +# After changing this file, check it on: +# http://lint.travis-ci.org/ language: python +sudo: false +matrix: + include: + - python: 2.7 + env: + - PYFLAKES=1 + - PEP8=1 + - NUMPYSPEC=numpy + before_install: + - pip install pep8==1.5.1 + - pip install pyflakes + script: + - PYFLAKES_NODOCTEST=1 pyflakes pywt demo | grep -E -v 'unable to detect undefined names|assigned to but never used|imported but unused|redefinition of unused' > test.out; cat test.out; test \! -s test.out + - pep8 pywt demo -python: - - 2.6 - - 3.3 + - python: 3.5-dev + env: + - NUMPYSPEC=numpy + - python: 3.4 + env: + - NUMPYSPEC=numpy + - python: 3.3 + env: + - NUMPYSPEC=numpy + - python: 2.6 + env: + - OPTIMIZE=-OO + - NUMPYSPEC="numpy==1.6.2" + - python: 2.7 + env: + - NUMPYSPEC="--upgrade git+git://github.com/numpy/numpy.git@v1.9.1" + +addons: + apt: + packages: + - ccache +cache: + directories: + - $HOME/.ccache before_install: + - export PATH=/usr/lib/ccache:$PATH - uname -a - free -m - df -h - ulimit -a - - pip install -q --use-mirrors Cython numpy - # For Python 2.6 we also need argparse - - pip install argparse + # Speed up install by not compiling Cython + - travis_retry pip install --install-option="--no-cython-compile" Cython==0.22 + - travis_retry pip install $NUMPYSPEC + - travis_retry pip install nose - pip install coverage - - pip install coveralls - python -V + - set -o pipefail script: - - python runtests.py -g -m full --coverage - -after_success: - - coveralls + - python -u $OPTIMIZE runtests.py -g -m full --coverage diff --git a/CHANGES.txt b/CHANGES.txt index 749c519ca..b5489c290 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,10 @@ Changelog +0.3.0 + A major refactoring, providing support for Python 3.x while maintaining + full backwards compatiblity. + Development has moved to https://github.com/rgommers/pywt + 0.2.2 maintenance release: - resolved setup and build issues diff --git a/README.rst b/README.rst index 4ff7e0c4c..254615d41 100644 --- a/README.rst +++ b/README.rst @@ -5,29 +5,37 @@ PyWavelets is a free Open Source wavelet transform software for Python_ programming language. It is written in Python, Cython and C for a mix of easy and powerful high-level interface and the best performance. -PyWavelets is very easy to start with and use, and currently is capable of: +PyWavelets is very easy to start with and use. Just install the package, open +the Python interactive shell and type: - * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT) + .. sourcecode:: python + + >>> import pywt + >>> cA, cD = pywt.dwt([1, 2, 3, 4], 'db1') + +VoilĂ ! Computing wavelet transforms never before has been so simple :) + +Main features +------------- + +The main features of PyWavelets are: + + * 1D, 2D and nD Forward and Inverse Discrete Wavelet Transform (DWT and IDWT) * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform) * 1D and 2D Wavelet Packet decomposition and reconstruction * Approximating wavelet and scaling functions - * Over seventy built-in wavelet filters and custom wavelets supported + * Over seventy `built-in wavelet filters`_ + and custom wavelets supported * Single and double precision calculations - * Results compatibility with Matlab Wavelet Toolbox (tm) - -.. image:: - https://secure.travis-ci.org/rgommers/pywt.png?branch=master - :alt: Build Status - :target: https://secure.travis-ci.org/rgommers/pywt - + * Results compatible with Matlab Wavelet Toolbox |tm| Requirements ------------ PyWavelets is a package for the Python programming language. It requires: - - Python_ 2.6, 2.7 or >=3.2 - - Numpy_ + - Python_ 2.6, 2.7 or >=3.3 + - Numpy_ >= 1.6.2 Download -------- @@ -36,8 +44,8 @@ The most recent *development* version can be found on GitHub at https://github.com/rgommers/pywt. Latest release, including source and binary package for Windows, is available -for download from the `Python Package Index`_. Note that the official release -is quite old and doesn't yet support Python 3. +for download from the `Python Package Index`_ or on +`https://github.com/rgommers/pywt/releases`__ Install ------- @@ -45,9 +53,7 @@ Install In order to build PyWavelets from source, a working C compiler (GCC or MSVC) and a recent version of Cython_ is required. - - To install PyWavelets open shell prompt and type - ``pip install -e git+https://github.com/rgommers/pywt#egg=pywt`` (dev version) - or ``pip install PyWavelets`` (last official release) + - Install PyWavelets with ``pip install PyWavelets``. - To build and install from source, navigate to downloaded PyWavelets source code directory and type ``python setup.py install``. @@ -59,6 +65,9 @@ Binary packages for several Linux distributors are maintained by Open Source community contributors. Query your Linux package manager tool for `python-wavelets`, `python-pywt` or similar package name. +.. seealso:: :ref:`Development notes ` section contains more + information on building and installing from source code. + Documentation ------------- @@ -68,26 +77,28 @@ http://pywavelets.readthedocs.org. For more usage examples see the `demo`_ directory in the source package. -Contributing ------------- +State of development & Contributing +----------------------------------- PyWavelets started in 2006 as an academic project for a master thesis on `Analysis and Classification of Medical Signals using Wavelet Transforms` -but seems to no longer be maintained by its `original developer`_. -This repo contains further development work by multiple contributors. +and was maintained until 2012 by its `original developer`_. In 2013 +maintenance was taken over in a new repo (`https://github.com/rgommers/pywt`__) +by a larger development team - a move supported by the original developer. +The repo move doesn't mean that this is a fork - the package continues to be +developed under the name "PyWavelets", and released on PyPi and Github (see +`https://github.com/nigma/pywt/issues/13`__ for the discussion where that was +decided). All contributions including bug reports, bug fixes, new feature implementations -and documentation improvements are welcome. +and documentation improvements are welcome. Moreover, developers with an +interest in PyWavelets are very welcome to join the development team! + Python 3 -------- -Python 2.x and Python 3.x versions are working under the -same code base at https://github.com/rgommers/pywt, as well as the examples. -Check out the `changelog `_ for -info. - -Issues should be reported on https://github.com/rgommers/pywt/issues. +Python 3.x is fully supported from release v0.3.0 on. Contact ------- @@ -100,21 +111,26 @@ License PyWavelets is a free Open Source software released under the MIT license. -Commercial Support ------------------- +Contents +-------- + +.. toctree:: + :maxdepth: 1 -For information on commercial support and development one can try to contact -the original developer at en@ig.ma. + ref/index + regression/index + dev/index + resources + contents +.. _built-in wavelet filters: http://wavelets.pybytes.com/ .. _Cython: http://cython.org/ -.. _demo: https://github.com/nigma/pywt/tree/master/demo -.. _GitHub: https://github.com/rgommers/pywt/issues -.. _GitHub Issues: https://github.com/nigma/pywt/issues -.. _in-development version: https://github.com/nigma/pywt/tarball/develop#egg=PyWavelets-dev -.. _Numpy: http://numpy.scipy.org/ +.. _demo: https://github.com/rgommers/pywt/tree/master/demo +.. _GitHub: https://github.com/rgommers/pywt +.. _GitHub Issues: https://github.com/rgommers/pywt/issues +.. _Numpy: http://www.numpy.org .. _original developer: http://en.ig.ma .. _Python: http://python.org/ .. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/ .. _PyWavelets discussions group: http://groups.google.com/group/pywavelets - diff --git a/doc/source/dev/testing.rst b/doc/source/dev/testing.rst index 191d5f4bf..c7e434ab2 100644 --- a/doc/source/dev/testing.rst +++ b/doc/source/dev/testing.rst @@ -6,15 +6,15 @@ Testing Continous integration with Travis-CI ------------------------------------ -The project is using `Travis-CI `_ service +The project is using `Travis-CI `_ service for continous integration and testing. Current build status is: .. image:: - https://secure.travis-ci.org/nigma/pywt.png?branch=develop + https://secure.travis-ci.org/rgommers/pywt.png?branch=develop :alt: Build Status - :target: https://secure.travis-ci.org/nigma/pywt + :target: https://secure.travis-ci.org/rgommers/pywt If you are submitting a patch or pull request please make sure it @@ -24,18 +24,23 @@ does not break the build. Running tests locally --------------------- -Simply:: +Tests are implemented with `nose`_, so use one of: - python setup.py test + $ nosetests pywt + + >>> pywt.test() Running tests with Tox ---------------------- -There's also a config file for running tests with Tox (``pip install tox``):: +There's also a config file for running tests with `Tox`_ (``pip install tox``). +To for example run tests for Python 2.7 and Python 3.4 use:: + + tox -e py27,py34 + +For more information see the `Tox`_ documentation. - tox -It is not however very convenient at the moment because Tox recreates -the test environment (which is a good thing) and builds numpy from -source on every run (which takes a lot of time). +.. _nose: http://nose.readthedocs.org/en/latest/ +.. _Tox: http://tox.testrun.org/ diff --git a/doc/source/index.rst b/doc/source/index.rst index 049aa1701..254615d41 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,31 +20,32 @@ Main features The main features of PyWavelets are: - * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT) + * 1D, 2D and nD Forward and Inverse Discrete Wavelet Transform (DWT and IDWT) * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform) * 1D and 2D Wavelet Packet decomposition and reconstruction * Approximating wavelet and scaling functions * Over seventy `built-in wavelet filters`_ and custom wavelets supported * Single and double precision calculations - * Results compatibility with Matlab Wavelet Toolbox |tm| + * Results compatible with Matlab Wavelet Toolbox |tm| Requirements ------------ PyWavelets is a package for the Python programming language. It requires: - - Python_ 2.6 or 2.7 - - numpy_ numeric array module + - Python_ 2.6, 2.7 or >=3.3 + - Numpy_ >= 1.6.2 Download -------- The most recent *development* version can be found on GitHub at -https://github.com/nigma/pywt. +https://github.com/rgommers/pywt. Latest release, including source and binary package for Windows, is available -for download from the `Python Package Index`_. +for download from the `Python Package Index`_ or on +`https://github.com/rgommers/pywt/releases`__ Install ------- @@ -52,15 +53,11 @@ Install In order to build PyWavelets from source, a working C compiler (GCC or MSVC) and a recent version of Cython_ is required. - - To install PyWavelets open shell prompt and type ``pip install PyWavelets`` - or ``easy_install PyWavelets``. + - Install PyWavelets with ``pip install PyWavelets``. - To build and install from source, navigate to downloaded PyWavelets source code directory and type ``python setup.py install``. - - The `in-development version`_ of PyWavelets can be installed with - ``pip install PyWavelets==dev`` or ``easy_install PyWavelets==dev``. - Prebuilt Windows binaries and source code packages are also available from `Python Package Index`_. @@ -80,30 +77,33 @@ http://pywavelets.readthedocs.org. For more usage examples see the `demo`_ directory in the source package. -Contributing ------------- +State of development & Contributing +----------------------------------- PyWavelets started in 2006 as an academic project for a master thesis on `Analysis and Classification of Medical Signals using Wavelet Transforms` -and is maintained by its `original developer`_. +and was maintained until 2012 by its `original developer`_. In 2013 +maintenance was taken over in a new repo (`https://github.com/rgommers/pywt`__) +by a larger development team - a move supported by the original developer. +The repo move doesn't mean that this is a fork - the package continues to be +developed under the name "PyWavelets", and released on PyPi and Github (see +`https://github.com/nigma/pywt/issues/13`__ for the discussion where that was +decided). All contributions including bug reports, bug fixes, new feature implementations -and documentation improvements are welcome. +and documentation improvements are welcome. Moreover, developers with an +interest in PyWavelets are very welcome to join the development team! -Go and fork on `GitHub`_ today! Python 3 -------- -Python 3 development branch is at https://github.com/nigma/pywt/tree/py-3. -Check out the `changelog `_ for -info. Currently the code and examples are ported to work on Python 2.7 and 3.2 -from the same codebase. +Python 3.x is fully supported from release v0.3.0 on. Contact ------- -Use `GitHub Issues`_ or `PyWavelets discussions group`_ to post your +Use `GitHub Issues`_ or the `PyWavelets discussions group`_ to post your comments or questions. License @@ -111,16 +111,6 @@ License PyWavelets is a free Open Source software released under the MIT license. -Commercial Support ------------------- - -For information on commercial support and development email me at en@ig.ma. - - -.. |tm| unicode:: U+2122 .. trademark sign - :ltrim: - - Contents -------- @@ -136,11 +126,10 @@ Contents .. _built-in wavelet filters: http://wavelets.pybytes.com/ .. _Cython: http://cython.org/ -.. _demo: https://github.com/nigma/pywt/tree/master/demo -.. _GitHub: https://github.com/nigma/pywt -.. _GitHub Issues: https://github.com/nigma/pywt/issues -.. _in-development version: https://github.com/nigma/pywt/tarball/develop#egg=PyWavelets-dev -.. _numpy: http://numpy.scipy.org/ +.. _demo: https://github.com/rgommers/pywt/tree/master/demo +.. _GitHub: https://github.com/rgommers/pywt +.. _GitHub Issues: https://github.com/rgommers/pywt/issues +.. _Numpy: http://www.numpy.org .. _original developer: http://en.ig.ma .. _Python: http://python.org/ .. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/ diff --git a/doc/source/resources.rst b/doc/source/resources.rst index 208262ff4..ee963134c 100644 --- a/doc/source/resources.rst +++ b/doc/source/resources.rst @@ -35,7 +35,7 @@ Articles - `Wavelet Regression in Python `_ -.. _GitHub repository: https://github.com/nigma/pywt -.. _GitHub Issues: https://github.com/nigma/pywt/issues +.. _GitHub repository: https://github.com/rgommers/pywt +.. _GitHub Issues: https://github.com/rgommers/pywt/issues .. _PyWavelets discussions group: http://groups.google.com/group/pywavelets .. _wavelets.pybytes.com: http://wavelets.pybytes.com/ diff --git a/runtests.py b/runtests.py index b46c92736..322bd8ddb 100644 --- a/runtests.py +++ b/runtests.py @@ -28,8 +28,11 @@ '/usr/local/lib/ccache', '/usr/local/lib/f90cache'] # --------------------------------------------------------------------- +if __doc__ is None: + __doc__ = "Run without -OO if you want usage info" +else: + __doc__ = __doc__.format(**globals()) -__doc__ = __doc__.format(**globals()) import sys import os diff --git a/setup.py b/setup.py index a5d0b2d82..5f1957f08 100755 --- a/setup.py +++ b/setup.py @@ -141,10 +141,10 @@ def setup_package(): metadata = dict( name="PyWavelets", - author="Filip Wasilewski", - author_email="en@ig.ma", - url="http://www.pybytes.com/pywavelets/", - download_url="http://pypi.python.org/pypi/PyWavelets/", + maintainer="The PyWavelets Developers", + maintainer_email="http://groups.google.com/group/pywavelets", + url="https://github.com/rgommers/pywt", + download_url="https://github.com/rgommers/pywt/releases", license="MIT", description="PyWavelets, wavelet transform module", long_description="""\ @@ -158,8 +158,7 @@ def setup_package(): * Single and double precision calculations * Results compatibility with Matlab Wavelet Toolbox (tm) """, - keywords=["wavelets", "wavelet transform", "DWT", "SWT", "scientific", - "NumPy"], + keywords=["wavelets", "wavelet transform", "DWT", "SWT", "scientific"], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -169,8 +168,12 @@ def setup_package(): "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"], @@ -194,6 +197,11 @@ def setup_package(): FULLVERSION, GIT_REVISION = get_version_info() metadata['version'] = FULLVERSION else: + if (len(sys.argv) >= 2 and sys.argv[1] == 'bdist_wheel') or ( + 'develop' in sys.argv): + # bdist_wheel needs setuptools + import setuptools + from numpy.distutils.core import setup cwd = os.path.abspath(os.path.dirname(__file__)) diff --git a/tox.ini b/tox.ini index 3514d83dc..d5215824d 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ [tox] toxworkdir = {homedir}/.tox/pywt/ -envlist = py27, py33 +envlist = py26, py27, py33, py34, py35 [testenv] deps =