Skip to content

Commit 3903724

Browse files
authored
Merge pull request #138 from python-astrodynamics/feature/deprecated-request-classes
Remove deprecated request classes that no longer exist
2 parents c5e7ed0 + d0961f8 commit 3903724

6 files changed

Lines changed: 380 additions & 103 deletions

File tree

docs/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Usage
1212
1313
Request classes are presented as methods on the
1414
:class:`~spacetrack.base.SpaceTrackClient` object. For example,
15-
``st.tle_publish()``. Each request class is part of a request controller.
15+
``st.gp_history()``. Each request class is part of a request controller.
1616
Since most request classes are only part of one request controller,
1717
``spacetrack`` looks up the controller for you. It can be specified explicitly
1818
in several ways. All the following are equivalent:

src/spacetrack/aio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ async def generic_request(
174174
175175
.. code-block:: python
176176
177-
st.tle_publish(*args, **kw)
178-
st.basicspacedata.tle_publish(*args, **kw)
177+
st.gp_history(*args, **kw)
178+
st.basicspacedata.gp_history(*args, **kw)
179179
st.file(*args, **kw)
180180
st.fileshare.file(*args, **kw)
181181
st.spephemeris.file(*args, **kw)
@@ -184,8 +184,8 @@ async def generic_request(
184184
185185
.. code-block:: python
186186
187-
st.generic_request('tle_publish', *args, **kw)
188-
st.generic_request('tle_publish', *args, controller='basicspacedata', **kw)
187+
st.generic_request('gp_history', *args, **kw)
188+
st.generic_request('gp_history', *args, controller='basicspacedata', **kw)
189189
st.generic_request('file', *args, **kw)
190190
st.generic_request('file', *args, controller='fileshare', **kw)
191191
st.generic_request('file', *args, controller='spephemeris', **kw)
@@ -205,9 +205,9 @@ async def generic_request(
205205
.. code-block:: python
206206
207207
spacetrack = SpaceTrackClient(...)
208-
spacetrack.tle.get_predicates()
208+
spacetrack.gp_history.get_predicates()
209209
# or
210-
spacetrack.get_predicates('tle')
210+
spacetrack.get_predicates('gp_history')
211211
212212
See :func:`~spacetrack.operators._stringify_predicate_value` for
213213
which Python objects are converted appropriately.

src/spacetrack/base.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,10 @@ class SpaceTrackClient:
235235
"gp",
236236
"gp_history",
237237
"launch_site",
238-
"omm",
239238
"satcat",
240239
"satcat_change",
241240
"satcat_debut",
242241
"tip",
243-
"tle",
244-
"tle_latest",
245-
"tle_publish",
246242
}
247243

248244
request_controllers["expandedspacedata"] = {
@@ -282,14 +278,7 @@ class SpaceTrackClient:
282278
("dirs", "publicfiles"): set(),
283279
("download", "publicfiles"): set(),
284280
}
285-
deprecated_controllers = {
286-
"basicspacedata": {
287-
"tle",
288-
"tle_latest",
289-
"tle_publish",
290-
"omm",
291-
},
292-
}
281+
deprecated_controllers = {}
293282
param_fields = {
294283
("download", "publicfiles"): {"name"},
295284
}
@@ -652,8 +641,8 @@ def generic_request(
652641
653642
.. code-block:: python
654643
655-
st.tle_publish(*args, **kw)
656-
st.basicspacedata.tle_publish(*args, **kw)
644+
st.gp_history(*args, **kw)
645+
st.basicspacedata.gp_history(*args, **kw)
657646
st.file(*args, **kw)
658647
st.fileshare.file(*args, **kw)
659648
st.spephemeris.file(*args, **kw)
@@ -662,8 +651,8 @@ def generic_request(
662651
663652
.. code-block:: python
664653
665-
st.generic_request('tle_publish', *args, **kw)
666-
st.generic_request('tle_publish', *args, controller='basicspacedata', **kw)
654+
st.generic_request('gp_history', *args, **kw)
655+
st.generic_request('gp_history', *args, controller='basicspacedata', **kw)
667656
st.generic_request('file', *args, **kw)
668657
st.generic_request('file', *args, controller='fileshare', **kw)
669658
st.generic_request('file', *args, controller='spephemeris', **kw)
@@ -685,9 +674,9 @@ def generic_request(
685674
.. code-block:: python
686675
687676
spacetrack = SpaceTrackClient(...)
688-
spacetrack.tle.get_predicates()
677+
spacetrack.gp_history.get_predicates()
689678
# or
690-
spacetrack.get_predicates('tle')
679+
spacetrack.get_predicates('gp_history')
691680
692681
See :func:`~spacetrack.operators._stringify_predicate_value` for
693682
which Python objects are converted appropriately.

0 commit comments

Comments
 (0)