diff --git a/astroquery/vo_conesearch/tests/test_conesearch.py b/astroquery/vo_conesearch/tests/test_conesearch.py index a1672f7580..48f1bb51e1 100644 --- a/astroquery/vo_conesearch/tests/test_conesearch.py +++ b/astroquery/vo_conesearch/tests/test_conesearch.py @@ -13,7 +13,6 @@ from astropy import units as u from astropy.coordinates import ICRS, SkyCoord from astropy.io.votable.exceptions import W25 -from astropy.io.votable.tree import Table as VOTable from astropy.table import Table from astropy.utils.data import get_pkg_data_filename from astropy.utils import data @@ -24,6 +23,14 @@ from ..exceptions import VOSError, ConeSearchError from ...exceptions import NoResultsWarning + +try: + # Workaround astropy deprecation, remove try/except once >=6.0 is required + from astropy.io.votable.tree import TableElement as VOTable +except ImportError: + from astropy.io.votable.tree import Table as VOTable + + __doctest_skip__ = ['*'] @@ -117,10 +124,11 @@ def test_sky_coord_classic(self): def test_timeout_classic(self): """Test timed out query.""" with pytest.warns(W25, match='timed out'): - with conf.set_temp('timeout', 1e-6): - result = conesearch.conesearch( - SCS_CENTER, SCS_RADIUS, cache=False, - verbose=self.verbose, catalog_db=self.url) + with pytest.warns(NoResultsWarning): + with conf.set_temp('timeout', 1e-6): + result = conesearch.conesearch( + SCS_CENTER, SCS_RADIUS, cache=False, + verbose=self.verbose, catalog_db=self.url) assert result is None def test_searches_classic(self): diff --git a/docs/cadc/cadc.rst b/docs/cadc/cadc.rst index 511d165135..b04e5ac9d5 100644 --- a/docs/cadc/cadc.rst +++ b/docs/cadc/cadc.rst @@ -26,7 +26,7 @@ these collections: >>> from astroquery.cadc import Cadc >>> cadc = Cadc() >>> for collection, details in sorted(cadc.get_collections().items()): - ... print(f'{collection} : {details}') + ... print(f'{collection} : {details}') # doctest: +IGNORE_OUTPUT ... APASS : {'Description': 'The APASS collection at the CADC', 'Bands': ['Optical', 'Infrared|Optical', '']} BLAST : {'Description': 'The BLAST collection at the CADC', 'Bands': ['', 'Millimeter']} @@ -313,8 +313,6 @@ To get a list of table objects: caom2.HarvestState caom2.SIAv1 ivoa.ObsCore - ivoa.ObsFile - ivoa.ObsPart tap_schema.schemas tap_schema.tables tap_schema.columns diff --git a/docs/esa/iso/iso.rst b/docs/esa/iso/iso.rst index 93421565c2..99c805b69f 100644 --- a/docs/esa/iso/iso.rst +++ b/docs/esa/iso/iso.rst @@ -88,7 +88,7 @@ provided by this service, see section 'Getting Tables Details'. >>> from astroquery.esa.iso import ISO >>> import tarfile >>> - >>> ISO.download_data('80000203', retrieval_type="OBSERVATION", + >>> ISO.download_data("80000203", retrieval_type="OBSERVATION", ... product_level="DEFAULT_DATA_SET", ... filename="80000203", verbose=True) 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'. -rw-r--r-- idaops/0 14400 2005-12-23 11:02:55 ././ISO1659972236/EXTRAKON//psph80000203.fits -rw-r--r-- idaops/0 5599 2005-12-23 11:02:55 ././ISO1659972236/EXTRAKON//ppch80000203.gif -rw-r--r-- idaops/0 266240 2005-12-23 11:02:54 ././ISO1659972236/EXTRAKON//C10180000203.tar - >>> tar.extractall() + >>> tar.extractall(filter="fully_trusted") >>> tar.close() '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 >>> from astroquery.esa.iso import ISO >>> ISO.clear_cache() -If this function is unavailable, upgrade your version of astroquery. +If this function is unavailable, upgrade your version of astroquery. The ``clear_cache`` function was introduced in version 0.4.7.dev8479. diff --git a/docs/esa/xmm_newton/xmm_newton.rst b/docs/esa/xmm_newton/xmm_newton.rst index 781fa971c1..08ee3e1c49 100644 --- a/docs/esa/xmm_newton/xmm_newton.rst +++ b/docs/esa/xmm_newton/xmm_newton.rst @@ -122,9 +122,9 @@ stored in the file 'results10.csv'. The result of this query can be printed by d INFO: Retrieving tables... [astroquery.utils.tap.core] INFO: Parsing tables... [astroquery.utils.tap.core] INFO: Done. [astroquery.utils.tap.core] - ['tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns', + ['public.dual', 'tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns', 'tap_schema.key_columns', 'tap_schema.keys', 'tap_schema.schemas', - 'tap_schema.tables', 'xsa.dual', 'xsa.v_all_observations', 'xsa.v_epic_source', + 'tap_schema.tables', 'xsa.v_all_observations', 'xsa.v_epic_source', 'xsa.v_epic_source_cat', 'xsa.v_epic_xmm_stack_cat', 'xsa.v_exposure', 'xsa.v_instrument_mode', 'xsa.v_om_source', 'xsa.v_om_source_cat', '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 >>> from astroquery.esa.xmm_newton import XMMNewton >>> XMMNewton.clear_cache() -If this function is unavailable, upgrade your version of astroquery. +If this function is unavailable, upgrade your version of astroquery. The ``clear_cache`` function was introduced in version 0.4.7.dev8479. diff --git a/docs/gaia/gaia.rst b/docs/gaia/gaia.rst index d9fb4f996a..40d492eee8 100644 --- a/docs/gaia/gaia.rst +++ b/docs/gaia/gaia.rst @@ -105,7 +105,7 @@ degrees around an specific point in RA/Dec coordinates. The results are sorted b >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) INFO: Query finished. [astroquery.utils.tap.core] >>> r.pprint(max_lines=12, max_width=130) - dist solution_id DESIGNATION ... ebpminrp_gspphot_upper libname_gspphot + dist solution_id designation ... ebpminrp_gspphot_upper libname_gspphot ... mag --------------------- ------------------- ---------------------------- ... ---------------------- --------------- 0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- @@ -126,7 +126,7 @@ Queries return a limited number of rows controlled by ``Gaia.ROW_LIMIT``. To cha >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) INFO: Query finished. [astroquery.utils.tap.core] >>> r.pprint(max_width=140) - dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot + dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot ... mag mag --------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- --------------- 0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- -- @@ -146,7 +146,7 @@ To return an unlimited number of rows set ``Gaia.ROW_LIMIT`` to -1. >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) INFO: Query finished. [astroquery.utils.tap.core] >>> r.pprint(max_lines=12, max_width=140) - dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot + dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot ... mag mag --------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- --------------- 0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- -- @@ -176,7 +176,7 @@ radius argument. INFO: Query finished. [astroquery.utils.tap.core] >>> r = j.get_results() >>> r.pprint() - solution_id DESIGNATION ... dist + solution_id designation ... dist ... ------------------- ---------------------------- ... --------------------- 1636148068921376768 Gaia DR3 6636090334814214528 ... 0.0026043272506261527 @@ -207,15 +207,15 @@ To load only table names metadata (TAP+ capability): INFO: Done. [astroquery.utils.tap.core] >>> for table in tables: ... print(table.get_qualified_name()) - external.external.apassdr9 - external.external.catwise2020 - external.external.gaiadr2_astrophysical_parameters - external.external.gaiadr2_geometric_distance - external.external.gaiaedr3_distance + external.apassdr9 + external.catwise2020 + external.gaiadr2_astrophysical_parameters + external.gaiadr2_geometric_distance + external.gaiaedr3_distance ... - tap_schema.tap_schema.keys - tap_schema.tap_schema.schemas - tap_schema.tap_schema.tables + tap_schema.keys + tap_schema.schemas + tap_schema.tables To load all tables metadata (TAP compatible): @@ -227,11 +227,12 @@ To load all tables metadata (TAP compatible): INFO: Parsing tables... [astroquery.utils.tap.core] INFO: Done. [astroquery.utils.tap.core] >>> print(tables[0]) - TAP Table name: external.external.apassdr9 + TAP Table name: external.apassdr9 Description: The AAVSO Photometric All-Sky Survey - Data Release 9 This publication makes use of data products from the AAVSO Photometric All Sky Survey (APASS). Funded by the Robert Martin Ayers 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. + Size (bytes): 22474547200 Num. columns: 25 @@ -242,8 +243,9 @@ To load only a table (TAP+ capability): >>> from astroquery.gaia import Gaia >>> gaiadr3_table = Gaia.load_table('gaiadr3.gaia_source') >>> print(gaiadr3_table) - TAP Table name: gaiadr3.gaiadr3.gaia_source + TAP Table name: gaiadr3.gaia_source 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. + Size (bytes): 3646930329600 Num. columns: 152 @@ -411,7 +413,7 @@ Query without saving results in a file: INFO: Query finished. [astroquery.utils.tap.core] >>> r = job.get_results() >>> print(r) - DESIGNATION ra dec + designation ra dec deg deg ---------------------- ------------------ -------------------- 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:: INFO: Done. [astroquery.utils.tap.core] >>> for table in (tables): ... print(table.get_qualified_name()) - external.external.apassdr9 - external.external.gaiadr2_astrophysical_parameters - external.external.gaiadr2_geometric_distance - external.external.gaiaedr3_distance + external.apassdr9 + external.gaiadr2_astrophysical_parameters + external.gaiadr2_geometric_distance + external.gaiaedr3_distance ... ... ... - tap_schema.tap_schema.key_columns - tap_schema.tap_schema.keys - tap_schema.tap_schema.schemas - tap_schema.tap_schema.tables + tap_schema.key_columns + tap_schema.keys + tap_schema.schemas + tap_schema.tables 2.3. Uploading table to user space ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^