-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaned up stuff, and a new simplify_string transform #55
Conversation
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
- Coverage 96.46% 94.98% -1.49%
==========================================
Files 29 30 +1
Lines 1075 1136 +61
Branches 160 168 +8
==========================================
+ Hits 1037 1079 +42
- Misses 16 34 +18
- Partials 22 23 +1
Continue to review full report at Codecov.
|
aw_analysis/query2_functions.py
Outdated
|
||
|
||
@q2_function | ||
def q2_query_bucket(datastore: Datastore, namespace: dict, bucketname: str) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
def q2_query_bucket_eventcount(datastore: Datastore, namespace: dict, bucketname: str): | ||
|
||
@q2_function | ||
def q2_query_bucket_eventcount(datastore: Datastore, namespace: dict, bucketname: str) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
|
||
|
||
@q2_function | ||
def q2_filter_keyvals(datastore: Datastore, namespace: dict, events: list, key: str, *vals) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
def q2_exclude_keyvals(datastore: Datastore, namespace: dict, events: list, key: str, *vals): | ||
|
||
@q2_function | ||
def q2_exclude_keyvals(datastore: Datastore, namespace: dict, events: list, key: str, *vals) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
def q2_filter_period_intersect(datastore: Datastore, namespace: dict, events: list, filterevents: list): | ||
|
||
@q2_function | ||
def q2_filter_period_intersect(datastore: Datastore, namespace: dict, events: list, filterevents: list) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
|
||
|
||
@q2_function | ||
def q2_merge_events_by_keys(datastore: Datastore, namespace: dict, events: list, *keys) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
|
||
|
||
@q2_function | ||
def q2_sort_by_timestamp(datastore: Datastore, namespace: dict, events: list) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
def q2_sort_by_duration(datastore: Datastore, namespace: dict, events: list): | ||
|
||
@q2_function | ||
def q2_sort_by_duration(datastore: Datastore, namespace: dict, events: list) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
def q2_split_url_events(datastore: Datastore, namespace: dict, events: list): | ||
|
||
@q2_function | ||
def q2_split_url_events(datastore: Datastore, namespace: dict, events: list) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
aw_analysis/query2_functions.py
Outdated
_verify_variable_is_type(events, list) | ||
return split_url_events(events) | ||
|
||
|
||
@q2_function | ||
def q2_simplify_window_titles(datastore: Datastore, namespace: dict, events: list, key: str) -> List[Event]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: TNamespace
Made the final fixes and I'm just going to go ahead and merge this. Some pretty good stuff imho! |
simplify_string
transform + testq2_function
decorator for registering query functionspytest.raises
where appropriate in testsq2_find_bucket
to avoid hardcoding bucket IDs in queriesq2_filter_keyvals_regex
TODO