Skip to content

Commit 13014a6

Browse files
committed
DOC: enable doctesting on index
1 parent b7cba3b commit 13014a6

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

docs/index.rst

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. doctest-skip-all
2-
31
Astroquery
42
==========
53

@@ -127,21 +125,19 @@ Using astroquery
127125
All astroquery modules are supposed to follow the same API. In its simplest form, the API involves
128126
queries based on coordinates or object names. Some simple examples, using SIMBAD:
129127

130-
.. code-block:: python
128+
.. doctest-remote-data::
131129

132130
>>> from astroquery.simbad import Simbad
133131
>>> result_table = Simbad.query_object("m1")
134-
>>> result_table.pprint(show_unit=True)
135-
MAIN_ID RA DEC RA_PREC ... COO_QUAL COO_WAVELENGTH COO_BIBCODE
136-
"h:m:s" "d:m:s" ...
137-
------- ----------- ----------- ------- ... -------- -------------- -------------------
138-
M 1 05 34 31.94 +22 00 52.2 6 ... C R 2011A&A...533A..10L
139-
140-
132+
>>> result_table.pprint()
133+
MAIN_ID RA DEC ... COO_WAVELENGTH COO_BIBCODE SCRIPT_NUMBER_ID
134+
"h:m:s" "d:m:s" ...
135+
------- -------- -------- ... -------------- ----------- ----------------
136+
M 1 05 34 32 +22 00.8 ... R 1
141137

142138
All query tools allow coordinate-based queries:
143139

144-
.. code-block:: python
140+
.. doctest-remote-data::
145141

146142
>>> from astropy import coordinates
147143
>>> import astropy.units as u
@@ -150,13 +146,14 @@ All query tools allow coordinate-based queries:
150146
>>> r = 5 * u.arcminute
151147
>>> result_table = Simbad.query_region(c, radius=r)
152148
>>> result_table.pprint(show_unit=True, max_width=80, max_lines=5)
153-
MAIN_ID RA DEC ... COO_WAVELENGTH COO_BIBCODE
154-
"h:m:s" "d:m:s" ...
155-
------------ ------------ ------------ ... -------------- -------------------
156-
M 42 05 35 17.3 -05 23 28 ... 1981MNRAS.194..693L
157-
... ... ... ... ... ...
158-
V* V2114 Ori 05 35 01.671 -05 26 36.30 ... I 2003yCat.2246....0C
159-
149+
MAIN_ID RA ... COO_BIBCODE SCRIPT_NUMBER_ID
150+
"h:m:s" ...
151+
----------------------- ------------- ... ------------------- ----------------
152+
NAME Ori Region 05 35 17.30 ... 1
153+
... ... ... ... ...
154+
2MASS J05353573-0525256 05 35 35.7755 ... 2020yCat.1350....0G 1
155+
V* V2114 Ori 05 35 01.6720 ... 2020yCat.1350....0G 1
156+
Length = 3273 rows
160157

161158
For additional guidance and examples, read the documentation for the individual services below.
162159

@@ -420,7 +417,7 @@ services in Astroquery, you can use them for your scripts, but we don't guarante
420417

421418
To debug astroquery, logging level can be configured with the following:
422419

423-
.. code-block:: python
420+
.. doctest-skip::
424421

425422
>>> from astroquery import log
426423
>>> log.setLevel(level)

0 commit comments

Comments
 (0)