Skip to content

Commit de6260f

Browse files
authored
Merge pull request #3051 from bsipocz/MAINT_various_remote_fixes
MAINT: fixing various minor issues picked up in the remote tests
2 parents c1a8c7f + 02f9072 commit de6260f

File tree

5 files changed

+45
-37
lines changed

5 files changed

+45
-37
lines changed

astroquery/vo_conesearch/tests/test_conesearch.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from astropy import units as u
1414
from astropy.coordinates import ICRS, SkyCoord
1515
from astropy.io.votable.exceptions import W25
16-
from astropy.io.votable.tree import Table as VOTable
1716
from astropy.table import Table
1817
from astropy.utils.data import get_pkg_data_filename
1918
from astropy.utils import data
@@ -24,6 +23,14 @@
2423
from ..exceptions import VOSError, ConeSearchError
2524
from ...exceptions import NoResultsWarning
2625

26+
27+
try:
28+
# Workaround astropy deprecation, remove try/except once >=6.0 is required
29+
from astropy.io.votable.tree import TableElement as VOTable
30+
except ImportError:
31+
from astropy.io.votable.tree import Table as VOTable
32+
33+
2734
__doctest_skip__ = ['*']
2835

2936

@@ -117,10 +124,11 @@ def test_sky_coord_classic(self):
117124
def test_timeout_classic(self):
118125
"""Test timed out query."""
119126
with pytest.warns(W25, match='timed out'):
120-
with conf.set_temp('timeout', 1e-6):
121-
result = conesearch.conesearch(
122-
SCS_CENTER, SCS_RADIUS, cache=False,
123-
verbose=self.verbose, catalog_db=self.url)
127+
with pytest.warns(NoResultsWarning):
128+
with conf.set_temp('timeout', 1e-6):
129+
result = conesearch.conesearch(
130+
SCS_CENTER, SCS_RADIUS, cache=False,
131+
verbose=self.verbose, catalog_db=self.url)
124132
assert result is None
125133

126134
def test_searches_classic(self):

docs/cadc/cadc.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ these collections:
2626
>>> from astroquery.cadc import Cadc
2727
>>> cadc = Cadc()
2828
>>> for collection, details in sorted(cadc.get_collections().items()):
29-
... print(f'{collection} : {details}')
29+
... print(f'{collection} : {details}') # doctest: +IGNORE_OUTPUT
3030
...
3131
APASS : {'Description': 'The APASS collection at the CADC', 'Bands': ['Optical', 'Infrared|Optical', '']}
3232
BLAST : {'Description': 'The BLAST collection at the CADC', 'Bands': ['', 'Millimeter']}
@@ -313,8 +313,6 @@ To get a list of table objects:
313313
caom2.HarvestState
314314
caom2.SIAv1
315315
ivoa.ObsCore
316-
ivoa.ObsFile
317-
ivoa.ObsPart
318316
tap_schema.schemas
319317
tap_schema.tables
320318
tap_schema.columns

