Skip to content

Commit 9ba608a

Browse files
increments version number; minor release fixes
1 parent dbdd7eb commit 9ba608a

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

btrdb/stream.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import uuid as uuidlib
2121
from copy import deepcopy
2222
from collections.abc import Sequence
23-
from datetime import timedelta
2423

2524
from btrdb.utils.buffer import PointBuffer
2625
from btrdb.point import RawPoint, StatPoint
@@ -888,14 +887,12 @@ def count(self):
888887
params = self._params_from_filters()
889888
start = params.get("start", MINIMUM_TIME)
890889
end = params.get("end", MAXIMUM_TIME)
891-
892-
pointwidth = self.pointwidth if self.pointwidth is not None else 62
893890
versions = self._pinned_versions if self._pinned_versions else {}
894-
895891
count = 0
892+
896893
for s in self._streams:
897894
version = versions.get(s.uuid, 0)
898-
count += s.count(start, end, pointwidth, version)
895+
count += s.count(start, end, version=version)
899896

900897
return count
901898

btrdb/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
__version_info__ = {
1919
'major': 5,
20-
'minor': 6,
21-
'micro': 1,
20+
'minor': 8,
21+
'micro': 0,
2222
'releaselevel': 'final',
23-
'serial': 12,
23+
'serial': 13,
2424
}
2525

2626
##########################################################################

tests/btrdb/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
## Test Constants
2727
##########################################################################
2828

29-
EXPECTED_VERSION = "5.6.1"
29+
EXPECTED_VERSION = "5.8"
3030

3131

3232
##########################################################################

tests/btrdb/test_stream.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,13 @@ def test_count(self):
593593
endpoint.alignedWindows = Mock(return_value=windows)
594594
stream = Stream(btrdb=BTrDB(endpoint), uuid=uu)
595595

596-
assert stream.count() == 26
596+
assert stream.count(precise=False, version=0) == 26
597597
stream._btrdb.ep.alignedWindows.assert_called_once_with(
598-
uu, MINIMUM_TIME, MAXIMUM_TIME, 62, 0
598+
uu, MINIMUM_TIME, MAXIMUM_TIME, 60, 0
599599
)
600600

601-
stream.count(10, 1000, 48, 1200)
602-
stream._btrdb.ep.alignedWindows.assert_called_with(uu, 10, 1000, 48, 1200)
601+
stream.count(10, 1000, 8, version=1200)
602+
stream._btrdb.ep.alignedWindows.assert_called_with(uu, 10, 1000, 8, 1200)
603603

604604

605605
##########################################################################
@@ -1226,8 +1226,8 @@ def test_count(self):
12261226
])
12271227

12281228
assert streams.count() == 52
1229-
endpoint.alignedWindows.assert_any_call(uu1, MINIMUM_TIME, MAXIMUM_TIME, 62, 0)
1230-
endpoint.alignedWindows.assert_any_call(uu2, MINIMUM_TIME, MAXIMUM_TIME, 62, 0)
1229+
endpoint.alignedWindows.assert_any_call(uu1, MINIMUM_TIME, MAXIMUM_TIME, 60, 0)
1230+
endpoint.alignedWindows.assert_any_call(uu2, MINIMUM_TIME, MAXIMUM_TIME, 60, 0)
12311231

12321232

12331233
def test_count_filtered(self):
@@ -1242,14 +1242,18 @@ def test_count_filtered(self):
12421242
Stream(btrdb=BTrDB(endpoint), uuid=uu1),
12431243
Stream(btrdb=BTrDB(endpoint), uuid=uu2),
12441244
])
1245+
windows = [
1246+
[(StatPointProto(time=1,min=2,mean=3,max=4,count=5,stddev=6), StatPointProto(time=2,min=3,mean=4,max=5,count=6,stddev=7)), 42],
1247+
[(StatPointProto(time=3,min=4,mean=5,max=6,count=7,stddev=8), StatPointProto(time=4,min=5,mean=6,max=7,count=8,stddev=9)), 42],
1248+
]
1249+
endpoint.alignedWindows = Mock(return_value=windows)
12451250

12461251
streams = streams.filter(start=10, end=1000)
12471252
streams.pin_versions({uu1: 42, uu2: 99})
1248-
streams.pointwidth = 48
12491253

12501254
streams.count()
1251-
endpoint.alignedWindows.assert_any_call(uu1, 10, 1000, 48, 42)
1252-
endpoint.alignedWindows.assert_any_call(uu2, 10, 1000, 48, 99)
1255+
endpoint.alignedWindows.assert_any_call(uu1, 10, 1000, 8, 42)
1256+
endpoint.alignedWindows.assert_any_call(uu2, 10, 1000, 8, 99)
12531257

12541258

12551259

0 commit comments

Comments
 (0)