Skip to content

Commit 44dc8f7

Browse files
emolterbsipocz
authored andcommitted
small fixes as suggested by mkelley, and trying to fix docs
1 parent c8f7b4c commit 44dc8f7

File tree

6 files changed

+16
-18169
lines changed

6 files changed

+16
-18169
lines changed

astroquery/solarsystem/pds/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __str__(self):
4343
Examples
4444
--------
4545
>>> from astroquery.solarsystem.pds import RingNode
46-
>>> nodeobj = RingNode()
46+
>>> nodeobj = RingNode
4747
>>> print(nodeobj) # doctest: +SKIP
4848
PDSRingNode instance
4949
"""
@@ -68,7 +68,7 @@ def ephemeris_async(
6868
----------
6969
self : `~RingNodeClass` instance
7070
planet : str, required. one of Mars, Jupiter, Saturn, Uranus, Neptune, or Pluto
71-
obs_time : `~astropy.Time` object, or str in format YYYY-MM-DD hh:mm, optional.
71+
obs_time : `~astropy.time.Time` object, or str in format YYYY-MM-DD hh:mm, optional.
7272
If str is provided then UTC is assumed.
7373
If no obs_time is provided, the current time is used.
7474
location : array-like, or `~astropy.coordinates.EarthLocation`, optional
@@ -99,7 +99,7 @@ def ephemeris_async(
9999
Examples
100100
--------
101101
>>> from astroquery.solarsystem.pds import RingNode
102-
>>> systemtable, bodytable, ringtable = RingNode().ephemeris(planet='Uranus',
102+
>>> systemtable, bodytable, ringtable = RingNode.ephemeris(planet='Uranus',
103103
... obs_time='2024-05-08 22:39',
104104
... location = (-23.029 * u.deg, -67.755 * u.deg, 5000 * u.m)) # doctest: +SKIP
105105
>>> print(ringtable) # doctest: +SKIP

astroquery/solarsystem/pds/tests/test_ringnode.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def patch_request(request):
4444

4545
def test_ephemeris_query_Uranus(patch_request):
4646

47-
systemtable, bodytable, ringtable = pds.RingNode().ephemeris(
47+
systemtable, bodytable, ringtable = pds.RingNode.ephemeris(
4848
planet="Uranus",
4949
obs_time="2022-05-03 00:00",
5050
location=(10.0 * u.deg, -120.355 * u.deg, 1000 * u.m),
@@ -118,7 +118,7 @@ def test_ephemeris_query_Uranus(patch_request):
118118

119119
def test_ephemeris_query_Pluto(patch_request):
120120

121-
systemtable, bodytable, ringtable = pds.RingNode().ephemeris(
121+
systemtable, bodytable, ringtable = pds.RingNode.ephemeris(
122122
planet="Pluto",
123123
obs_time="2021-10-07 07:25",
124124
)
@@ -190,7 +190,7 @@ def test_ephemeris_query_Pluto(patch_request):
190190

191191

192192
def test_ephemeris_query_payload():
193-
res = pds.RingNode().ephemeris(
193+
res = pds.RingNode.ephemeris(
194194
planet="Neptune",
195195
obs_time="2022-05-03 00:00",
196196
neptune_arcmodel=1,
@@ -252,20 +252,20 @@ def test_ephemeris_query_payload():
252252
def test_bad_query_exception_throw():
253253

254254
with pytest.raises(ValueError):
255-
pds.RingNode().ephemeris(planet="Mercury", obs_time="2022-05-03 00:00")
255+
pds.RingNode.ephemeris(planet="Mercury", obs_time="2022-05-03 00:00")
256256

257257
with pytest.raises(ValueError):
258-
pds.RingNode().ephemeris(planet="Uranus", obs_time="2022-13-03 00:00")
258+
pds.RingNode.ephemeris(planet="Uranus", obs_time="2022-13-03 00:00")
259259

260260
with pytest.raises(ValueError):
261-
pds.RingNode().ephemeris(
261+
pds.RingNode.ephemeris(
262262
planet="Neptune",
263263
obs_time="2022-05-03 00:00",
264264
location=(10.0 * u.deg, -120.355 * u.deg),
265265
)
266266

267267
with pytest.raises(ValueError):
268-
pds.RingNode().ephemeris(
268+
pds.RingNode.ephemeris(
269269
planet="Neptune",
270270
obs_time="2022-05-03 00:00",
271271
location=(10.0 * u.deg, -120.355 * u.deg, 1000 * u.m),

astroquery/solarsystem/pds/tests/test_ringnode_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class TestRingNodeClass:
1919
def test_ephemeris_query(self):
2020

21-
systemtable, bodytable, ringtable = pds.RingNode().ephemeris(
21+
systemtable, bodytable, ringtable = pds.RingNode.ephemeris(
2222
planet="Uranus",
2323
obs_time="2022-05-03 00:00",
2424
location=(10.0 * u.deg, -120.355 * u.deg, 1000 * u.m),

0 commit comments

Comments
 (0)