From 81202d39a7b8376971ad98fa2dccc4e6ea456dc1 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Sat, 7 Nov 2015 03:22:25 +0000 Subject: [PATCH 1/5] Updating .travis to reflect recent miniconda changes --- .travis.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 76c9f09..b81460a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ env: matrix: include: - # Do a coverage test in Python 2. + # Do a coverage test in Python 2. - python: 2.7 env: SETUP_CMD='test --coverage' @@ -59,11 +59,15 @@ before_install: # Use utf8 encoding. Should be default, but this is insurance against # future changes - export PYTHONIOENCODING=UTF8 - - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh - - chmod +x miniconda.sh - - ./miniconda.sh -b - - export PATH=/home/travis/miniconda/bin:$PATH - - conda update --yes conda + + # http://conda.pydata.org/docs/travis.html#the-travis-yml-file + - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; + - 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 update -q conda + - conda info -a # UPDATE APT-GET LISTINGS - sudo apt-get update From 51a6a1fec16ddb02a8fbac6123ad24d7eb359398 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Sat, 7 Nov 2015 03:22:49 +0000 Subject: [PATCH 2/5] Opting in container based travis --- .travis.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b81460a..11ddc20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,17 @@ language: python +# Setting sudo to false opts in to Travis-CI container-based builds. +sudo: false + +# The apt packages below are needed for sphinx builds, which can no longer +# be installed with sudo apt-get. +addons: + apt: + packages: + - graphviz + - texlive-latex-extra + - dvipng + python: - 2.6 - 2.7 @@ -69,12 +81,6 @@ before_install: - conda update -q conda - conda info -a - # UPDATE APT-GET LISTINGS - - sudo apt-get update - - # DOCUMENTATION DEPENDENCIES - - if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi - install: # CONDA From cd2084ee7e1dda545b55b9d4a5fc0a0f52eb5d9d Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Sat, 7 Nov 2015 03:26:05 +0000 Subject: [PATCH 3/5] Adding customized testing header --- montage_wrapper/conftest.py | 40 ++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/montage_wrapper/conftest.py b/montage_wrapper/conftest.py index 10cac21..382a90e 100644 --- a/montage_wrapper/conftest.py +++ b/montage_wrapper/conftest.py @@ -1,3 +1,5 @@ +import os + # this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. @@ -8,27 +10,19 @@ ## exceptions # enable_deprecations_as_exceptions() -## Uncomment and customize the following lines to add/remove entries -## from the list of packages for which version numbers are displayed -## when running the tests -# try: -# PYTEST_HEADER_MODULES['Astropy'] = 'astropy' -# PYTEST_HEADER_MODULES['scikit-image'] = 'skimage' -# del PYTEST_HEADER_MODULES['h5py'] -# except NameError: # needed to support Astropy < 1.0 -# pass +try: + PYTEST_HEADER_MODULES['Astropy'] = 'astropy' + del PYTEST_HEADER_MODULES['h5py'] + del PYTEST_HEADER_MODULES['Scipy'] +except NameError: # needed to support Astropy < 1.0 + pass + +# This is to figure out the affiliated package version, rather than +# using Astropy's +from . import version -## Uncomment the following lines to display the version number of the -## package rather than the version number of Astropy in the top line when -## running the tests. -# import os -# -## This is to figure out the affiliated package version, rather than -## using Astropy's -# from . import version -# -# try: -# packagename = os.path.basename(os.path.dirname(__file__)) -# TESTED_VERSIONS[packagename] = version.version -# except NameError: # Needed to support Astropy <= 1.0.0 -# pass +try: + packagename = os.path.basename(os.path.dirname(__file__)) + TESTED_VERSIONS[packagename] = version.version +except NameError: # Needed to support Astropy <= 1.0.0 + pass From 344a54809c17d40bd7ec9cec47eecf665845b788 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Sat, 7 Nov 2015 03:27:15 +0000 Subject: [PATCH 4/5] Updating gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6e6c485..8310fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__ # Other generated files */version.py +montage_wrapper/cython_version.py # Sphinx _build From 1c1b91ec41b5ec986b3e187c3831c3617859dc35 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Sun, 3 Jul 2016 20:02:08 +0100 Subject: [PATCH 5/5] Opting in ci-helpers --- .travis.yml | 110 ++++++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 72 deletions(-) diff --git a/.travis.yml b/.travis.yml index 11ddc20..67b0497 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ language: python +python: + - 2.7 + - 3.4 + - 3.5 + # Setting sudo to false opts in to Travis-CI container-based builds. sudo: false @@ -12,31 +17,24 @@ addons: - texlive-latex-extra - dvipng -python: - - 2.6 - - 2.7 - - 3.3 - - 3.4 - # This is just for "egg_info". All other builds are explicitly given in the matrix env: global: + # The following versions are the 'default' for tests, unless - # overidden underneath. They are defined here in order to save having + # overridden underneath. They are defined here in order to save having # to repeat them for all configurations. - - NUMPY_VERSION=1.9 + - NUMPY_VERSION=stable - ASTROPY_VERSION=stable - - CONDA_INSTALL='conda install -c astropy-ci-extras --yes' - - PIP_INSTALL='pip install' + - SETUP_CMD='test' + - CONDA_DEPENDENCIES='' + - PIP_DEPENDENCIES='' + matrix: - SETUP_CMD='egg_info' + - SETUP_CMD='test' matrix: include: - - # Do a coverage test in Python 2. - - python: 2.7 - env: SETUP_CMD='test --coverage' - # Check for sphinx doc build warnings - we do this first because it # may run for a long time - python: 2.7 @@ -44,73 +42,41 @@ matrix: # Try Astropy development version - python: 2.7 - env: ASTROPY_VERSION=development SETUP_CMD='test' - - python: 3.3 - env: ASTROPY_VERSION=development SETUP_CMD='test' - - # Try all python versions with the latest numpy - - python: 2.6 - env: SETUP_CMD='test' + env: ASTROPY_VERSION=development SETUP_CMD='test --coverage' + - python: 3.5 + env: ASTROPY_VERSION=development - python: 2.7 - env: SETUP_CMD='test' + env: ASTROPY_VERSION=lts + - python: 3.5 + env: ASTROPY_VERSION=lts + + # Python 3.3 doesn't have numpy 1.10 in conda, they can be put + # back into the main matrix once the numpy build is available in the + # astropy-ci-extras channel (or in the one provided in the + # CONDA_CHANNELS environmental variable). + - python: 3.3 + env: SETUP_CMD='egg_info' - python: 3.3 - env: SETUP_CMD='test' - - python: 3.4 - env: SETUP_CMD='test' + env: SETUP_CMD='test' NUMPY_VERSION=1.9 # Try older numpy versions - python: 2.7 - env: NUMPY_VERSION=1.8 SETUP_CMD='test' + env: NUMPY_VERSION=1.10 - python: 2.7 - env: NUMPY_VERSION=1.7 SETUP_CMD='test' + env: NUMPY_VERSION=1.9 - python: 2.7 - env: NUMPY_VERSION=1.6 SETUP_CMD='test' - -before_install: - - # Use utf8 encoding. Should be default, but this is insurance against - # future changes - - export PYTHONIOENCODING=UTF8 + env: NUMPY_VERSION=1.8 + - python: 2.7 + env: NUMPY_VERSION=1.7 - # http://conda.pydata.org/docs/travis.html#the-travis-yml-file - - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - - 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 update -q conda - - conda info -a + # Try numpy pre-release + - python: 3.5 + env: NUMPY_VERSION=prerelease install: - - # CONDA - - conda create --yes -n test -c astropy-ci-extras python=$TRAVIS_PYTHON_VERSION - - source activate test - - # CORE DEPENDENCIES - - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION pytest pip Cython jinja2; fi - - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL pytest-xdist; fi - - # ASTROPY - - if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == development ]]; then $PIP_INSTALL git+http://github.com/astropy/astropy.git#egg=astropy; fi - - if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == stable ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION astropy; fi - - # OPTIONAL DEPENDENCIES - # Here you can add any dependencies your package may have. You can use - # conda for packages available through conda, or pip for any other - # packages. You should leave the `numpy=$NUMPY_VERSION` in the `conda` - # install since this ensures Numpy does not get automatically upgraded. - # - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION ... ; fi - # - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL ...; fi - - # DOCUMENTATION DEPENDENCIES - # build_sphinx needs sphinx and matplotlib (for plot_directive). Note that - # this matplotlib will *not* work with py 3.x, but our sphinx build is - # currently 2.7, so that's fine - - if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION Sphinx matplotlib; fi - - # COVERAGE DEPENDENCIES - - if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_INSTALL coverage coveralls; fi + # Installing python dependencies with conda + - git clone git://github.com/astropy/ci-helpers.git + - source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh # Build Montage from source - wget http://montage.ipac.caltech.edu/download/Montage_v3.3.tar.gz