Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
#153 changed update_local signature to use new datatype TimeRangeLike…
Browse files Browse the repository at this point in the history
… instead of Tuple[datetime,datetime]
  • Loading branch information
Krzysztof (Chris) Bernat committed Apr 7, 2017
1 parent b5e92a1 commit 8759c29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cate/ds/esa_cci_odp.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,16 @@ def sync(self,

def update_local(self,
local_id: str,
time_range: Tuple[datetime, datetime],
time_range: TimeRangeLike.TYPE,
monitor: Monitor = Monitor.NONE) -> bool:

data_sources = query_data_sources(None, local_id)
if not data_sources or data_sources[0].name != local_id:
raise ValueError("Couldn't find local DataSource", (local_id, data_sources))
data_source = data_sources[0]

time_range = TimeRangeLike.convert(time_range) if time_range else None

to_remove = []
to_add = []
if time_range and time_range[1] > time_range[0]:
Expand Down
5 changes: 3 additions & 2 deletions cate/ds/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,18 @@ def make_local(self,
self._make_local(local_ds, time_range, region, var_names, monitor)
return local_ds


def update_local(self,
local_id: str,
time_range: Tuple[datetime, datetime],
time_range: TimeRangeLike.TYPE,
monitor: Monitor = Monitor.NONE) -> bool:

data_sources = query_data_sources(None, local_id)
if not data_sources or data_sources[0].name != local_id:
raise ValueError("Couldn't find local DataSource", (local_id, data_sources))
data_source = data_sources[0]

time_range = TimeRangeLike.convert(time_range) if time_range else None

to_remove = []
to_add = []
if time_range and time_range[1] > time_range[0]:
Expand Down

0 comments on commit 8759c29

Please sign in to comment.