Skip to content

Commit

Permalink
Test on python 3.7 (#65)
Browse files Browse the repository at this point in the history
* 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 7a155a6.

* Update classifiers for python 3.7

* Add shippable config

* Add appveyor config
  • Loading branch information
jason-neal committed Aug 6, 2018
1 parent 30e94e2 commit 335d8d6
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 15 deletions.
48 changes: 48 additions & 0 deletions .shippable.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
50 changes: 50 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 5 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hypothesis
pytest
pytest-cov
python-coveralls
codeclimate-test-reporter
codacy-coverage
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],

Expand Down

0 comments on commit 335d8d6

Please sign in to comment.