From 087e3e334b6fe702d1254efe84262585ce29266e Mon Sep 17 00:00:00 2001 From: Ofer Katz Date: Sun, 15 Dec 2024 14:51:43 +0200 Subject: [PATCH] bugfix: rgx_split inital tag type --- nbs/callbacks/001_basic_ies.ipynb | 2 +- spannerlib/data_types.py | 2 ++ spannerlib/engine.py | 2 ++ spannerlib/ie_func/basic.py | 2 +- spannerlib/ie_func/rust_spanner_regex.py | 2 ++ spannerlib/micro_passes.py | 2 ++ spannerlib/opt.py | 2 ++ spannerlib/ra.py | 2 ++ spannerlib/span.py | 2 ++ spannerlib/term_graph.py | 2 ++ 10 files changed, 18 insertions(+), 2 deletions(-) diff --git a/nbs/callbacks/001_basic_ies.ipynb b/nbs/callbacks/001_basic_ies.ipynb index ec2ca337..ff70a65f 100644 --- a/nbs/callbacks/001_basic_ies.ipynb +++ b/nbs/callbacks/001_basic_ies.ipynb @@ -308,7 +308,7 @@ " try:\n", " first_span = next(delim_iter)\n", " if first_span.start != 0:\n", - " yield(initial_tag,text[:first_span.start])\n", + " yield(Span(initial_tag),text[:first_span.start])\n", " except StopIteration:\n", " return\n", " prev_span = first_span\n", diff --git a/spannerlib/data_types.py b/spannerlib/data_types.py index 9dbad0c6..eddd692a 100644 --- a/spannerlib/data_types.py +++ b/spannerlib/data_types.py @@ -1,3 +1,5 @@ +"""data types used by the engine etc to encode rules relations etc""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/006_primitive_data_types.ipynb. # %% auto 0 diff --git a/spannerlib/engine.py b/spannerlib/engine.py index 7d07717f..8d69d05d 100644 --- a/spannerlib/engine.py +++ b/spannerlib/engine.py @@ -1,3 +1,5 @@ +"""Execution spannerlog commands""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/010_engine.ipynb. # %% auto 0 diff --git a/spannerlib/ie_func/basic.py b/spannerlib/ie_func/basic.py index 06ffd8c9..7de0395b 100644 --- a/spannerlib/ie_func/basic.py +++ b/spannerlib/ie_func/basic.py @@ -93,7 +93,7 @@ def rgx_split(delim, # the delimeter pattern to split on try: first_span = next(delim_iter) if first_span.start != 0: - yield(initial_tag,text[:first_span.start]) + yield(Span(initial_tag),text[:first_span.start]) except StopIteration: return prev_span = first_span diff --git a/spannerlib/ie_func/rust_spanner_regex.py b/spannerlib/ie_func/rust_spanner_regex.py index baeec844..01194f9d 100644 --- a/spannerlib/ie_func/rust_spanner_regex.py +++ b/spannerlib/ie_func/rust_spanner_regex.py @@ -1,3 +1,5 @@ +"""This module contains implementation of regex ie functions using the rust package `enum-spanner-rs`""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/callbacks/04d_rust_spanner_regex.ipynb. # %% auto 0 diff --git a/spannerlib/micro_passes.py b/spannerlib/micro_passes.py index 050ce92b..7c0c8bfc 100644 --- a/spannerlib/micro_passes.py +++ b/spannerlib/micro_passes.py @@ -1,3 +1,5 @@ +"""passes over the AST of a statement to do semantic checks and register state in the session object""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/020_micro_passes.ipynb. # %% auto 0 diff --git a/spannerlib/opt.py b/spannerlib/opt.py index 72399d64..6bb4742f 100644 --- a/spannerlib/opt.py +++ b/spannerlib/opt.py @@ -1,3 +1,5 @@ +"""This file contains implementation of passes that optimize the term graph structure.""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/025_query_optimizations.ipynb. # %% auto 0 diff --git a/spannerlib/ra.py b/spannerlib/ra.py index a1cbd302..75f6035e 100644 --- a/spannerlib/ra.py +++ b/spannerlib/ra.py @@ -1,3 +1,5 @@ +"""relation algebra operations and ie function calculation operations""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/008_extended_RA_operations.ipynb. # %% auto 0 diff --git a/spannerlib/span.py b/spannerlib/span.py index 443f14e4..92c33f80 100644 --- a/spannerlib/span.py +++ b/spannerlib/span.py @@ -1,3 +1,5 @@ +"""Span class and how to interface it with pandas""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/005_spans_and_pandas.ipynb. # %% auto 0 diff --git a/spannerlib/term_graph.py b/spannerlib/term_graph.py index f9228a3c..e75e579c 100644 --- a/spannerlib/term_graph.py +++ b/spannerlib/term_graph.py @@ -1,3 +1,5 @@ +"""Term graphs that encode logic of rules as graphs over RA operators and ie function executions""" + # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/009_term_graphs.ipynb. # %% auto 0