From 30e94e27b0f47da2607fd780375da94147fa211d Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Tue, 27 Mar 2018 11:50:01 +0100 Subject: [PATCH 1/2] Update .travis.yml Remove apt-get update --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af2ecb1..0eaa2e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ python: before_install: # http://conda.pydata.org/docs/travis.html - - travis_retry sudo apt-get update - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then travis_retry wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; else From 335d8d6b7e6ec4eed9fc417c971167cb59500ce6 Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Mon, 6 Aug 2018 17:47:38 +0100 Subject: [PATCH 2/2] Test on python 3.7 (#65) * Test on python 3.7 * Xenial dist for travis python 3.7 * Add requirements_dev.txt * Remove python 3.4 * add mypy to dev requirements * Unpin requirements. * Revert "add mypy to dev requirements" This reverts commit 7a155a63f30b6525828bc4fcd67bdbbda8be86c7. * Update classifiers for python 3.7 * Add shippable config * Add appveyor config --- .shippable.yml | 48 ++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 11 +++++----- appveyor.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 14 +++++-------- requirements_dev.txt | 6 ++++++ setup.py | 2 +- 6 files changed, 116 insertions(+), 15 deletions(-) create mode 100644 .shippable.yml create mode 100644 appveyor.yml create mode 100644 requirements_dev.txt diff --git a/.shippable.yml b/.shippable.yml new file mode 100644 index 0000000..8dae010 --- /dev/null +++ b/.shippable.yml @@ -0,0 +1,48 @@ +language: python +python: + - 2.7 + - 3.5 + - 3.6 + - 3.7 + +before_install: + # http://conda.pydata.org/docs/travis.html + - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then + travis_retry wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; + else + travis_retry wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + fi + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + - conda config --set always_yes yes --set changeps1 no + - conda config --add channels conda-forge + - conda update -q conda + - conda info -a + +cache: + directories: + - $HOME/.cache/pip + +install: + - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy astropy + - source activate test-environment + + - travis_retry pip install -r requirements.txt + - travis_retry pip install -r requirements_dev.txt + + - python setup.py install + +build: + ci: + # Create folders for test and code coverage + - mkdir -p shippable/testresults + - mkdir -p shippable/codecoverage + + # Run test and code coverage and output results to the right folder + - pytest --junitxml=shippable/testresults/nosetests.xml + - pytest --cov=. --cov-report=xml:shippable/codecoverage/coverage.xml --durations=10 + # - pytest --cov=. --cov-report term-missing + +after_success: + - coverage xml -i diff --git a/.travis.yml b/.travis.yml index 0eaa2e2..edeec71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ +dist: xenial +sudo: true language: python python: - "2.7" - - "3.4" - "3.5" - "3.6" + - "3.7" before_install: # http://conda.pydata.org/docs/travis.html @@ -26,16 +28,15 @@ cache: install: - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy astropy - source activate test-environment - - travis_retry pip install pyastronomy - travis_retry pip install -r requirements.txt - - travis_retry pip install pytest-cov python-coveralls codeclimate-test-reporter codacy-coverage + - travis_retry pip install -r requirements_dev.txt - python setup.py install script: - - pytest --cov=spectrum_overload --cov-report term-missing --durations 10 - - coverage xml + - pytest --cov=spectrum_overload --cov-report=term-missing --durations 10 + - coverage xml -i after_success: - coveralls diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..ddc179e --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,50 @@ +environment: + matrix: + # For Python versions available on Appveyor, see + # http://www.appveyor.com/docs/installed-software#python + - PYTHON: "C:\\Python27" + - PYTHON: "C:\\Python35" + - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python37" + - PYTHON: "C:\\Python27-x64" + - PYTHON: "C:\\Python35-x64" + - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python37-x64" + +install: + # We need wheel installed to build wheels + - "%PYTHON%\\python.exe -m pip install wheel" + + # Install spectrum_overload + - "%PYTHON%\\python.exe -m pip install -r requirements.txt" + - "%PYTHON%\\python.exe -m pip install -r requirements_dev.txt" + - "%PYTHON%\\python.exe setup.py install" + +build: off + +test_script: + # Put your test command here. + # If you don't need to build C extensions on 64-bit Python 3.3 or 3.4, + # you can remove "build.cmd" from the front of the command, as it's + # only needed to support those cases. + # Note that you must use the environment variable %PYTHON% to refer to + # the interpreter you're using - Appveyor does not do anything special + # to put the Python version you want to use on PATH. + - cmd: "%PYTHON%\\python.exe -m pytest --cov=. --cov-report term-missing --durations 10" + - cmd: "%PYTHON%\\python.exe -m coverage xml -i" + +after_test: + # This step builds your wheels. + # Again, you only need build.cmd if you're building C extensions for + # 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct + # interpreter + - "%PYTHON%\\python.exe setup.py bdist_wheel" + +artifacts: + # bdist_wheel puts your built wheel in the dist directory + - path: dist\* + +#on_success: +# You can use this step to upload your artifacts to a public website. +# See Appveyor's documentation for more details. Or you can simply +# access your wheels from the Appveyor "artifacts" tab for your build. diff --git a/requirements.txt b/requirements.txt index f732b66..a29861e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,5 @@ -numpy==1.13.3 -matplotlib==2.1.0 -astropy==2.0.2 -scipy==0.19.1 -pyastronomy==0.11.0 -hypothesis==3.31.2 -pytest==3.2.2 -pytest-cov==2.5.1 -python-coveralls==2.9.1 +numpy +matplotlib +astropy +scipy +pyastronomy diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..ee2c149 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,6 @@ +hypothesis +pytest +pytest-cov +python-coveralls +codeclimate-test-reporter +codacy-coverage diff --git a/setup.py b/setup.py index 78fc960..4535df9 100644 --- a/setup.py +++ b/setup.py @@ -65,9 +65,9 @@ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Natural Language :: English', ],