Skip to content

Commit 16e1df2

Browse files
authored
Merge pull request #2119 from bsipocz/sphinx_conf_update
Fail sphinx build on warnings
2 parents 2aee654 + f39b197 commit 16e1df2

File tree

7 files changed

+30
-81
lines changed

7 files changed

+30
-81
lines changed

astroquery/alma/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from bs4 import BeautifulSoup
1313
import pyvo
1414

15-
1615
from six.moves.urllib_parse import urljoin
1716
import six
1817
from astropy.table import Table, Column, vstack
@@ -545,18 +544,19 @@ def get_data_info(self, uids, expand_tarfiles=False,
545544

546545
"""
547546
Return information about the data associated with ALMA uid(s)
547+
548548
Parameters
549549
----------
550-
uids: list or str
550+
uids : list or str
551551
A list of valid UIDs or a single UID.
552552
UIDs should have the form: 'uid://A002/X391d0b/X7b'
553-
expand_tarfiles: bool
553+
expand_tarfiles : bool
554554
False to return information on the tarfiles packages containing
555555
the data or True to return information about individual files in
556556
these packages
557-
with_auxiliary: bool
557+
with_auxiliary : bool
558558
True to include the auxiliary packages, False otherwise
559-
with_rawdata: bool
559+
with_rawdata : bool
560560
True to include raw data, False otherwise
561561
562562
Returns

astroquery/esa/xmm_newton/core.py

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -311,23 +311,14 @@ def get_epic_spectra(self, filename, source_number, *,
311311
instrument=[], path="", verbose=False):
312312
"""Extracts in path (when set) the EPIC sources spectral products from a
313313
given TAR file.
314-
For a given TAR file obtained with:
315-
XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
314+
316315
This function extracts the EPIC sources spectral products in a given
317316
instrument (or instruments) from it
318317
The result is a dictionary containing the paths to the extracted EPIC
319318
sources spectral products with key being the instrument
320319
If the instrument is not specified this function will
321320
return all the available instruments
322321
323-
Examples:
324-
Extracting all bands and instruments:
325-
result = XMM.get_epic_spectra(tarfile,83,
326-
instrument=['M1','M2','PN'])
327-
If we want to retrieve the source spectrum of the instrument PN
328-
fits_image = result['PN']
329-
fits_image will be the full path to the extracted FTZ file
330-
331322
Parameters
332323
----------
333324
filename : string, mandatory
@@ -354,6 +345,7 @@ def get_epic_spectra(self, filename, source_number, *,
354345
The structure and the content of the extracted compressed FITS files
355346
are described in details in the Pipeline Products Description
356347
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
348+
357349
"""
358350
_instrument = ["M1", "M2", "PN", "EP"]
359351
_product_type = ["SRSPEC", "BGSPEC", "SRCARF"]
@@ -445,9 +437,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
445437

446438
"""Extracts the EPIC images from a given TAR file
447439
448-
For a given TAR file obtained with:
449-
XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
450-
451440
This function extracts the EPIC images in a given band (or bands) and
452441
instrument (or instruments) from it
453442
@@ -461,30 +450,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
461450
If so, this function will also extract the exposure maps and detector
462451
masks within the specified bands and instruments
463452
464-
Examples
465-
--------
466-
467-
Extract all bands and instruments::
468-
result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
469-
instrument=['M1','M2','PN'],**kwargs)
470-
471-
If we want to retrieve the band 3 for the instrument PN (p-n junction)::
472-
fits_image = result[3]['PN']
473-
474-
``fits_image`` will be the full path to the extracted FTZ file
475-
476-
Extract the exposure and detector maps::
477-
result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
478-
instrument=['M1','M2','PN'],
479-
get_detmask=True,
480-
get_exposure_map=True)
481-
482-
If we want to retrieve exposure map in the band 3 for the instrument PN::
483-
fits_image = result[3]['PN_expo']
484-
485-
For retrieving the detector mask in the band 3 for the instrument PN::
486-
fits_image = result[3]['PN_det']
487-
488453
Parameters
489454
----------
490455
filename : string, mandatory
@@ -511,6 +476,7 @@ def get_epic_images(self, filename, band=[], instrument=[],
511476
The structure and the content of the extracted compressed FITS files
512477
are described in details in the Pipeline Products Description
513478
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
479+
514480
"""
515481

516482
_product_type = ["IMAGE_"]
@@ -661,8 +627,7 @@ def get_epic_lightcurve(self, filename, source_number, *,
661627
instrument=[], path=""):
662628
"""Extracts the EPIC sources light curve products from a given TAR file
663629
664-
For a given TAR file obtained with:
665-
XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
630+
For a given TAR file obtained with ``XMMNewton.download_data``.
666631
667632
This function extracts the EPIC sources light curve products in a given
668633
instrument (or instruments) from said TAR file
@@ -673,17 +638,6 @@ def get_epic_lightcurve(self, filename, source_number, *,
673638
If the instrument is not specified, this function will
674639
return all available instruments
675640
676-
Examples:
677-
678-
Extracting all instruments:
679-
result = XMM.get_epic_lightcurve(tarfile,146,
680-
instrument=['M1','M2','PN'])
681-
682-
If we want to retrieve the light curve of the instrument PN
683-
fits_image = result['PN']
684-
685-
fits_image will be the full path to the extracted FTZ file
686-
687641
Parameters
688642
----------
689643
filename : string, mandatory
@@ -708,6 +662,7 @@ def get_epic_lightcurve(self, filename, source_number, *,
708662
The structure and the content of the extracted compressed FITS files
709663
are described in details in the Pipeline Products Description
710664
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
665+
711666
"""
712667
_instrumnet = ["M1", "M2", "PN", "EP"]
713668
_band = [8]

astroquery/esasky/core.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,7 @@ def query_ids_maps(self, observation_ids, *, missions=__ALL_STRING, row_limit=DE
601601
--------
602602
query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010'], missions="HST-UV")
603603
query_ids_maps(observation_ids='lbsk03vbq')
604-
query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010', '1342221275', '1342221848'],
605-
missions=["Herschel", "HST-UV"])
604+
query_ids_maps(observation_ids=['lbsk03vbq', '1342221848'], missions=["Herschel", "HST-UV"])
606605
"""
607606
sanitized_observation_ids = self._sanitize_input_ids(observation_ids)
608607
sanitized_missions = self._sanitize_input_mission(missions)
@@ -655,8 +654,7 @@ def query_ids_catalogs(self, source_ids, *, catalogs=__ALL_STRING, row_limit=DEF
655654
--------
656655
query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642'], catalogs="CHANDRA-SC2")
657656
query_ids_catalogs(source_ids='2CXO J090341.1-322609')
658-
query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642', '44899', '45057'],
659-
catalogs=["CHANDRA-SC2", "Hipparcos-2"])
657+
query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '45057'], catalogs=["CHANDRA-SC2", "Hipparcos-2"])
660658
"""
661659
sanitized_catalogs = self._sanitize_input_catalogs(catalogs)
662660
sanitized_row_limit = self._sanitize_input_row_limit(row_limit)
@@ -849,10 +847,8 @@ def get_images(self, *, position=None, observation_ids=None, radius=__ZERO_ARCMI
849847
--------
850848
get_images(position="m101", radius="14'", missions="all")
851849
852-
missions = ["SUZAKU", "ISO-IR", "Chandra", "XMM-OM-OPTICAL", "XMM", "XMM-OM-UV", "HST-IR", "Herschel",
853-
"Spitzer", "HST-UV", "HST-OPTICAL"]
854-
observation_ids = ["100001010", "01500403", "21171", "0852000101", "0851180201", "0851180201", "n3tr01c3q",
855-
"1342247257", "30002561-25100", "hst_07553_3h_wfpc2_f160bw_pc", "ocli05leq"]
850+
missions = ["SUZAKU", "ISO-IR", "Chandra", "XMM-OM-OPTICAL", "XMM", "XMM-OM-UV", "HST-IR", "Herschel", "Spitzer", "HST-UV", "HST-OPTICAL"]
851+
observation_ids = ["100001010", "01500403", "21171", "0852000101", "0851180201", "0851180201", "n3tr01c3q", "1342247257", "30002561-25100", "hst_07553_3h_wfpc2_f160bw_pc", "ocli05leq"]
856852
get_images(observation_ids=observation_ids, missions=missions)
857853
"""
858854
if position is None and observation_ids is None:
@@ -943,11 +939,11 @@ def get_spectra(self, *, position=None, observation_ids=None, radius=__ZERO_ARCM
943939
944940
Examples
945941
--------
942+
946943
get_spectra(position="m101", radius="14'", missions=["HST-IR", "XMM-NEWTON", "HERSCHEL"])
947944
948945
missions = ["ISO-IR", "Chandra", "IUE", "XMM-NEWTON", "HST-IR", "Herschel", "HST-UV", "HST-OPTICAL"]
949-
observation_ids = ["02101201", "1005", "LWR13178", "0001730201", "ibh706cqq", "1342253595", "z1ax0102t",
950-
"oeik2s020"]
946+
observation_ids = ["02101201", "1005", "LWR13178", "0001730201", "ibh706cqq", "1342253595", "z1ax0102t", "oeik2s020"]
951947
get_spectra(observation_ids=observation_ids, missions=missions)
952948
953949
"""

docs/conf.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,13 @@
2929
import os
3030
import sys
3131

32+
# Load all of the global Astropy configuration
3233
try:
33-
import astropy_helpers
34+
from sphinx_astropy.conf.v1 import * # noqa
3435
except ImportError:
35-
# Building from inside the docs/ directory?
36-
if os.path.basename(os.getcwd()) == 'docs':
37-
a_h_path = os.path.abspath(os.path.join('..', 'astropy_helpers'))
38-
if os.path.isdir(a_h_path):
39-
sys.path.insert(1, a_h_path)
40-
41-
# Load all of the global Astropy configuration
42-
from astropy_helpers.sphinx.conf import *
43-
import urllib
36+
print('ERROR: the documentation requires the sphinx-astropy package to '
37+
'be installed')
38+
sys.exit(1)
4439

4540
from configparser import ConfigParser
4641
conf = ConfigParser()
@@ -70,10 +65,10 @@
7065
del intersphinx_mapping['scipy']
7166
del intersphinx_mapping['h5py']
7267
intersphinx_mapping.update({
73-
'astropy': ('http://docs.astropy.org/en/stable/', None),
68+
'astropy': ('https://docs.astropy.org/en/stable/', None),
7469
'requests': ('https://requests.kennethreitz.org/en/stable/', None),
75-
'pyregion': ('http://pyregion.readthedocs.io/en/stable/', None),
76-
'regions': ('http://astropy-regions.readthedocs.io/en/stable/', None),
70+
'pyregion': ('https://pyregion.readthedocs.io/en/stable/', None),
71+
'regions': ('https://astropy-regions.readthedocs.io/en/stable/', None),
7772
'mocpy': ('https://cds-astro.github.io/mocpy/', None),
7873
'pyvo': ('https://pyvo.readthedocs.io/en/stable/', None),
7974
})

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The following modules have been completed using a common API:
189189
hitran/hitran.rst
190190
ibe/ibe.rst
191191
irsa/irsa.rst
192-
irsa/irsa_dust.rst
192+
irsa_dust/irsa_dust.rst
193193
jplspec/jplspec.rst
194194
magpis/magpis.rst
195195
mast/mast.rst
@@ -260,7 +260,7 @@ for each source)
260260
gama/gama.rst
261261
ibe/ibe.rst
262262
irsa/irsa.rst
263-
irsa/irsa_dust.rst
263+
irsa_dust/irsa_dust.rst
264264
mast/mast.rst
265265
nasa_exoplanet_archive/nasa_exoplanet_archive.rst
266266
ned/ned.rst

docs/nasa_exoplanet_archive/nasa_exoplanet_archive.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ More information about the development of a more integrated NASA Exoplanet Archi
1414
fully TAP supported services can be found at [3]_.
1515

1616
*NOTE*: the ``exoplanet`` and ``exomultpars`` tables are no longer available and have been replaced by the
17-
Planetary Systems table (``ps``). Likewise, the `compositepars` table has been replaced by the
17+
Planetary Systems table (``ps``). Likewise, the ``compositepars`` table has been replaced by the
1818
Planetary Systems Composite Parameters table (``pscomppars``). Both the ``ps`` and ``pscomppars`` tables are accessible
1919
through the Exoplanet Archive TAP service. Database column names have changed;
2020
`this document <https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html>`_ contains the current definitions

readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ conda:
33

44
python:
55
setup_py_install: true
6+
7+
sphinx:
8+
fail_on_warning: true

0 commit comments

Comments
 (0)