Skip to content

Commit 8424b04

Browse files
committed
move jplspec to linelists
fix bad file add fix ****s
1 parent 2bec556 commit 8424b04

File tree

16 files changed

+74
-40
lines changed

16 files changed

+74
-40
lines changed

astroquery/jplspec/__init__.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
JPL Spectral Catalog
4-
--------------------
3+
JPL Spectral Catalog (Deprecated Location)
4+
-------------------------------------------
55
6+
.. deprecated:: 0.4.8
7+
The `astroquery.jplspec` module has been moved to `astroquery.linelists.jplspec`.
8+
Please update your imports to use `from astroquery.linelists.jplspec import JPLSpec` instead.
9+
This backward compatibility layer will be removed in a future version.
610
7-
:author: Giannina Guzman ([email protected])
8-
:author: Miguel de Val-Borro ([email protected])
9-
10-
"""
11-
from astropy import config as _config
11+
This module provides backward compatibility for the old import location.
12+
The JPLSpec module has been reorganized under the linelists subpackage.
1213
14+
For new code, please use::
1315
14-
class Conf(_config.ConfigNamespace):
15-
"""
16-
Configuration parameters for `astroquery.jplspec`.
17-
"""
18-
server = _config.ConfigItem(
19-
'https://spec.jpl.nasa.gov/cgi-bin/catform',
20-
'JPL Spectral Catalog URL.')
21-
22-
timeout = _config.ConfigItem(
23-
60,
24-
'Time limit for connecting to JPL server.')
16+
from astroquery.linelists.jplspec import JPLSpec
2517
18+
"""
19+
import warnings
2620

27-
conf = Conf()
21+
# Issue deprecation warning
22+
warnings.warn(
23+
"Importing from 'astroquery.jplspec' is deprecated. "
24+
"Please use 'from astroquery.linelists.jplspec import JPLSpec' instead. "
25+
"The old import path will be removed in a future version.",
26+
DeprecationWarning,
27+
stacklevel=2
28+
)
2829

29-
from .core import JPLSpec, JPLSpecClass
30+
# Import from the new location
31+
from ..linelists.jplspec import JPLSpec, JPLSpecClass, Conf, conf
3032

31-
__all__ = ['JPLSpec', 'JPLSpecClass',
32-
'Conf', 'conf',
33-
]
33+
__all__ = ['JPLSpec', 'JPLSpecClass', 'Conf', 'conf']
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
JPL Spectral Catalog
4+
--------------------
5+
6+
7+
:author: Giannina Guzman ([email protected])
8+
:author: Miguel de Val-Borro ([email protected])
9+
10+
"""
11+
from astropy import config as _config
12+
13+
14+
class Conf(_config.ConfigNamespace):
15+
"""
16+
Configuration parameters for `astroquery.linelists.jplspec`.
17+
"""
18+
server = _config.ConfigItem(
19+
'https://spec.jpl.nasa.gov/cgi-bin/catform',
20+
'JPL Spectral Catalog URL.')
21+
22+
timeout = _config.ConfigItem(
23+
60,
24+
'Time limit for connecting to JPL server.')
25+
26+
27+
conf = Conf()
28+
29+
from .core import JPLSpec, JPLSpecClass
30+
31+
__all__ = ['JPLSpec', 'JPLSpecClass',
32+
'Conf', 'conf',
33+
]

astroquery/jplspec/core.py renamed to astroquery/linelists/jplspec/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import astropy.units as u
66
from astropy.io import ascii
7-
from ..query import BaseQuery
8-
from ..utils import async_to_sync
7+
from ...query import BaseQuery
8+
from ...utils import async_to_sync
99
# import configurable items declared in __init__.py
1010
from . import conf
1111
from . import lookup_table
File renamed without changes.
File renamed without changes.

astroquery/jplspec/setup_package.py renamed to astroquery/linelists/jplspec/setup_package.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ def get_package_data():
1111
os.path.join('data', 'multi.data')]
1212
paths_data = [os.path.join('data', 'catdir.cat')]
1313

14-
return {'astroquery.jplspec.tests': paths_test,
15-
'astroquery.jplspec': paths_data, }
14+
return {'astroquery.linelists.jplspec.tests': paths_test,
15+
'astroquery.linelists.jplspec': paths_data, }
16+

0 commit comments

Comments
 (0)