docs/esa/iso/iso.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ provided by this service, see section 'Getting Tables Details'.
8888
>>> from astroquery.esa.iso import ISO
8989
>>> import tarfile
9090
>>>
91-
>>> ISO.download_data('80000203', retrieval_type="OBSERVATION",
91+
>>> ISO.download_data("80000203", retrieval_type="OBSERVATION",
9292
... product_level="DEFAULT_DATA_SET",
9393
... filename="80000203", verbose=True)
9494
INFO: https://nida.esac.esa.int/nida-sl-tap/data?retrieval_type=OBSERVATION&DATA_RETRIEVAL_ORIGIN=astroquery&tdt=80000203&product_level=DEFAULT_DATA_SET [astroquery.esa.iso.core]
@@ -102,7 +102,7 @@ provided by this service, see section 'Getting Tables Details'.
102102
-rw-r--r-- idaops/0 14400 2005-12-23 11:02:55 ././ISO1659972236/EXTRAKON//psph80000203.fits
103103
-rw-r--r-- idaops/0 5599 2005-12-23 11:02:55 ././ISO1659972236/EXTRAKON//ppch80000203.gif
104104
-rw-r--r-- idaops/0 266240 2005-12-23 11:02:54 ././ISO1659972236/EXTRAKON//C10180000203.tar
105-
>>> tar.extractall()
105+
>>> tar.extractall(filter="fully_trusted")
106106
>>> tar.close()
107107

108108
'download_data' method invokes the data download of files from the ISO Data Archive, using the
@@ -409,7 +409,7 @@ If you are repeatedly getting failed queries, or bad/out-of-date results, try cl
409409
>>> from astroquery.esa.iso import ISO
410410
>>> ISO.clear_cache()
411411
412-
If this function is unavailable, upgrade your version of astroquery.
412+
If this function is unavailable, upgrade your version of astroquery.
413413
The ``clear_cache`` function was introduced in version 0.4.7.dev8479.
414414

415415

docs/esa/xmm_newton/xmm_newton.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ stored in the file 'results10.csv'. The result of this query can be printed by d
122122
INFO: Retrieving tables... [astroquery.utils.tap.core]
123123
INFO: Parsing tables... [astroquery.utils.tap.core]
124124
INFO: Done. [astroquery.utils.tap.core]
125-
['tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns',
125+
['public.dual', 'tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns',
126126
'tap_schema.key_columns', 'tap_schema.keys', 'tap_schema.schemas',
127-
'tap_schema.tables', 'xsa.dual', 'xsa.v_all_observations', 'xsa.v_epic_source',
127+
'tap_schema.tables', 'xsa.v_all_observations', 'xsa.v_epic_source',
128128
'xsa.v_epic_source_cat', 'xsa.v_epic_xmm_stack_cat', 'xsa.v_exposure',
129129
'xsa.v_instrument_mode', 'xsa.v_om_source', 'xsa.v_om_source_cat',
130130
'xsa.v_proposal', 'xsa.v_proposal_observation_info', 'xsa.v_publication',
@@ -205,7 +205,7 @@ If you are repeatedly getting failed queries, or bad/out-of-date results, try cl
205205
>>> from astroquery.esa.xmm_newton import XMMNewton
206206
>>> XMMNewton.clear_cache()
207207
208-
If this function is unavailable, upgrade your version of astroquery.
208+
If this function is unavailable, upgrade your version of astroquery.
209209
The ``clear_cache`` function was introduced in version 0.4.7.dev8479.
210210

211211

docs/gaia/gaia.rst

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ degrees around an specific point in RA/Dec coordinates. The results are sorted b
105105
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
106106
INFO: Query finished. [astroquery.utils.tap.core]
107107
>>> r.pprint(max_lines=12, max_width=130)
108-
dist solution_id DESIGNATION ... ebpminrp_gspphot_upper libname_gspphot
108+
dist solution_id designation ... ebpminrp_gspphot_upper libname_gspphot
109109
... mag
110110
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------
111111
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... --
@@ -126,7 +126,7 @@ Queries return a limited number of rows controlled by ``Gaia.ROW_LIMIT``. To cha
126126
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
127127
INFO: Query finished. [astroquery.utils.tap.core]
128128
>>> r.pprint(max_width=140)
129-
dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
129+
dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
130130
... mag mag
131131
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- ---------------
132132
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- --
@@ -146,7 +146,7 @@ To return an unlimited number of rows set ``Gaia.ROW_LIMIT`` to -1.
146146
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
147147
INFO: Query finished. [astroquery.utils.tap.core]
148148
>>> r.pprint(max_lines=12, max_width=140)
149-
dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
149+
dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
150150
... mag mag
151151
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- ---------------
152152
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- --
@@ -176,7 +176,7 @@ radius argument.
176176
INFO: Query finished. [astroquery.utils.tap.core]
177177
>>> r = j.get_results()
178178
>>> r.pprint()
179-
solution_id DESIGNATION ... dist
179+
solution_id designation ... dist
180180
...
181181
------------------- ---------------------------- ... ---------------------
182182
1636148068921376768 Gaia DR3 6636090334814214528 ... 0.0026043272506261527
@@ -207,15 +207,15 @@ To load only table names metadata (TAP+ capability):
207207
INFO: Done. [astroquery.utils.tap.core]
208208
>>> for table in tables:
209209
... print(table.get_qualified_name())
210-
external.external.apassdr9
211-
external.external.catwise2020
212-
external.external.gaiadr2_astrophysical_parameters
213-
external.external.gaiadr2_geometric_distance
214-
external.external.gaiaedr3_distance
210+
external.apassdr9
211+
external.catwise2020
212+
external.gaiadr2_astrophysical_parameters
213+
external.gaiadr2_geometric_distance
214+
external.gaiaedr3_distance
215215
...
216-
tap_schema.tap_schema.keys
217-
tap_schema.tap_schema.schemas
218-
tap_schema.tap_schema.tables
216+
tap_schema.keys
217+
tap_schema.schemas
218+
tap_schema.tables
219219

220220
To load all tables metadata (TAP compatible):
221221

@@ -227,11 +227,12 @@ To load all tables metadata (TAP compatible):
227227
INFO: Parsing tables... [astroquery.utils.tap.core]
228228
INFO: Done. [astroquery.utils.tap.core]
229229
>>> print(tables[0])
230-
TAP Table name: external.external.apassdr9
230+
TAP Table name: external.apassdr9
231231
Description: The AAVSO Photometric All-Sky Survey - Data Release 9
232232
This publication makes use of data products from the AAVSO
233233
Photometric All Sky Survey (APASS). Funded by the Robert Martin Ayers
234234
Sciences Fund and the National Science Foundation. Original catalogue released by Henden et al. 2015 AAS Meeting #225, id.336.16. Data retrieved using the VizieR catalogue access tool, CDS, Strasbourg, France. The original description of the VizieR service was published in A&AS 143, 23. VizieR catalogue II/336.
235+
Size (bytes): 22474547200
235236
Num. columns: 25
236237

237238

@@ -242,8 +243,9 @@ To load only a table (TAP+ capability):
242243
>>> from astroquery.gaia import Gaia
243244
>>> gaiadr3_table = Gaia.load_table('gaiadr3.gaia_source')
244245
>>> print(gaiadr3_table)
245-
TAP Table name: gaiadr3.gaiadr3.gaia_source
246+
TAP Table name: gaiadr3.gaia_source
246247
Description: This table has an entry for every Gaia observed source as published with this data release. It contains the basic source parameters, in their final state as processed by the Gaia Data Processing and Analysis Consortium from the raw data coming from the spacecraft. The table is complemented with others containing information specific to certain kinds of objects (e.g.~Solar--system objects, non--single stars, variables etc.) and value--added processing (e.g.~astrophysical parameters etc.). Further array data types (spectra, epoch measurements) are presented separately via Datalink resources.
248+
Size (bytes): 3646930329600
247249
Num. columns: 152
248250

249251

@@ -411,7 +413,7 @@ Query without saving results in a file:
411413
INFO: Query finished. [astroquery.utils.tap.core]
412414
>>> r = job.get_results()
413415
>>> print(r)
414-
DESIGNATION ra dec
416+
designation ra dec
415417
deg deg
416418
---------------------- ------------------ --------------------
417419
Gaia DR3 4295806720 44.99615537864534 0.005615226341865997
@@ -524,15 +526,15 @@ To obtain a list of the tables shared to a user type the following::
524526
INFO: Done. [astroquery.utils.tap.core]
525527
>>> for table in (tables):
526528
... print(table.get_qualified_name())
527-
external.external.apassdr9
528-
external.external.gaiadr2_astrophysical_parameters
529-
external.external.gaiadr2_geometric_distance
530-
external.external.gaiaedr3_distance
529+
external.apassdr9
530+
external.gaiadr2_astrophysical_parameters
531+
external.gaiadr2_geometric_distance
532+
external.gaiaedr3_distance
531533
... ... ...
532-
tap_schema.tap_schema.key_columns
533-
tap_schema.tap_schema.keys
534-
tap_schema.tap_schema.schemas
535-
tap_schema.tap_schema.tables
534+
tap_schema.key_columns
535+
tap_schema.keys
536+
tap_schema.schemas
537+
tap_schema.tables
536538

537539
2.3. Uploading table to user space
538540
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)