Skip to content

Commit c3114b1

Browse files
authored
Merge pull request #2565 from bsipocz/DOC_add_index_testing
DOC: enabling testing on index page
2 parents f67cfc9 + 13014a6 commit c3114b1

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

docs/index.rst

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

@@ -99,6 +97,7 @@ and for running the tests:
9997

10098
* `curl <https://curl.haxx.se/>`__
10199
* `pytest-astropy <https://github.com/astropy/pytest-astropy>`__
100+
* `pytest-rerunfailures <https://github.com/pytest-dev/pytest-rerunfailures>`__
102101

103102
The following packages are optional dependencies and are required for the
104103
full functionality of the `~astroquery.alma` module:
@@ -126,21 +125,19 @@ Using astroquery
126125
All astroquery modules are supposed to follow the same API. In its simplest form, the API involves
127126
queries based on coordinates or object names. Some simple examples, using SIMBAD:
128127

129-
.. code-block:: python
128+
.. doctest-remote-data::
130129

131130
>>> from astroquery.simbad import Simbad
132131
>>> result_table = Simbad.query_object("m1")
133-
>>> result_table.pprint(show_unit=True)
134-
MAIN_ID RA DEC RA_PREC ... COO_QUAL COO_WAVELENGTH COO_BIBCODE
135-
"h:m:s" "d:m:s" ...
136-
------- ----------- ----------- ------- ... -------- -------------- -------------------
137-
M 1 05 34 31.94 +22 00 52.2 6 ... C R 2011A&A...533A..10L
138-
139-
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
140137

141138
All query tools allow coordinate-based queries:
142139

143-
.. code-block:: python
140+
.. doctest-remote-data::
144141

145142
>>> from astropy import coordinates
146143
>>> import astropy.units as u
@@ -149,13 +146,14 @@ All query tools allow coordinate-based queries:
149146
>>> r = 5 * u.arcminute
150147
>>> result_table = Simbad.query_region(c, radius=r)
151148
>>> result_table.pprint(show_unit=True, max_width=80, max_lines=5)
152-
MAIN_ID RA DEC ... COO_WAVELENGTH COO_BIBCODE
153-
"h:m:s" "d:m:s" ...
154-
------------ ------------ ------------ ... -------------- -------------------
155-
M 42 05 35 17.3 -05 23 28 ... 1981MNRAS.194..693L
156-
... ... ... ... ... ...
157-
V* V2114 Ori 05 35 01.671 -05 26 36.30 ... I 2003yCat.2246....0C
158-
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
159157

160158
For additional guidance and examples, read the documentation for the individual services below.
161159

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

420418
To debug astroquery, logging level can be configured with the following:
421419

422-
.. code-block:: python
420+
.. doctest-skip::
423421

424422
>>> from astroquery import log
425423
>>> log.setLevel(level)

0 commit comments

Comments
 (0)