Skip to content

Commit

Permalink
Merge pull request #1724 from cdeil/1724
Browse files Browse the repository at this point in the history
Support Python 3.7
  • Loading branch information
cdeil committed Sep 10, 2018
2 parents 359b4b8 + 6aab8d8 commit e6af2dc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ env:
- ASTROPY_USE_SYSTEM_PYTEST=1

matrix:
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.5 SETUP_CMD='egg_info'
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'

Expand All @@ -69,7 +68,7 @@ matrix:

# The main build that's used for coverage measurement
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='test -V --coverage'
env: PYTHON_VERSION=3.7 SETUP_CMD='test -V --coverage'

# Run tests without optional dependencies
# TODO: remove pyyaml here again as soon as this is resolved
Expand All @@ -82,21 +81,24 @@ matrix:

# Run tests without GAMMAPY_EXTRA available
- os: linux
env: FETCH_GAMMAPY_EXTRA=false PYTHON_VERSION=3.6 SETUP_CMD='test -V'
env: FETCH_GAMMAPY_EXTRA=false PYTHON_VERSION=3.7 SETUP_CMD='test -V'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES

# Build docs
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='build_docs -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES
# TODO: update the next build from Python 3.6 to 3.7
# when this CI-helpers issue is resolved:
# https://github.com/astropy/ci-helpers/issues/301#issuecomment-419813895
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='build_docs -w'
CONDA_DEPENDENCIES=$CONDA_DOCS_DEPENDENCIES

# Test conda build (which runs a bunch of useful tests after building the package)
# See https://conda.io/docs/bdist_conda.html
- os: linux
env: PYTHON_VERSION=3.6 MAIN_CMD='make' SETUP_CMD='conda'
env: PYTHON_VERSION=3.7 MAIN_CMD='make' SETUP_CMD='conda'
PACKAGING_TEST=true

# Older Python versions
Expand Down
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ environment:
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"

- PYTHON_VERSION: "3.7"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"


platform:
-x64
Expand Down
7 changes: 7 additions & 0 deletions gammapy/time/tests/test_lightcurve.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
import pytest
import numpy as np
from numpy.testing import assert_allclose
Expand Down Expand Up @@ -84,6 +85,12 @@ def test_lightcurve_properties_flux(lc):
# TODO: extend these tests to cover other time scales.
# In those cases, CSV should not round-trip because there
# is no header info in CSV to store the time scale!


@pytest.mark.skipif(
sys.version_info >= (3, 7),
reason="https://github.com/astropy/astropy/issues/7744#issuecomment-419813519",
)
@requires_dependency("yaml")
@pytest.mark.parametrize("format", ["fits", "ascii.ecsv", "ascii.csv"])
def test_lightcurve_read_write(tmpdir, lc, format):
Expand Down

0 comments on commit e6af2dc

Please sign in to comment.