Skip to content

Commit

Permalink
Merge pull request #30 from pllim/sys-updates
Browse files Browse the repository at this point in the history
Use system pytest and update astropy-helpers
  • Loading branch information
pllim authored Jun 8, 2017
2 parents 865eed5 + f59898a commit ea8f415
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 26 deletions.
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ env:
# to repeat them for all configurations.
- NUMPY_VERSION=stable
- MAIN_CMD='python setup.py'
#- ASTROPY_VERSION=stable
- ASTROPY_VERSION=development
- ASTROPY_VERSION=stable
- SYNPHOT_VERSION=development
- SETUP_CMD='test'
- PIP_DEPENDENCIES=''
# For this package-template, we include examples of Cython modules,
# so Cython is required for testing. If your package does not include
# Cython code, you can set CONDA_DEPENDENCIES=''
#- CONDA_DEPENDENCIES='Cython'
- CONDA_DEPENDENCIES='Cython jinja2 scipy'
- CONDA_DEPENDENCIES='Cython jinja2 scipy pytest'
matrix:
# Make sure that egg_info works without dependencies
- SETUP_CMD='egg_info'
Expand All @@ -46,22 +45,19 @@ env:
matrix:
include:

# Do a coverage test in Python 2.
- python: 2.7
# Do a coverage test in Python 3.
- python: 3.5
env: SETUP_CMD='test --coverage'

# DISABLED FOR NOW
# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
#- python: 2.7
#- python: 3.5
# env: SETUP_CMD='build_sphinx -w'

# DISABLED FOR NOW
# Try Astropy development version
#- python: 2.7
# env: ASTROPY_VERSION=development
#- python: 3.5
# env: ASTROPY_VERSION=development
- python: 3.6
env: ASTROPY_VERSION=development

# Do a PEP8 test with pycodestyle
- python: 3.5
Expand All @@ -88,7 +84,7 @@ install:
# commands in the install: section below.

- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
- source ci-helpers/travis/setup_conda.sh

# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ environment:

matrix:

# We test Python 2.7 and 3.5
# We test Python 2.7 and 3.6

- PYTHON_VERSION: "2.7"
ASTROPY_VERSION: "development"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"

- PYTHON_VERSION: "3.5"
- PYTHON_VERSION: "3.6"
ASTROPY_VERSION: "development"
NUMPY_VERSION: "stable"

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ all_files = 1
upload-dir = docs/_build/html
show-response = 1

[pytest]
minversion = 2.2
[tool:pytest]
minversion = 3.0
norecursedirs = build docs/_build stsynphot/data

[ah_bootstrap]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
description=DESCRIPTION,
scripts=scripts,
install_requires=['numpy', 'astropy'], # 'numpy>=1.9', 'astropy>=1.3', 'scipy>=0.14', 'synphot>=0.1'
tests_require=['pytest'],
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/commissioning/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

# THIRD-PARTY
import numpy as np
import pytest
from numpy.testing import assert_allclose

# ASTROPY
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data

# ASTROLIB
try:
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy import units as u
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data

# SYNPHOT
from synphot import exceptions as synexceptions
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data

# SYNPHOT
from synphot.config import conf as synconf
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/tests/test_observationmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy import units as u
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data
from astropy.utils.data import get_pkg_data_filename

# SYNPHOT
Expand Down
5 changes: 4 additions & 1 deletion stsynphot/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
# STDLIB
import os

# THIRD-PARTY
import pytest

# ASTROPY
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data

# SYNPHOT
from synphot import exceptions as synexceptions
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/tests/test_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy import units as u
from astropy.io import fits
from astropy.modeling.models import Const1D
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data
from astropy.utils.data import get_pkg_data_filename

# SYNPHOT
Expand Down
3 changes: 2 additions & 1 deletion stsynphot/tests/test_stio.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy.tests.helper import pytest, remote_data
from astropy.tests.helper import remote_data
from astropy.utils.data import _find_pkg_data_path, get_pkg_data_filename

# SYNPHOT
Expand Down
2 changes: 1 addition & 1 deletion stsynphot/tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy.tests.helper import pytest
from astropy.utils.data import get_pkg_data_filename

# SYNPHOT
Expand Down
2 changes: 1 addition & 1 deletion stsynphot/tests/test_wavetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

# THIRD-PARTY
import numpy as np
import pytest

# ASTROPY
from astropy import units as u
from astropy.tests.helper import pytest

# LOCAL
from .. import exceptions
Expand Down

0 comments on commit ea8f415

Please sign in to comment.