Skip to content

Commit

Permalink
replace read_ts with read in time series base class
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhahn committed Jan 31, 2023
1 parent 99686b5 commit 958df3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

Version 0.6.0
=============

- Replace read_ts with read in time series base class

Version 0.5.0
=============

Expand Down
8 changes: 4 additions & 4 deletions src/pygeobase/io_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def __init__(self, filename, mode='r', **kwargs):
self.kwargs = kwargs

@abc.abstractmethod
def read_ts(self, gpi, **kwargs):
def read(self, gpi, **kwargs):
"""
Read time series data for given grid point.
Expand All @@ -144,7 +144,7 @@ def read_ts(self, gpi, **kwargs):
return

@abc.abstractmethod
def write_ts(self, gpi, data, **kwargs):
def write(self, gpi, data, **kwargs):
"""
Write data.
Expand Down Expand Up @@ -649,7 +649,7 @@ def _read_gp(self, gp, **kwargs):
data = None

if self._open(gp):
data = self.fid.read_ts(gp, **kwargs)
data = self.fid.read(gp, **kwargs)

return data

Expand All @@ -669,7 +669,7 @@ def _write_gp(self, gp, data, **kwargs):

if self._open(gp):
lon, lat = self.grid.gpi2lonlat(gp)
self.fid.write_ts(gp, data, lon=lon, lat=lat, **kwargs)
self.fid.write(gp, data, lon=lon, lat=lat, **kwargs)


class MultiTemporalImageBase:
Expand Down
6 changes: 3 additions & 3 deletions src/pygeobase/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def split_daterange_in_intervals(start, end, mi):
Parameters
----------
start: datetime.datetime
start : datetime.datetime
start of the daterange
end: datetime.datetime
end : datetime.datetime
end of the daterange
mi: int
mi : int
Minutes of the intervals
Returns
Expand Down

0 comments on commit 958df3b

Please sign in to comment.