Skip to content

Commit

Permalink
[SSCWeb] restore get_orbit with a deprecation message
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
  • Loading branch information
jeandet committed Jan 27, 2022
1 parent 80e9afd commit f2f4fb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion speasy/webservices/ssc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from datetime import datetime, timedelta, timezone
from speasy.core.cache import Cacheable, CacheCall, CACHE_ALLOWED_KWARGS
from speasy.products.variable import SpeasyVariable
from ...core import http, AllowedKwargs
from ...core import http, AllowedKwargs, deprecation
from speasy.core.proxy import Proxyfiable, GetProduct, PROXY_ALLOWED_KWARGS
from .indexes import SscwebParameterIndex
from speasy.inventory import data_tree
Expand Down Expand Up @@ -87,6 +87,10 @@ def get_trajectory(self, product: str, start_time: datetime, stop_time: datetime
var.values *= units.km
return var

def get_orbit(self, *args, **kwargs) -> SpeasyVariable or None:
deprecation("Use get_trajectory instead, get_orbit will be removed in speasy 1.0")
return self.get_trajectory(*args, **kwargs)

@AllowedKwargs(
PROXY_ALLOWED_KWARGS + CACHE_ALLOWED_KWARGS + ['product', 'start_time', 'stop_time', 'coordinate_system',
'debug'])
Expand Down

0 comments on commit f2f4fb4

Please sign in to comment.