Skip to content

Commit

Permalink
CI/CD: update minimal package versions to cope with build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Winkel committed Jan 10, 2020
1 parent 5761dd9 commit 6e3fca0
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 57 deletions.
76 changes: 46 additions & 30 deletions .travis.yml
Expand Up @@ -48,7 +48,7 @@ env:
# so Cython is required for testing. If your package does not include
# Cython code, you can set CONDA_DEPENDENCIES=''
# - CONDA_DEPENDENCIES='pip wheel numpy scipy pytest astropy cython h5py matplotlib pyproj sgp4 sphinx-astropy'
- CONDA_DEPENDENCIES='pip wheel scipy pyqt>=5 pytest pytest-qt cython h5py matplotlib pyproj<2 sgp4 sphinx-astropy'
- CONDA_DEPENDENCIES='pip wheel scipy pyqt>=5 pytest pytest-qt cython h5py matplotlib pyproj>2 sgp4 sphinx-astropy'

# List other runtime dependencies for the package that are available as
# pip packages here.
Expand Down Expand Up @@ -85,66 +85,82 @@ matrix:
# otherwise users will keep getting "incompatible API" errors
# (For more information on ABI problems with numpy see:
# https://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling/18369312)
# for Windows we'll use 1.11, for Linux/MacOS 1.11 is also used
# (because with 1.9 - the conda-forge recommendation - the setup.py
# script tries to download 1.16 for some reason...)

# Standard linux, release
- os: linux
env:
- PYTHON_VERSION=3.7
- PYTHON_VERSION=3.8
- DO_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.16
# - ASTROPY_VERSION=stable
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=4

# Standard linux, release
- os: linux
env:
- PYTHON_VERSION=3.6
- PYTHON_VERSION=3.7
- DO_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.16
# - ASTROPY_VERSION=stable
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=4

# Standard linux, release
- os: linux
env:
- PYTHON_VERSION=3.5
- PYTHON_VERSION=3.6
- DO_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.14
# - ASTROPY_VERSION=stable
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=3

# # Standard linux, release
# - os: linux
# env:
# - PYTHON_VERSION=3.5
# - DO_DIST=YES
# - NUMPY_VERSION=1.11
# # - ASTROPY_VERSION=stable
# - ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9

# MacOS X - conda-clang, release
- os: osx
osx_image: xcode8.3
env:
- PYTHON_VERSION=3.7
- PYTHON_VERSION=3.8
- DO_MAC_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.16
- COMPILER='conda-clang'
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=4

# MacOS X - conda-clang, release
- os: osx
osx_image: xcode8.3
env:
- PYTHON_VERSION=3.6
- PYTHON_VERSION=3.7
- DO_MAC_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.16
- COMPILER='conda-clang'
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=4

# MacOS X - conda-clang, release
- os: osx
osx_image: xcode8.3
env:
- PYTHON_VERSION=3.5
- PYTHON_VERSION=3.6
- DO_MAC_DIST=YES
- NUMPY_VERSION=1.11
- NUMPY_VERSION=1.14
- COMPILER='conda-clang'
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
- ASTROPY_VERSION=3

# # MacOS X - conda-clang, release
# - os: osx
# osx_image: xcode8.3
# env:
# - PYTHON_VERSION=3.5
# - DO_MAC_DIST=YES
# - NUMPY_VERSION=1.11
# - COMPILER='conda-clang'
# - ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9

# MacOS X - conda-gcc
- os: osx
Expand Down Expand Up @@ -180,8 +196,8 @@ matrix:
- os: linux
env:
- PYTHON_VERSION=3.6
- NUMPY_VERSION=1.11
- ASTROPY_VERSION=2.0.11
- NUMPY_VERSION=1.14
- ASTROPY_VERSION=3
- SETUP_CMD='build_docs'
- UPLOAD_DOCS=YES

Expand All @@ -190,12 +206,12 @@ matrix:
env: ASTROPY_VERSION=development
EVENT_TYPE='pull_request push cron'

# Try py35 for compatibility
- os: linux
env:
- PYTHON_VERSION=3.5
- NUMPY_VERSION=1.11
- ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9
# # Try py35 for compatibility
# - os: linux
# env:
# - PYTHON_VERSION=3.5
# - NUMPY_VERSION=1.11
# - ASTROPY_VERSION=2.0.11 # need old astropy, for numpy 1.9

# Do a PEP8 test with pycodestyle
- os: linux
Expand Down
16 changes: 9 additions & 7 deletions README.rst
Expand Up @@ -143,23 +143,25 @@ Dependencies
We kept the dependencies as minimal as possible. The following packages are
required:

* Python 3.6 or later
* setuptools
* cython 0.23 or later
* numpy 1.11 or later
* astropy 1.3 or later (2.0 recommended)
* scipy 0.15 or later
* cython 0.29 or later
* numpy 1.14 or later
* astropy 3.0 or later
* scipy 0.19 or later
* pytest 2.6 or later

The following packages are optional, and you will need them for certain
features and to build the docs:

