Browse Source

Use nilmdb.utils.interval.optimize; bump nilmdb min version

tags/nilmtools-1.3.1
Jim Paris 8 years ago
parent
commit
cfd1719152
3 changed files with 3 additions and 16 deletions
  1. +1
    -1
      README.txt
  2. +1
    -14
      nilmtools/filter.py
  3. +1
    -1
      setup.py

+ 1
- 1
README.txt View File

@@ -8,7 +8,7 @@ Prerequisites:
sudo apt-get install python2.7 python2.7-dev python-setuptools python-pip
sudo apt-get install python-numpy python-scipy

nilmdb (1.6.3+)
nilmdb (1.8.1+)

Install:



+ 1
- 14
nilmtools/filter.py View File

@@ -188,19 +188,6 @@ class Filter(object):
raise SystemExit(0)
return args

def _optimize_int(self, it):
"""Join and yield adjacent intervals from the iterator 'it'"""
saved_int = None
for interval in it:
if saved_int is not None:
if saved_int.end == interval.start:
interval.start = saved_int.start
else:
yield saved_int
saved_int = interval
if saved_int is not None:
yield saved_int

def intervals(self):
"""Generate all the intervals that this filter should process"""
self._using_client = True
@@ -227,7 +214,7 @@ class Filter(object):
self.src.path, diffpath = self.dest.path,
start = self.start, end = self.end) )
# Optimize intervals: join intervals that are adjacent
for interval in self._optimize_int(intervals):
for interval in nilmdb.utils.interval.optimize(intervals):
yield interval
self._using_client = False



+ 1
- 1
setup.py View File

@@ -61,7 +61,7 @@ setup(name='nilmtools',
long_description = "NILM Database Tools",
license = "Proprietary",
author_email = 'jim@jtan.com',
install_requires = [ 'nilmdb >= 1.6.3',
install_requires = [ 'nilmdb >= 1.8.1',
'numpy',
'scipy',
#'matplotlib',


Loading…
Cancel
Save