Skip to content

Commit e714159

Browse files
committed
Changelog, fix other test failures
1 parent c123245 commit e714159

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

CHANGES.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ jplspec
2626

2727
- minor improvement to lookuptable behavior [#3173,#2901]
2828

29+
mast
30+
^^^^
31+
32+
- Retrieve data products from the Missions-MAST API with ``mast.MastMissions.get_product_list``. Retrieve unique data
33+
products only with ``mast.MastMissions.get_unique_product_list``. [#3155]
34+
35+
- Filter data products retrieved from the Missions-MAST API with ``mast.MastMissions.filter_products``. [#3155]
36+
37+
- Download data products from the Missions-MAST API with ``mast.MastMissions.download_products``.
38+
Download a single data product using ``mast.MastMissions.download_file``. [#3155]
39+
40+
- Get the keyword corresponding to the dataset ID for a specific mission with ``mast.MastMissions.get_dataset_kwd``. [#3155]
41+
2942
mocserver
3043
^^^^^^^^^
3144

astroquery/mast/missions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def get_unique_product_list(self, datasets):
402402
def filter_products(self, products, *, extension=None, **filters):
403403
"""
404404
Filters an `~astropy.table.Table` of mission data products based on given filters.
405+
405406
Parameters
406407
----------
407408
products : `~astropy.table.Table`
@@ -414,6 +415,7 @@ def filter_products(self, products, *, extension=None, **filters):
414415
acceptable values for that column. AND logic is applied between filters, OR logic within
415416
each filter set.
416417
For example: type="science", extension=["fits","jpg"]
418+
417419
Returns
418420
-------
419421
response : `~astropy.table.Table`
@@ -525,6 +527,7 @@ def download_file(self, uri, *, local_path=None, cache=True, verbose=True):
525527
def _download_files(self, products, base_dir, *, flat=False, cache=True, verbose=True):
526528
"""
527529
Downloads files listed in an `~astropy.table.Table` of data products to a specified directory.
530+
528531
Parameters
529532
----------
530533
products : `~astropy.table.Table`
@@ -538,6 +541,7 @@ def _download_files(self, products, base_dir, *, flat=False, cache=True, verbose
538541
Default is True. If file is found on disk, it will not be downloaded again.
539542
verbose : bool, optional
540543
Default is True. Whether to show download progress in the console.
544+
541545
Returns
542546
-------
543547
response : `~astropy.table.Table`
@@ -568,6 +572,7 @@ def download_products(self, products, *, download_dir=None, flat=False,
568572
cache=True, extension=None, verbose=True, **filters):
569573
"""
570574
Download specified data products.
575+
571576
Parameters
572577
----------
573578
products : str, list, `~astropy.table.Table`
@@ -591,6 +596,7 @@ def download_products(self, products, *, download_dir=None, flat=False,
591596
acceptable values for that column. AND logic is applied between filters, OR logic within
592597
each filter set.
593598
For example: type="science", extension=["fits","jpg"]
599+
594600
Returns
595601
-------
596602
manifest : `~astropy.table.Table`

astroquery/mast/tests/test_mast.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@ def test_missions_download_products(patch_post, tmp_path):
376376
download_dir=tmp_path)
377377
assert isinstance(result, Table)
378378

379-
# Warn about no products
380-
with pytest.warns(NoResultsWarning):
381-
result = mast.MastMissions.download_products(test_dataset_id,
382-
extension='jpg',
383-
download_dir=tmp_path)
384-
385379

386380
def test_missions_download_no_auth(patch_post, caplog):
387381
# Exclusive access products should not be downloaded if user is not authenticated

0 commit comments

Comments
 (0)