* matplotlib 1.2 or later; for some plot helpers
* pyproj 1.9 or later; for the `geospatial` subpackage
* matplotlib 2.0 or later; for some plot helpers
* pyproj 2.0 or later; for the `geospatial` subpackage
* sgp4 1.4 or later; for the `satellite` subpackage

For further details, we refer to the online documention `installation
instructions <https://bwinkel.github.io/pycraf/install.html>`_. It also
includes some hints for running pycraf on Windows or MacOS.
includes some hints for running pycraf on Windows or MacOS. Older versions
of the packages may work, but no support will be provided.

SRTM data
---------
Expand Down
31 changes: 20 additions & 11 deletions appveyor.yml
Expand Up @@ -39,31 +39,40 @@ environment:
# https://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling/18369312)
# for Windows we'll use 1.11, for Linux/MacOS 1.9 is used

- PYTHON_VERSION: "3.5"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "1.15"
# - PYTHON_VERSION: "3.5"
# ASTROPY_VERSION: "stable"
# NUMPY_VERSION: "1.15"

- PYTHON_VERSION: "3.5"
ASTROPY_VERSION: "=1.3.3"
NUMPY_VERSION: "1.11"
DO_RELEASE: "yes"
# - PYTHON_VERSION: "3.5"
# ASTROPY_VERSION: "=1.3.3"
# NUMPY_VERSION: "1.11"
# DO_RELEASE: "yes"

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

- PYTHON_VERSION: "3.6"
ASTROPY_VERSION: "=2.0.11"
NUMPY_VERSION: "1.11"
ASTROPY_VERSION: "3"
NUMPY_VERSION: "1.14"
DO_RELEASE: "yes"

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

- PYTHON_VERSION: "3.7"
ASTROPY_VERSION: "=2.0.11"
NUMPY_VERSION: "1.11"
ASTROPY_VERSION: "4"
NUMPY_VERSION: "1.16"
DO_RELEASE: "yes"

- PYTHON_VERSION: "3.8"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"

- PYTHON_VERSION: "3.8"
ASTROPY_VERSION: "4"
NUMPY_VERSION: "1.16"
DO_RELEASE: "yes"

platform:
Expand Down
13 changes: 7 additions & 6 deletions docs/install.rst
Expand Up @@ -7,18 +7,18 @@ Requirements

pycraf has the following strict requirements:

- `Python <http://www.python.org/>`__ 3.5 or later
- `Python <http://www.python.org/>`__ 3.6 or later

- `setuptools <https://pythonhosted.org/setuptools/>`__: Used for the package
installation.

- `Cython <http://cython.org/>`__ 0.23 or later
- `Cython <http://cython.org/>`__ 0.29 or later

- `NumPy <http://www.numpy.org/>`__ 1.11 or later
- `NumPy <http://www.numpy.org/>`__ 1.14 or later

- `SciPy <https://scipy.org/>`__: 0.15 or later
- `SciPy <https://scipy.org/>`__: 0.19 or later

- `astropy <http://www.astropy.org/>`__: 1.3 or later (2.0 recommended)
- `astropy <http://www.astropy.org/>`__: 3.0 or later

- `pytest <https://pypi.python.org/pypi/pytest>`__ 2.6 or later

Expand All @@ -28,12 +28,13 @@ There are a few optional packages, which are necessary for some functionality:
- `matplotlib <http://matplotlib.org/>`__ 1.5 or later: To provide plotting
functionality that `~pycraf.pathprof` enhances.

- `pyproj <https://pypi.python.org/pypi/pyproj>`__ 1.9 or later: This is a
- `pyproj <https://pypi.python.org/pypi/pyproj>`__ 2.0 or later: This is a
requirement for the `~pycraf.geospatial` package.

- `sgp4 <https://pypi.python.org/pypi/sgp4>`__ 1.4 or later: This is a
requirement for the `~pycraf.satellite` package.

Older versions of these packages may work, but no support will be provided.

Installing pycraf
==================
Expand Down
10 changes: 7 additions & 3 deletions pycraf/geospatial/tests/test_geospatial.py
Expand Up @@ -182,8 +182,10 @@ def test_create_transform(self):
with pytest.raises(TypeError):
_create_transform(1., 1.)

with pytest.raises(RuntimeError):
_create_transform('FOO', 'BAR')
# For some reason, this is no longer invalid, but returns
# Proj('+proj=longlat +ellps=bessel +no_defs', preserve_units=True), Proj('+proj=longlat +a=6378249.145 +rf=293.465 +no_defs', preserve_units=True))
# with pytest.raises(RuntimeError):
# _create_transform('FOO', 'BAR')

with pytest.raises(ValueError):
_create_transform(wgs84, etrs89, code_in='foo')
Expand Down Expand Up @@ -290,7 +292,9 @@ def test_itrf_to_wgs84(self):

assert_quantity_allclose(glon, dat['glon'] * apu.deg)
assert_quantity_allclose(glat, dat['glat'] * apu.deg)
assert_quantity_allclose(height, dat['height'] * apu.m)
assert_quantity_allclose(
height, dat['height'] * apu.m, atol=0.0002 * apu.m
)

@skip_pyproj
@pytest.mark.skip(
Expand Down

0 comments on commit 6e3fca0

Please sign in to comment.