Skip to content

Commit ce38991

Browse files
committed
rename cds submodule into mocserver
1 parent a99ad27 commit ce38991

19 files changed

+371
-302
lines changed

astroquery/cds/__init__.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,17 @@
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.')
21+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22+
import warnings
3623

24+
warnings.warn("The ``cds`` module has been moved to astroquery.mocserver,"
25+
"and ``CdsClass`` has been renamed ``MOCserver``. It means that"
26+
" 'from astroquery.cds import cds' became 'from astroquery.mocserver"
27+
" import mocserver'. Please update your imports.", DeprecationWarning, stacklevel=2)
3728

38-
conf = Conf()
29+
from astroquery.mocserver import mocserver, MOCserver
3930

40-
from .core import cds, CdsClass
31+
cds = mocserver
32+
CdsClass = MOCserver
4133

42-
__all__ = ['cds', 'CdsClass',
43-
'Conf', 'conf',
44-
]
34+
__all__ = ['mocserver', 'MOCserver', '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, MOCserver
47+
48+
__all__ = ["Conf", "conf", "mocserver", "MOCserver"]

0 commit comments

Comments
 (0)