Skip to content

Commit 67db677

Browse files
authored
Merge pull request #1693 from keflavich/xmm_fixes
Fix broken master: xmm relative imports
2 parents e3cd94f + 847a86b commit 67db677

File tree

8 files changed

+23
-34
lines changed

8 files changed

+23
-34
lines changed

astroquery/esa/xmm_newton/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Conf(_config.ConfigNamespace):
1717
"""
18-
Configuration parameters for `astroquery.xmm_newton`.
18+
Configuration parameters for `astroquery.esa.xmm_newton`.
1919
"""
2020
DATA_ACTION = _config.ConfigItem("http://nxsa.esac.esa.int/"
2121
"nxsa-sl/servlet/data-action?",

astroquery/esa/xmm_newton/core.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@
1111
1212
1313
"""
14-
import os
1514
import re
16-
from astroquery.utils import commons
17-
from astropy import units
18-
from astropy.units import Quantity
19-
from astroquery.utils.tap.core import TapPlus
20-
from astroquery.utils.tap.model import modelutils
21-
from astroquery.query import BaseQuery
22-
from astropy.table import Table
23-
from requests.exceptions import HTTPError
15+
from ...utils.tap.core import TapPlus
16+
from ...query import BaseQuery
2417
import shutil
2518

26-
2719
from . import conf
2820
from astropy import log
2921

astroquery/esa/xmm_newton/tests/dummy_handler.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
Created on 4 Sept. 2019
1010
"""
1111

12-
import os
13-
from astroquery.utils.tap.model import modelutils, taptable
14-
from requests.models import Response
1512

1613
__all__ = ['DummyHandler']
1714

astroquery/esa/xmm_newton/tests/dummy_tap_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
Created on 4 Sept. 2019
1111
"""
1212

13-
from astroquery.utils.tap.model.taptable import TapTableMeta
14-
from astroquery.utils.tap.model.job import Job
13+
from ....utils.tap.model.taptable import TapTableMeta
14+
from ....utils.tap.model.job import Job
1515

1616

1717
class DummyXMMNewtonTapHandler(object):

astroquery/esa/xmm_newton/tests/setup_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ def get_package_data():
2323
] # etc, add other extensions
2424
# you can also enlist files individually by names
2525
# finally construct and return a dict for the sub module
26-
return {'astroquery.xmm_newton.tests': paths}
26+
return {'astroquery.esa.xmm_newton.tests': paths}

astroquery/esa/xmm_newton/tests/test_xmm_newton.py

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

1313
import pytest
1414

15-
from astroquery.xmm_newton.core import XMMNewtonClass
16-
from astroquery.xmm_newton.tests.dummy_tap_handler import DummyXMMNewtonTapHandler
15+
from ..core import XMMNewtonClass
16+
from ..tests.dummy_tap_handler import DummyXMMNewtonTapHandler
1717

1818

1919
class TestXMMNewton():

docs/xmm_newton/xmm_newton.rst renamed to docs/esa/xmm_newton.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.. doctest-skip-all
22
3-
.. _astroquery.xmm_newton:
3+
.. _astroquery.esa.xmm_newton:
44

5-
************************************
6-
xmm_newton (`astroquery.xmm_newton`)
7-
************************************
5+
****************************************
6+
xmm_newton (`astroquery.esa.xmm_newton`)
7+
****************************************
88

99

1010
The X-ray Multi-Mirror Mission, XMM-Newton, is an ESA X-ray observatory launched on 10 December 1999.
@@ -25,10 +25,10 @@ Examples
2525

2626
.. code-block:: python
2727
28-
>>> from astroquery.xmm_newton import XMMNewton
28+
>>> from astroquery.esa.xmm_newton import XMMNewton
2929
>>>
3030
>>> XMMNewton.download_data('0505720401',level="PPS",extension="PDF",instname="M1",filename="result0505720401.tar")
31-
INFO: File result0505720401.tar downloaded to current directory [astroquery.xmm_newton.core]
31+
INFO: File result0505720401.tar downloaded to current directory [astroquery.esa.xmm_newton.core]
3232
3333
This will download all PPS files for the observation '0505720401' and instrument MOS1, with 'PDF' extension and
3434
it will store them in a tar called 'result0505720401.tar'. The parameters available are detailed in the API.
@@ -42,10 +42,10 @@ For more details of the parameters check the section 3.4 at:
4242

4343
.. code-block:: python
4444
45-
>>> from astroquery.xmm_newton import XMMNewton
45+
>>> from astroquery.esa.xmm_newton import XMMNewton
4646
>>>
4747
>>> XMMNewton.get_postcard('0505720401')
48-
INFO: File P0505720401EPX000OIMAGE8000.PNG downloaded to current directory [astroquery.xmm_newton.core]
48+
INFO: File P0505720401EPX000OIMAGE8000.PNG downloaded to current directory [astroquery.esa.xmm_newton.core]
4949
'P0505720401EPX000OIMAGE8000.PNG'
5050
5151
This will download the EPIC postcard for the observation '0505720401' and it will stored in a PNG called
@@ -60,7 +60,7 @@ Query Language (ADQL).
6060

6161
.. code-block:: python
6262
63-
>>> from astroquery.xmm_newton import XMMNewton
63+
>>> from astroquery.esa.xmm_newton import XMMNewton
6464
>>>
6565
>>> result = XMMNewton.query_xsa_tap("select top 10 * from v_public_observations", output_format='csv', output_file='results10.csv')
6666
>>> print(result)
@@ -86,7 +86,7 @@ stored in the file 'results10.csv'. The result of this query can be printed by d
8686

8787
.. code-block:: python
8888
89-
>>> from astroquery.xmm_newton import XMMNewton
89+
>>> from astroquery.esa.xmm_newton import XMMNewton
9090
>>>
9191
>>> XMMNewton.get_tables(True)
9292
INFO: Retrieving tables... [astroquery.utils.tap.core]
@@ -108,7 +108,7 @@ This will show the available tables in XSA TAP service in the XMM-Newton Science
108108

109109
.. code-block:: python
110110
111-
>>> from astroquery.xmm_newton import XMMNewton
111+
>>> from astroquery.esa.xmm_newton import XMMNewton
112112
>>>
113113
>>> XMMNewton.get_columns('public.v_all_observations')
114114
INFO: Retrieving tables... [astroquery.utils.tap.core]
@@ -125,5 +125,5 @@ This will show the column details of the table 'v_all_observations' in XSA TAP s
125125
Reference/API
126126
=============
127127

128-
.. automodapi:: astroquery.xmm_newton
129-
:no-inheritance-diagram:
128+
.. automodapi:: astroquery.esa.xmm_newton
129+
:no-inheritance-diagram:

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ The following modules have been completed using a common API:
195195
vsa/vsa.rst
196196
xmatch/xmatch.rst
197197
dace/dace.rst
198-
xmm_newton/xmm_newton.rst
198+
esa/xmm_newton.rst
199199

200200

201201
These others are functional, but do not follow a common & consistent API:
@@ -290,7 +290,7 @@ generally return a table listing the available data first.
290290
ukidss/ukidss.rst
291291
vsa/vsa.rst
292292
skyview/skyview.rst
293-
xmm_newton/xmm_newton.rst
293+
esa/xmm_newton.rst
294294

295295
Simulations
296296
-----------

0 commit comments

Comments
 (0)