Skip to content

Commit

Permalink
Start writing tests... (#7)
Browse files Browse the repository at this point in the history
* Add astropy-helpers

* Add some of the dependencies

* Add an __all__

* Change opencv to opencv-python

* Fix up a bunch of the tests

* Make a couple of fixes uncovered by the tests

* Make license more visible

* Skip doctests for now

* Add dependencies on travis

* Drop osx test for now

* Use histogram autocut in test because median was not working on travis

* Use build stages to run tests on travis

* Add sphinx-astropy to Travis doc build

* Update helpers to master

* Fix helpers submodule

* Add egg-info tests to intial set of tests

* Remove the wrong helpers

* Change links to literals in docstrings
  • Loading branch information
mwcraig committed Aug 4, 2018
1 parent 76bbbb5 commit 54e4589
Show file tree
Hide file tree
Showing 10 changed files with 1,202 additions and 79 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "astropy_helpers"]
path = astropy_helpers
url = https://github.com/astropy/astropy-helpers.git
48 changes: 28 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:

# List other runtime dependencies for the package that are available as
# conda packages here.
- CONDA_DEPENDENCIES=''
- CONDA_DEPENDENCIES='ginga ipyevents pillow opencv-python'

# List other runtime dependencies for the package that are available as
# pip packages here.
Expand All @@ -55,62 +55,70 @@ env:
# line to use the X virtual framebuffer.
# - SETUP_XVFB=True

matrix:
# Make sure that egg_info works without dependencies
- PYTHON_VERSION=3.5 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info'

stages:
- name: Initial tests
- name: Comprehensive tests
- name: Cron tests
if: type = cron

matrix:

# Don't wait for allowed failures
fast_finish: true

include:
# Try MacOS X
- os: osx
env: SETUP_CMD='test'
- stage: Initial tests
env: PYTHON_VERSION=3.5 SETUP_CMD='egg_info'
- stage: Initial tests
env: PYTHON_VERSION=3.6 SETUP_CMD='egg_info'
- stage: Initial tests
env: PYTHON_VERSION=3.7 SETUP_CMD='egg_info'

# Do a coverage test.
- os: linux
- stage: Initial tests
env: SETUP_CMD='test --coverage'

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- os: linux
- stage: Comprehensive tests
env: SETUP_CMD='build_docs -w'
PIP_DEPENDENCIES='sphinx-astropy'

# Now try Astropy dev with the latest Python and LTS with Python 2.7 and 3.x.
- os: linux
# Now try Astropy dev with the latest Python and LTS with Python 3.x.
- stage: Comprehensive tests
env: ASTROPY_VERSION=development
EVENT_TYPE='pull_request push cron'
- os: linux
- stage: Comprehensive tests
env: ASTROPY_VERSION=lts

# Try all python versions and Numpy versions. Since we can assume that
# the Numpy developers have taken care of testing Numpy with different
# versions of Python, we can vary Python and Numpy versions at the same
# time.

- os: linux
- stage: Comprehensive tests
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.13
- os: linux
- stage: Comprehensive tests
env: NUMPY_VERSION=1.14

# Try numpy pre-release
- os: linux
- stage: Comprehensive tests
env: NUMPY_VERSION=prerelease
EVENT_TYPE='pull_request push cron'

# Do a PEP8 test with pycodestyle
- os: linux
- stage: Comprehensive tests
env: MAIN_CMD='pycodestyle astrowidgets --count' SETUP_CMD=''

# Try MacOS X
- stage: Cron tests
os: osx
env: SETUP_CMD='test'

allow_failures:
# Do a PEP8 test with pycodestyle
# (allow to fail unless your code completely compliant)
- os: linux
env: MAIN_CMD='pycodestyle astrowidgets --count' SETUP_CMD=''
- env: MAIN_CMD='pycodestyle astrowidgets --count' SETUP_CMD=''

install:

Expand Down
File renamed without changes.

0 comments on commit 54e4589

Please sign in to comment.