Skip to content

Commit 2954d4b

Browse files
committed
Merge branch 'main' into noirlab-archive
* main: (95 commits) Update change log Add interstellar object and dead comet tests. Rearrange regex comments Allow "dead" comets like 85D Use I for interstellar objects, P for periodic comets. Numbers are not allowed in fragment designations. I/ is not a valid prefix. 1A, 2A, etc. are not valid objects. Update comments to clarify what the code is doing Clarify object reassignment. Bump the actions group with 2 updates maint: switch to the new cds domain name fix: remove message when regions is missing add changes entry remove UCD formatter Address review comments from Sam Bianco enforce upper limit on MastMissions query radius DOC: fix more syntax [skip ci] BUG: fix usage of contentless directives EUCLIDSWRQ-270: Configure response for get_datalinks with metadata option ...
2 parents 8b2d398 + dd9f00d commit 2954d4b

68 files changed

Lines changed: 3339 additions & 3195 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci_crontests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636

3737
steps:
3838
- name: Checkout code
39-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4040
with:
4141
fetch-depth: 0
4242
- name: Set up Python
43-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
43+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
4444
with:
4545
python-version: ${{ matrix.python }}
4646
- name: Install Python dependencies

.github/workflows/ci_devtests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444

4545
steps:
4646
- name: Checkout code
47-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
47+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4848
with:
4949
fetch-depth: 0
5050
- name: Set up Python
51-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
51+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
5252
with:
5353
python-version: ${{ matrix.python }}
5454
- name: Install Python dependencies

.github/workflows/ci_online_crontests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout code
41-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
41+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4242
with:
4343
fetch-depth: 0
4444
- name: Set up Python
45-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
45+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
4646
with:
4747
python-version: ${{ matrix.python }}
4848
- name: Install Python dependencies

.github/workflows/ci_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ jobs:
6363

6464
steps:
6565
- name: Checkout code
66-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
66+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6767
with:
6868
fetch-depth: 0
6969
- name: Set up Python
70-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
70+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
7171
with:
7272
python-version: ${{ matrix.python }}
7373
- name: Install Python dependencies
@@ -85,11 +85,11 @@ jobs:
8585
runs-on: ubuntu-latest
8686
steps:
8787
- name: Checkout code
88-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
88+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
8989
with:
9090
fetch-depth: 0
9191
- name: Set up Python
92-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
92+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
9393
with:
9494
python-version: "3.9"
9595
- name: Run egg_info

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3131

3232
# Initializes the CodeQL tools for scanning.
3333
- name: Initialize CodeQL

CHANGES.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,28 @@ New Tools and Services
99
API changes
1010
-----------
1111

