Skip to content

Commit e9d229f

Browse files
authored
Merge pull request #2766 from ManonMarchand/rename-cds-into-mocserver
rename cds into mocserver
2 parents aff2ac5 + d9b1e3c commit e9d229f

21 files changed

+393
-305
lines changed

CHANGES.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ hsa
2121

2222
- New module to access ESA Herschel mission. [#2122]
2323

24+
mocserver
25+
^^^^^^^^^
26+
27+
- ``mocserver`` is the new name of the ``cds`` module allowing access to the CDS MOC server [#2766]
28+
2429
esa.hubble
2530
^^^^^^^^^^
2631

@@ -100,6 +105,12 @@ casda
100105
- Use the standard ``login`` method for authenticating, which supports the system
101106
keyring [#2386]
102107

108+
cds
109+
^^^
110+
111+
the ``cds`` module has been renamed ``mocserver`` and issues a deprecation warning
112+
when imported [#2766]
113+
103114
heasarc
104115
^^^^^^^
105116

astroquery/cds/__init__.py

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,15 @@
1818
http://www.ivoa.net/documents/MOC/20140602/REC-MOC-1.0-20140602.pdf
1919
"""
2020

21-
from astropy import config as _config
22-
23-
24-
class Conf(_config.ConfigNamespace):
25-
"""
26-
Configuration parameters for ``astroquery.template_module``.
27-
"""
28-
server = _config.ConfigItem(
29-
["http://alasky.unistra.fr/MocServer/query",
30-
"http://alaskybis.unistra.fr/MocServer/query"],
31-
'Name of the template_module server to use.')
32-
33-
timeout = _config.ConfigItem(
34-
30,
35-
'Time limit for connecting to template_module server.')
36-
21+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22+
import warnings
3723

38-
conf = Conf()
24+
warnings.warn("The ``cds`` module has been moved to astroquery.mocserver, "
25+
"and ``CdsClass`` has been renamed to ``MOCServerClass``. "
26+
"Please update your imports.", DeprecationWarning, stacklevel=2)
3927

40-
from .core import cds, CdsClass
28+
from astroquery.mocserver import MOCServer as cds
29+
from astroquery.mocserver import MOCServerClass as CdsClass
30+
from astroquery.mocserver import conf, Conf
4131

42-
__all__ = ['cds', 'CdsClass',
43-
'Conf', 'conf',
44-
]
32+
__all__ = ['conf', 'Conf', 'cds', 'CdsClass']

astroquery/cds/tests/setup_package.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

astroquery/cds/tests/test_mocserver.py

Lines changed: 0 additions & 136 deletions
This file was deleted.

astroquery/cds/tests/test_mocserver_remote.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

astroquery/mocserver/__init__.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
CDS MOCServer Query Tool
4+
------------------------
5+
6+
:Author: Matthieu Baumann ([email protected])
7+
8+
This package is for querying the CDS MOC service, primarily hosted at:
9+
10+
* http://alasky.unistra.fr/MocServer/query
11+
* http://alaskybis.unistra.fr/MocServer/query (mirror)
12+
13+
Note: If the access to MOCs with the MOCServer tool was helpful for your research,
14+
the following acknowledgment would be appreciated::
15+
16+
This research has made use of the MOCServer, a tool developed at CDS, Strasbourg, France aiming at retrieving
17+
MOCs/meta-data from known data-sets. MOC is an IVOA standard described in the following paper :
18+
http://www.ivoa.net/documents/MOC/20140602/REC-MOC-1.0-20140602.pdf
19+
"""
20+
21+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22+
23+
from astropy import config as _config
24+
25+
26+
class Conf(_config.ConfigNamespace):
27+
"""
28+
Configuration parameters for ``astroquery.template_module``.
29+
"""
30+
31+
server = _config.ConfigItem(
32+
[
33+
"http://alasky.unistra.fr/MocServer/query",
34+
"http://alaskybis.unistra.fr/MocServer/query",
35+
],
36+
"Name of the template_module server to use.",
37+
)
38+
39+
timeout = _config.ConfigItem(
40+
30, "Time limit for connecting to template_module server."
41+
)
42+
43+
44+
conf = Conf()
45+
46+
from .core import MOCServer, MOCServerClass
47+
48+
__all__ = ["Conf", "conf", "MOCServer", "MOCServerClass"]

0 commit comments

Comments
 (0)