Skip to content

Commit

Permalink
Fixing astropy testing deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Feb 19, 2020
1 parent 15846f9 commit 751936a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
11 changes: 3 additions & 8 deletions aesop/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from astropy.tests.pytest_plugins import *

# also save a copy of the astropy hooks so we can use them below when
# overriding
from astropy.tests import pytest_plugins as astropy_pytest_plugins
from astropy.tests.plugins.display import (PYTEST_HEADER_MODULES,
TESTED_VERSIONS)

import warnings

Expand All @@ -21,7 +21,7 @@

# Comment out this line to avoid deprecation warnings being raised as
# exceptions
enable_deprecations_as_exceptions()
# enable_deprecations_as_exceptions()

# Define list of packages for which to display version numbers in the test log
try:
Expand All @@ -32,11 +32,6 @@


def pytest_configure(config):
if hasattr(astropy_pytest_plugins, 'pytest_configure'):
# sure ought to be true right now, but always possible it will change in
# future versions of astropy
astropy_pytest_plugins.pytest_configure(config)

# activate image comparison tests only if the dependencies needed are installed:
# matplotlib, nose, pytest-mpl
try:
Expand Down
18 changes: 8 additions & 10 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ Opening example spectra
If you want to do this with your own data, make sure it is reduced by following the steps in :ref:`iraf`

Example ARCES spectra are available online for you to work with. You can
download them via Python like this:
download them via Python like this... this will download temporary copies of
the famous Kepler target KIC 8462852, also known as Boyajian's Star, and
spectroscopic standard O star BD+28 4211. We also create an
`~aesop.EchelleSpectrum` object for each star:

.. code-block:: python
Expand All @@ -31,20 +34,15 @@ download them via Python like this:
>>> target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
>>> spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
>>> target_path = download_file(target_url, show_progress=False) # doctest: +REMOTE_DATA
>>> standard_path = download_file(spectroscopic_standard_url, show_progress=False) # doctest: +REMOTE_DATA
This will download temporary copies of the famous Kepler target KIC 8462852,
also known as Boyajian's Star, and spectroscopic standard O star BD+28 4211. We
first create an `~aesop.EchelleSpectrum` object for each star:

.. code-block:: python
>>> target_path = download_file(target_url, show_progress=False)
>>> standard_path = download_file(spectroscopic_standard_url, show_progress=False)
>>> from aesop import EchelleSpectrum
>>> target_spectrum = EchelleSpectrum.from_fits(target_path)
>>> target_spectrum = EchelleSpectrum.from_fits(target_path) # doctest: +SKIP
>>> standard_spectrum = EchelleSpectrum.from_fits(standard_path)
You can check basic metadata for an `~aesop.EchelleSpectrum` object by printing
it:

Expand Down

0 comments on commit 751936a

Please sign in to comment.