File tree Expand file tree Collapse file tree 5 files changed +15
-23
lines changed
Expand file tree Collapse file tree 5 files changed +15
-23
lines changed Original file line number Diff line number Diff line change 5050 stage : Tests with various Astropy/Numpy versions
5151 env : PYTHON_VERSION=3.7
5252 NUMPY_VERSION=1.18
53- ASTROPY_VERSION=3
53+ ASTROPY_VERSION=4
5454
5555 # Test docs and PEP8
5656 - os : linux
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ Observe the source through a fictitious 10-μm filter:
2828
2929 >>> from synphot import SpectralElement, Box1D
3030 >>> N = SpectralElement(Box1D, x_0 = 10.5 * u.um, width = 1 * u.um)
31- >>> print (B.observe(N, unit = ' MJy' ))
32- 783576416.2276517 MJy
31+ >>> print (B.observe(N, unit = ' MJy' )) # doctest: +FLOAT_CMP
32+ 783577717.2783749 MJy
3333
3434Observe the source through a low-resolution spectrometer:
3535
Original file line number Diff line number Diff line change 2020
2121import numpy as np
2222import astropy .units as u
23+ from astropy .utils .misc import InheritDocstrings
2324
2425from .. import bib
2526from ..calib import Sun
@@ -163,11 +164,17 @@ def phase_HalleyMarcus(phase):
163164 return Phi
164165
165166
166- class DustComaQuantityMeta (type (u .SpecificTypeQuantity ), abc .ABCMeta ):
167- pass
167+ # checks if the installed astropy version is up-to-date
168+ if isinstance (u .SpecificTypeQuantity , InheritDocstrings ):
169+ # astropy < 4.0
170+ class DustComaQuantityMeta (InheritDocstrings , abc .ABCMeta ):
171+ pass
172+ else :
173+ # astropy >= 4.0
174+ DustComaQuantityMeta = abc .ABCMeta
168175
169176
170- class DustComaQuantity (u .SpecificTypeQuantity , abc . ABC ,
177+ class DustComaQuantity (u .SpecificTypeQuantity ,
171178 metaclass = DustComaQuantityMeta ):
172179 """Abstract base class for dust coma photometric models: Afrho, Efrho.
173180 """
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ github_project = NASA-Planetary-Science/sbpy
3636[options]
3737install_requires =
3838 numpy>=1.13.0
39- astropy>=3.0,<4.0
39+ astropy>=3.0
4040 astropy-helpers
4141 matplotlib
4242 ads
43- synphot<0.2
43+ synphot
4444 astroquery>=0.4.1.dev0
4545
4646[options.extras_require]
You can’t perform that action at this time.
0 commit comments