Skip to content

Commit

Permalink
Roll back cached marging
Browse files Browse the repository at this point in the history
  • Loading branch information
oscgonfer committed Jun 12, 2024
1 parent 1ed6532 commit 14af80f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .test import Test
from .models import Source, TestOptions, DeviceOptions, APIParams, FileParams, CSVParams

__version__ = '1.0.1'
__version__ = '1.0.2'
3 changes: 2 additions & 1 deletion scdata/device/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ async def load(self, cache=None, convert_units=True, convert_names=True, max_amo
# Make request with a logical min_date
if not cached_data.empty:
# Update min_date
min_date=cached_data.index[-1].tz_convert('UTC')+Timedelta(frequency)+Timedelta(config.data['cached_data_margin'])
min_date=cached_data.index[-1].tz_convert('UTC')+Timedelta(frequency)

# Not implemented "for now"
elif self.source.type == 'stream':
Expand All @@ -328,6 +328,7 @@ async def load(self, cache=None, convert_units=True, convert_names=True, max_amo
# In principle this links both dataframes as they are unmutable
self.data = self.handler.data
# Wrap it all up
# TODO Avoid doing this if not needed?
self.loaded = self.__load_wrapup__(max_amount, convert_units=convert_units, convert_names=convert_names, cached_data=cached_data)

self.processed = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name='scdata',
version='1.0.1',
version='1.0.2',
description='Analysis of sensors and time series data',
author='oscgonfer',
license='GNU-GPL3.0',
Expand Down

0 comments on commit 14af80f

Please sign in to comment.