diff --git a/.travis.yml b/.travis.yml index 34fb1011..d0a27aba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,12 @@ language: python -python: - - "2.7" - - "3.5" - - "3.6" + +matrix: + include: + - python: 3.5 + - python: 3.6 + - python: 3.7 + dist: xenial + sudo: true # GitHub branch branches: @@ -12,9 +16,7 @@ branches: # install package and dependencies install: - pip install coverage nose pytest pytest-cov - - pip install scikit-image - - if [[ $TRAVIS_PYTHON_VERSION > '3' ]]; then pip install astropy; fi - - if [[ $TRAVIS_PYTHON_VERSION < '3' ]]; then pip install astropy==2.0.9; fi + - pip install astropy scikit-image - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install numpy future scipy astropy progressbar2 sphinx sphinx-rtd-theme numpydoc travis-sphinx coveralls; fi # run unit tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0de18eba..fad4a525 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ These issues should include the `help wanted` label. If you encounter difficulties installing ModOpt be sure to re-read the installation instructions provided. If you are still unable to install the package please remember to include the following details in the issue you raise: * your operating system and the corresponding version (*e.g.* macOS v10.14.1, Ubuntu v16.04.1, *etc.*), -* the version of Python you are using (*e.g* v2.7.14, v3.6.7, *etc.*), +* the version of Python you are using (*e.g* v3.6.7, *etc.*), * the python environment you are using (if any) and the corresponding version (*e.g.* virtualenv v16.1.0, conda v4.5.11, *etc.*), * the exact steps followed while attempting to install ModOpt * and the error message printed or a screen capture of the terminal output. @@ -186,7 +186,7 @@ Coverage tests are implemented via [Coveralls](https://coveralls.io/). These tes All contributions should adhere to the following style guides currently implemented in ModOpt: -1. All code should be compatible with the Python versions listed in `README.rst`. At present this requires backwards compatibility with Python 2.7. +1. All code should be compatible with the Python versions listed in `README.rst`. 1. All code should adhere to [PEP8](https://www.python.org/dev/peps/pep-0008/) standards. diff --git a/README.rst b/README.rst index b921f3f6..6b5a751d 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ ModOpt ====== -|travis| |coveralls| |license| |python27| |python35| |python36| +|travis| |coveralls| |license| |python35| |python36| |python37| .. |travis| image:: https://travis-ci.org/CEA-COSMIC/ModOpt.svg?branch=master :target: https://travis-ci.org/CEA-COSMIC/ModOpt @@ -12,18 +12,18 @@ ModOpt .. |license| image:: https://img.shields.io/github/license/mashape/apistatus.svg :target: https://github.com/CEA-COSMIC/ModOpt/blob/master/LICENCE.txt -.. |python27| image:: https://img.shields.io/badge/python-2.7-green.svg - :target: https://www.python.org/ - .. |python35| image:: https://img.shields.io/badge/python-3.5-green.svg :target: https://www.python.org/ .. |python36| image:: https://img.shields.io/badge/python-3.6-green.svg :target: https://www.python.org/ +.. |python37| image:: https://img.shields.io/badge/python-3.7-green.svg + :target: https://www.python.org/ + :Author: Samuel Farrens `(samuel.farrens@cea.fr) `_ -:Version: 1.3.3 +:Version: 1.4.0 :Date: 23/07/2019 @@ -55,15 +55,13 @@ Required Packages In order to run the code in this repository the following packages must be installed: -* |link-to-python| [Last tested with v2.7.15 and v3.7.0] +* |link-to-python| [Last tested with v3.7.0] -* |link-to-numpy| [Tested with v1.15.4] +* |link-to-numpy| [Tested with v1.16.4] -* |link-to-scipy| [Tested with v1.1.0] +* |link-to-scipy| [Tested with v1.3.0] -* |link-to-future| [Tested with v0.17.1] - -* |link-to-progressbar| [Tested with v3.38.0] +* |link-to-progressbar| [Tested with v3.42.0] .. |link-to-python| raw:: html @@ -80,11 +78,6 @@ installed: Scipy -.. |link-to-future| raw:: html - - Future - .. |link-to-progressbar| raw:: html +:Author: Samuel Farrens `(samuel.farrens@cea.fr) `_ -:Version: 1.3.3 +:Version: 1.4.0 :Date: 23/07/2019 +:Documentation: |link-to-docs| + +.. |link-to-docs| raw:: html + + https://cea-cosmic.github.io/ModOpt/ + ModOpt is a series of Modular Optimisation tools for solving inverse problems. Contents @@ -24,8 +31,6 @@ Contents 2. `Installation`_ -3. `Package Contents`_ - Dependencies ============ @@ -35,15 +40,13 @@ Required Packages In order to run the code in this repository the following packages must be installed: -* |link-to-python| [Last tested with v2.7.15 and v3.7.0] +* |link-to-python| [Last tested with v3.7.0] -* |link-to-numpy| [Tested with v1.15.4] +* |link-to-numpy| [Tested with v1.16.4] -* |link-to-scipy| [Tested with v1.1.0] +* |link-to-scipy| [Tested with v1.3.0] -* |link-to-future| [Tested with v0.17.1] - -* |link-to-progressbar| [Tested with v3.38.0] +* |link-to-progressbar| [Tested with v3.42.0] .. |link-to-python| raw:: html @@ -60,11 +63,6 @@ installed: Scipy -.. |link-to-future| raw:: html - - Future - .. |link-to-progressbar| raw:: html -:Version: 1.3.3 +:Version: 1.4.0 """ # Package Version -version_info = (1, 3, 3) +version_info = (1, 4, 0) __version__ = '.'.join(str(c) for c in version_info) __about__ = ('ModOpt \n\n ' diff --git a/modopt/interface/log.py b/modopt/interface/log.py index 7e4e09da..9ecd7a28 100644 --- a/modopt/interface/log.py +++ b/modopt/interface/log.py @@ -8,7 +8,6 @@ """ -from __future__ import print_function import sys import logging diff --git a/modopt/math/convolve.py b/modopt/math/convolve.py index d7a086ee..61301f2b 100644 --- a/modopt/math/convolve.py +++ b/modopt/math/convolve.py @@ -8,8 +8,6 @@ """ -from __future__ import division -from builtins import zip import numpy as np import scipy.signal from modopt.base.np_adjust import rotate_stack diff --git a/modopt/math/matrix.py b/modopt/math/matrix.py index 77c20fb6..8d160bc7 100644 --- a/modopt/math/matrix.py +++ b/modopt/math/matrix.py @@ -8,8 +8,6 @@ """ -from __future__ import division -from builtins import range, zip import numpy as np from itertools import product diff --git a/modopt/math/stats.py b/modopt/math/stats.py index 142735ad..f9843918 100644 --- a/modopt/math/stats.py +++ b/modopt/math/stats.py @@ -8,8 +8,6 @@ """ -from __future__ import division -from builtins import zip import numpy as np from scipy.stats import chi2 try: diff --git a/modopt/opt/algorithms.py b/modopt/opt/algorithms.py index a14e771d..c6a76b32 100644 --- a/modopt/opt/algorithms.py +++ b/modopt/opt/algorithms.py @@ -44,8 +44,6 @@ """ -from __future__ import division, print_function -from builtins import range, zip from inspect import getmro from progressbar import ProgressBar import numpy as np diff --git a/modopt/opt/cost.py b/modopt/opt/cost.py index a44856eb..50396e02 100644 --- a/modopt/opt/cost.py +++ b/modopt/opt/cost.py @@ -8,7 +8,6 @@ """ -from __future__ import division, print_function import numpy as np from modopt.base.types import check_callable from modopt.plot.cost_plot import plotCost diff --git a/modopt/opt/proximity.py b/modopt/opt/proximity.py index cc16b7be..3c54567e 100644 --- a/modopt/opt/proximity.py +++ b/modopt/opt/proximity.py @@ -8,8 +8,6 @@ """ -from __future__ import print_function -from builtins import range import numpy as np from modopt.base.types import check_callable from modopt.signal.noise import thresh diff --git a/modopt/opt/reweight.py b/modopt/opt/reweight.py index d0c161bd..60622a31 100644 --- a/modopt/opt/reweight.py +++ b/modopt/opt/reweight.py @@ -8,7 +8,6 @@ """ -from __future__ import division, print_function import numpy as np from modopt.base.types import check_float diff --git a/modopt/plot/cost_plot.py b/modopt/plot/cost_plot.py index af9af03e..b461ebc4 100644 --- a/modopt/plot/cost_plot.py +++ b/modopt/plot/cost_plot.py @@ -8,7 +8,6 @@ """ -from __future__ import print_function import numpy as np from modopt.interface.errors import warn try: diff --git a/modopt/signal/filter.py b/modopt/signal/filter.py index 30071444..16255ee3 100644 --- a/modopt/signal/filter.py +++ b/modopt/signal/filter.py @@ -8,7 +8,6 @@ """ -from __future__ import division import numpy as np from modopt.base.types import check_float diff --git a/modopt/signal/svd.py b/modopt/signal/svd.py index 962777e4..2feb579f 100644 --- a/modopt/signal/svd.py +++ b/modopt/signal/svd.py @@ -8,8 +8,6 @@ """ -from __future__ import division -from builtins import zip import numpy as np from scipy.linalg import svd from modopt.math.convolve import convolve diff --git a/modopt/signal/validation.py b/modopt/signal/validation.py index d5082807..ad87c0da 100644 --- a/modopt/signal/validation.py +++ b/modopt/signal/validation.py @@ -6,7 +6,6 @@ """ -from __future__ import print_function import numpy as np diff --git a/modopt/signal/wavelet.py b/modopt/signal/wavelet.py index 292c5ec0..f4ae5e14 100644 --- a/modopt/signal/wavelet.py +++ b/modopt/signal/wavelet.py @@ -16,8 +16,6 @@ """ -from __future__ import division -from builtins import zip import numpy as np import subprocess as sp from os import remove diff --git a/setup.py b/setup.py index 179018d2..2817aeda 100644 --- a/setup.py +++ b/setup.py @@ -18,11 +18,10 @@ url='https://github.com/cea-cosmic/ModOpt', download_url='https://github.com/cea-cosmic/ModOpt', packages=find_packages(), - install_requires=['numpy==1.16.0', 'future>=0.16.0', 'scipy==1.2.1', - 'progressbar2>=3.34.3'], + install_requires=['numpy>=1.16.4', 'scipy==1.3.0', 'progressbar2>=3.34.3'], license='MIT', description='Modular Optimisation tools for soliving inverse problems.', long_description=release_info["__about__"], setup_requires=['pytest-runner', ], - tests_require=['pytest==4.6.4', 'pytest-cov==2.5.1', 'pytest-pep8'], + tests_require=['pytest>=5.0.1', 'pytest-cov>=2.7.1', 'pytest-pep8'], )