Skip to content

Commit 574db5a

Browse files
committed
Making new cleanup_saved_downloads part of the public API
1 parent e8e8af7 commit 574db5a

File tree

7 files changed

+10
-6
lines changed

7 files changed

+10
-6
lines changed

astroquery/utils/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
from .commons import *
1212
from .process_asyncs import async_to_sync
1313
from .docstr_chompers import prepend_docstr_nosections
14+
from .cleanup_downloads import cleanup_saved_downloads
15+

astroquery/utils/cleanup_downloads.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
import os
77
import shutil
88

9+
__all__ = ['cleanup_saved_downloads']
10+
911

1012
def cleanup_saved_downloads(names):
1113
""" Function to clean up save files.
1214
1315
Parameters
1416
----------
1517
names : str or list of str
16-
Files or directories to clean up. Wildcards are excepted.
18+
Files or directories to clean up. Wildcards are accepted.
1719
"""
1820

1921
if isinstance(names, str):

docs/cadc/cadc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,5 +661,5 @@ Reference/API
661661

662662
.. testcleanup::
663663

664-
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
664+
>>> from astroquery.utils import cleanup_saved_downloads
665665
>>> cleanup_saved_downloads(['my_observations.xml', 'test_output_noauth.xml'])

docs/esa/hsa/hsa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,5 @@ Reference/API
244244

245245
.. testcleanup::
246246

247-
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
247+
>>> from astroquery.utils import cleanup_saved_downloads
248248
>>> cleanup_saved_downloads(['1342195355*', 'results.csv'])

docs/ipac/irsa/sha/sha.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ Reference/API
103103

104104
.. testcleanup::
105105

106-
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
106+
>>> from astroquery.utils import cleanup_saved_downloads
107107
>>> cleanup_saved_downloads(['sha_tmp'])

docs/mast/mast.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,6 @@ Reference/API
12631263

12641264
.. testcleanup::
12651265

1266-
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
1266+
>>> from astroquery.utils import cleanup_saved_downloads
12671267
>>> cleanup_saved_downloads(['mastDownload*', 'tess-*', 'lwp13058*', '3dhst*'])
12681268

docs/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ Narrative documentation should also be tested, the ``doctest-remote-data`` direc
110110
to mark code snippets that relies on remote data access.
111111

112112
If any of the examples include saving data files locally, use the ``testcleanup`` directive and the
113-
`~astroquery.utils.cleanup_downloads.cleanup_saved_downloads` function at the end of the narrative documentation.
113+
`~astroquery.utils.cleanup_saved_downloads` function at the end of the narrative documentation.

0 commit comments

Comments
 (0)