Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Sep 24, 2024
1 parent 20016aa commit 6900d54
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 18 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
siridb-server (2.0.52-0~cb1) unstable; urgency=medium

* New upstream release
- Fixed potential bug with empty log log lines in series.

-- Jeroen van der Heijden <jeroen@cesbit.com> Mon, 23 Sep 2024 16:57:00 +0200

siridb-server (2.0.50-0~cb1) unstable; urgency=medium

* New upstream release
Expand Down
4 changes: 2 additions & 2 deletions grammar/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ class SiriGrammar(Grammar):
RE_KEYWORDS = re.compile('[a-z_]+')

# Regular expressions
r_float = Regex('[-+]?[0-9]*\.?[0-9]+')
r_float = Regex(r'[-+]?[0-9]*\.?[0-9]+')
r_integer = Regex('[-+]?[0-9]+')
r_uinteger = Regex('[0-9]+')
r_time_str = Regex('[0-9]+[smhdw]')
r_singleq_str = Regex('(?:\'(?:[^\']*)\')+')
r_doubleq_str = Regex('(?:"(?:[^"]*)")+')
r_grave_str = Regex('(?:`(?:[^`]*)`)+')
r_uuid_str = Regex(
'[0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12}')
r'[0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12}')
# we only allow an optional 'i' for case-insensitive regex
r_regex = Regex('(/[^/\\\\]*(?:\\\\.[^/\\\\]*)*/i?)')
r_comment = Regex('#.*')
Expand Down
2 changes: 1 addition & 1 deletion include/siri/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Note that debian alpha packages should use versions like this:
* 2.0.34-0alpha0
*/
#define SIRIDB_VERSION_PRE_RELEASE "-alpha-0"
#define SIRIDB_VERSION_PRE_RELEASE ""

#ifndef NDEBUG
#define SIRIDB_VERSION_BUILD_RELEASE "+debug"
Expand Down
2 changes: 1 addition & 1 deletion itest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04 as builder
FROM ubuntu:18.04 AS builder
RUN apt-get update && \
apt-get install -y \
libcleri-dev \
Expand Down
2 changes: 1 addition & 1 deletion itest/querygenerator/k_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@
'r_comment': {
'r_comment': '#',
},
}
}
4 changes: 1 addition & 3 deletions itest/querygenerator/querygenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ def _on_Regex(self, q, i):
q[i] = val
yield q
break

# debug code

# else:
# print('no value found for:')
# print(ename)
Expand All @@ -71,7 +70,6 @@ def _on_Regex(self, q, i):
# print('unknown regex element')
# print(ename)


def _on_Token(self, q, i):
q[i] = q[i]._token
yield q
Expand Down
4 changes: 2 additions & 2 deletions itest/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from test_compression import TestCompression
from test_create_database import TestCreateDatabase
from test_expiration import TestExpiration
from test_grammar import TestGrammar
# from test_grammar import TestGrammar
from test_group import TestGroup
from test_http_api import TestHTTPAPI
from test_insert import TestInsert
Expand All @@ -31,7 +31,7 @@
run_test(TestCompression())
run_test(TestCreateDatabase())
run_test(TestExpiration())
run_test(TestGrammar())
# run_test(TestGrammar())
run_test(TestGroup())
run_test(TestHTTPAPI())
run_test(TestInsert())
Expand Down
12 changes: 6 additions & 6 deletions itest/test_integer_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class TestIntegerLoad(TestBase):

async def select(self, client, series, n):
series = {s.name: s for s in series}
chars=string.ascii_letters + string.digits
chars = string.ascii_letters + string.digits
for _ in range(n):
regex = ''.join(random.choice(chars) for _ in range(3))
res = await client.query(f'select max() prefix "max-", min() prefix "min-", mean() prefix "mean-" from /.*{regex}.*/i')
if res:
print(res)
# for s, p in res.items():
# self.assertEqual(sorted(series[s].points), p)
res = await client.query(
f'select max() prefix "max-", min() prefix "min-", '
f'mean() prefix "mean-" from /.*{regex}.*/i')
for s, p in res.items():
self.assertEqual(sorted(series[s].points), p)
await asyncio.sleep(0.2)

async def insert(self, client, series, n):
Expand Down
13 changes: 13 additions & 0 deletions itest/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@


DATA = {
'empty': [
[1471254710, ''],
[1471254712, ''],
[1471254714, ''],
[1471254715, ''],
[1471254716, ''],
[1471254718, ''],
[1471254720, '']
],
'log': [
[1471254710, 'log line one'],
[1471254712, 'log line two'],
Expand Down Expand Up @@ -234,6 +243,10 @@ async def run(self):
await self.test_data()

async def test_data(self):
self.assertEqual(
await self.client0.query('select * from "empty"'),
{'empty': DATA['empty']})

self.assertEqual(
await self.client0.query('select * from "log"'),
{'log': DATA['log']})
Expand Down
4 changes: 2 additions & 2 deletions itest/test_parentheses.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ async def run(self):

with self.assertRaisesRegex(
QueryError,
'Query error at position 29. Expecting \*, all, '
'single_quote_str, double_quote_str or \('):
r'Query error at position 29. Expecting \*, all, '
r'single_quote_str, double_quote_str or \('):
await self.client0.query(
'list series /.*/ - {}{}'.format('(' * 10, ')' * 10))

Expand Down

0 comments on commit 6900d54

Please sign in to comment.