12+
esa.euclid
13+
^^^^^^^^^^
14+
15+
- Method ``get_datalinks`` has a new argument, ``extra_options``, to customize the results to be got
16+
from the server. Specifically, passing ``'METADATA'`` to this argument will retrieve the extra fields
17+
``datalabs_path``, ``file_name`` and ``hdu_index``. [#3438]
18+
19+
vizier
20+
^^^^^^
21+
- Methods ``get_catalog``, ``get_catalog_async`` and ``query_*`` now always return UCD1+ instead of UCD1. [#3458]
1222

1323

1424
Service fixes and enhancements
1525
------------------------------
1626

27+
heasarc
28+
^^^^^^^
29+
- Add ``query_constraints`` to allow querying of different catalog columns. [#3403]
30+
- Add support for uploading tables when using TAP directly through ``query_tap``. [#3403]
31+
- Add automatic guessing for the data host in ``download_data``. [#3403]
32+
33+
1734
esa.hubble
1835
^^^^^^^^^^
1936

@@ -30,12 +47,38 @@ mast
3047

3148
- Switch to use HTTP continuation for partial downloads. [#3448]
3249

50+
- Expand the supported data types for filter values in ``Mast.mast_query``. Previously, users had to input
51+
filter values enclosed in lists, even when specifying a single value or dictionary. [#3422]
52+
53+
- Raise informative error if ``MastMissions`` query radius is too large. [#3447]
54+
55+
jplspec
56+
^^^^^^^
57+
58+
- Moved to linelists/. astroquery.jplspec is now deprecated in favor of astroquery.linelists.jplspec [#3455]
59+
60+
linelists.jplspec
61+
^^^^^^^^^^^^^^^^^
62+
63+
- New location for jplspec. astroquery.jplspec is now deprecated in favor of astroquery.linelists.jplspec [#3455]
64+
65+
mpc
66+
^^^
67+
68+
- Fix bug in queries for interstellar objects with `MPC.get_observations` and enable queries for "dead" comets [#3474]
69+
3370
noirlab
3471
^^^^^^^
3572

3673
- Restore access to the `NSF NOIRLab <https://noirlab.edu>`_
3774
`Astro Data Archive <https://astroarchive.noirlab.edu>`_ [#3359].
3875

76+
xmatch
77+
^^^^^^
78+
79+
- change url of xmatch to use the new CDS domain name [#3465]
80+
81+
3982
Infrastructure, Utility and Other Changes and Additions
4083
-------------------------------------------------------
4184

@@ -58,6 +101,11 @@ esa.hubble
58101
- Removal of the deprecated ``query_hst_tap`` method, use ``query_tap`` instead.
59102
[#3367]
60103

104+
eso
105+
^^^
106+
107+
- Deprecated ``open_form`` and ``cache`` in query functions [#3339]
108+
61109
gaia
62110
^^^^
63111

@@ -96,6 +144,15 @@ esa.hubble
96144

97145
- Internal refactor of the module to use to PyVO. [#3367]
98146

147+
eso
148+
^^^
149+
150+
- Switch querying interface from WDB to TAP in querying functions. [#3339]
151+
- Allow plain ADQL queries via ``query_tap`` (with authentication as well). [#3339]
152+
- Cone search using ``cone_ra`, ``cone_dec`, ``cone_radius`` arguments. [#3339]
153+
- Retrieve record count before querying the archive, via ``count_only`` argument. [#3339]
154+
- Ask query functions to print the underlying ADQL queries without issuing them. [#3339]
155+
99156
gaia
100157
^^^^
101158

@@ -158,6 +215,7 @@ linelists.cdms
158215

159216
- Add a keyword to control writing of new species cache files.
160217
This is needed to prevent tests from overwriting those files. [#3297]
218+
- Add more complete support for CDMS quantum number and other value parsing. [#3302]
161219

162220
mast
163221
^^^^

astroquery/esa/euclid/core.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,11 @@ def get_spectrum(self, *, source_id, schema='sedm', retrieval_type="ALL", output
14181418

14191419
return files
14201420

1421-
def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
1422-
"""Gets datalinks associated to the provided identifiers
1421+
def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', extra_options=None, verbose=False):
1422+
"""
1423+
Description
1424+
-----------
1425+
Gets datalinks associated to the provided identifiers.
14231426
TAP+ only
14241427
14251428
Parameters
@@ -1428,6 +1431,9 @@ def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
14281431
list of identifiers
14291432
linking_parameter : str, optional, default SOURCE_ID, valid values: SOURCE_ID
14301433
By default, all the identifiers are considered as source_id
1434+
extra_options : str, optional, default None, valid values: METADATA
1435+
To let customize the server behaviour, if present.
1436+
If provided with value METADATA, the extra fields datalabs_path, file_name & hdu_index will be retrieved.
14311437
verbose : bool, optional, default 'False'
14321438
flag to display information about the process
14331439
@@ -1437,7 +1443,10 @@ def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
14371443
14381444
"""
14391445

1440-
return self.__eucliddata.get_datalinks(ids=ids, linking_parameter=linking_parameter, verbose=verbose)
1446+
return self.__eucliddata.get_datalinks(ids=ids,
1447+
linking_parameter=linking_parameter,
1448+
extra_options=extra_options,
1449+
verbose=verbose)
14411450

14421451
def get_scientific_product_list(self, *, observation_id=None, tile_index=None, category=None, group=None,
14431452
product_type=None, dataset_release='REGREPROC1_R2', verbose=False):

astroquery/esa/euclid/tests/test_euclidtap.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,19 +1220,36 @@ def test_logout(mock_logout):
12201220

12211221

12221222
def test_get_datalinks(monkeypatch):
1223-
def get_datalinks_monkeypatched(self, ids, linking_parameter, verbose):
1223+
def get_datalinks_monkeypatched(self, ids, linking_parameter, extra_options, verbose):
12241224
return Table()
12251225

12261226
# `EuclidClass` is a subclass of `TapPlus`, but it does not inherit
12271227
# `get_datalinks()`, it replaces it with a call to the `get_datalinks()`
1228-
# of its `__gaiadata`.
1228+
# of its `__eucliddata`.
12291229
monkeypatch.setattr(TapPlus, "get_datalinks", get_datalinks_monkeypatched)
12301230
euclid = EuclidClass(show_server_messages=False)
12311231

12321232
result = euclid.get_datalinks(ids=[12345678], verbose=True)
12331233
assert isinstance(result, Table)
12341234

12351235

1236+
def test_get_datalinks_with_metadata(monkeypatch):
1237+
def get_datalinks_monkeypatched(self, ids, linking_parameter, extra_options, verbose):
1238+
table = TapTableMeta()
1239+
table.name = extra_options
1240+
return table
1241+
1242+
# `EuclidClass` is a subclass of `TapPlus`, but it does not inherit
1243+
# `get_datalinks()`, it replaces it with a call to the `get_datalinks()`
1244+
# of its `__eucliddata`.
1245+
monkeypatch.setattr(TapPlus, "get_datalinks", get_datalinks_monkeypatched)
1246+
euclid = EuclidClass(show_server_messages=False)
1247+
1248+
result = euclid.get_datalinks(ids=[12345678], extra_options='METADATA')
1249+
assert isinstance(result, TapTableMeta)
1250+
assert result.name == "METADATA"
1251+
1252+
12361253
@pytest.mark.parametrize("background", [False, True])
12371254
def test_cross_match_basic(monkeypatch, background, cross_match_basic_kwargs, mock_querier_async):
12381255
def load_table_monkeypatched(self, table, verbose):

astroquery/eso/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class Conf(_config.ConfigNamespace):
1010
Configuration parameters for `astroquery.eso`.
1111
"""
1212

13-
row_limit = _config.ConfigItem(
14-
50,
13+
ROW_LIMIT = _config.ConfigItem(
14+
1000,
1515
'Maximum number of rows returned (set to -1 for unlimited).')
1616
username = _config.ConfigItem(
1717
"",
1818
'Optional default username for ESO archive.')
19-
query_instrument_url = _config.ConfigItem(
20-
"http://archive.eso.org/wdb/wdb/eso",
21-
'Root query URL for main and instrument queries.')
19+
tap_url = _config.ConfigItem(
20+
"https://archive.eso.org/tap_obs",
21+
'URL for TAP queries.')
2222

2323

2424
conf = Conf()

0 commit comments

Comments
 (0)