Skip to content

Commit

Permalink
Update with new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van der Heijden committed Sep 17, 2020
1 parent 0a7d9eb commit 5355c5a
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 163 deletions.
10 changes: 5 additions & 5 deletions gobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_version(path):


def build_all():
path = os.path.dirname(__file__)
path = os.path.abspath(os.path.dirname(__file__))
version = get_version(path)
outpath = os.path.join(path, 'bin', version)
if not os.path.exists(outpath):
Expand All @@ -111,7 +111,7 @@ def build_all():


def build(development=True, output=''):
path = os.path.dirname(__file__)
path = os.path.abspath(os.path.dirname(__file__))
version = get_version(path)
outfile = output if output else os.path.join(path, '{}_{}.{}'.format(
TARGET, version, 'exe' if sys.platform.startswith('win') else 'bin'))
Expand All @@ -128,7 +128,7 @@ def build(development=True, output=''):


def install_packages():
path = os.path.dirname(__file__)
path = os.path.abspath(os.path.dirname(__file__))
with subprocess.Popen(
['npm', 'install'],
cwd=os.path.join(path, 'src'),
Expand All @@ -147,7 +147,7 @@ def install_packages():

def webpack(development=True):
print('(be patient, this can take some time)...')
path = os.path.dirname(__file__)
path = os.path.abspath(os.path.dirname(__file__))
env = os.environ
if not development:
env['NODE_ENV'] = 'production'
Expand All @@ -161,7 +161,7 @@ def webpack(development=True):


def compile_less(development=True):
path = os.path.dirname(__file__)
path = os.path.abspath(os.path.dirname(__file__))
if development:
subprocess.run([
'lessc',
Expand Down
2 changes: 1 addition & 1 deletion siridb-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

// AppVersion exposes version information
const AppVersion = "2.0.15"
const AppVersion = "2.0.16"

const retryConnectTime = 5

Expand Down
20 changes: 17 additions & 3 deletions src/Utils/SiriGrammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* should be used with the `jsleri` JavaScript module.
*
* Source class: SiriGrammar
* Created at: 2020-07-30 10:55:51
* Created at: 2020-09-15 15:01:47
*/

import { Repeat, Optional, Regex, Token, Sequence, Choice, Tokens, Ref, List, THIS, Keyword, Prio, Grammar } from 'jsleri';
import { Repeat, Token, Grammar, Prio, Choice, Regex, Keyword, Tokens, THIS, Optional, List, Sequence, Ref } from 'jsleri';

class SiriGrammar extends Grammar {
static r_float = Regex('^[-+]?[0-9]*\\.?[0-9]+');
Expand Down Expand Up @@ -75,6 +75,7 @@ class SiriGrammar extends Grammar {
Token('&'),
Keyword('intersection')
);
static k_interval = Keyword('interval');
static k_ip_support = Keyword('ip_support');
static k_last = Keyword('last');
static k_length = Keyword('length');
Expand Down Expand Up @@ -144,9 +145,10 @@ class SiriGrammar extends Grammar {
static k_tag = Keyword('tag');
static k_tags = Keyword('tags');
static k_tee_pipe_name = Keyword('tee_pipe_name');
static k_time_precision = Keyword('time_precision');
static k_timeit = Keyword('timeit');
static k_timeval = Keyword('timeval');
static k_timezone = Keyword('timezone');
static k_time_precision = Keyword('time_precision');
static k_to = Keyword('to');
static k_true = Keyword('true');
static k_type = Keyword('type');
Expand Down Expand Up @@ -757,6 +759,16 @@ class SiriGrammar extends Grammar {
Optional(SiriGrammar.time_expr),
Token(')')
);
static f_timeval = Sequence(
SiriGrammar.k_timeval,
Token('('),
Token(')')
);
static f_interval = Sequence(
SiriGrammar.k_interval,
Token('('),
Token(')')
);
static f_filter = Sequence(
SiriGrammar.k_filter,
Token('('),
Expand Down Expand Up @@ -810,6 +822,8 @@ class SiriGrammar extends Grammar {
SiriGrammar.f_stddev,
SiriGrammar.f_first,
SiriGrammar.f_last,
SiriGrammar.f_timeval,
SiriGrammar.f_interval,
SiriGrammar.f_difference,
SiriGrammar.f_derivative,
SiriGrammar.f_filter,
Expand Down
Loading

0 comments on commit 5355c5a

Please sign in to comment.