-
Notifications
You must be signed in to change notification settings - Fork 0
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
DSEGOG-289 DSEGOG-291 DSEGOG-292 DSEGOG-293 DSEGOG-290 Implement functions with Lark #86
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
+ Coverage 83.00% 87.11% +4.10%
==========================================
Files 45 65 +20
Lines 2160 2724 +564
Branches 164 214 +50
==========================================
+ Hits 1793 2373 +580
+ Misses 335 320 -15
+ Partials 32 31 -1 ☔ View full report in Codecov by Sentry. |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
+ Coverage 94.99% 95.54% +0.54%
==========================================
Files 50 70 +20
Lines 2837 3456 +619
Branches 297 365 +68
==========================================
+ Hits 2695 3302 +607
- Misses 105 108 +3
- Partials 37 46 +9 ☔ View full report in Codecov by Sentry. |
New functionality
/functions
for validating types and variable names of a proposed function (intended to be used duringthe popup, before submitting request to/records
/functions/tokens
to get the list of supported tokens, "nice" names and implementation details/images/function
to generate a single full size image from a function/waveforms/function
to return x and y of a waveform generated from a function/records
accepts functions as an optional query paramOther changes
json.dumps
instead ofstr
inWaveformModel
to properly handle NaNs and Inf values in the responseget_channel_dtype
TODOs
Considering refactoring builtin functions (no functional impact). While the current builtins cover everything in the requirements, more might be needed later, and it has been raised that a more "reflexive" approach might be more sustainable. While explicitly defining functions was OK originally (min, max, log etc.) with all the builtins updating all the places they need references can be tedious and easy to miss one. Refactoring onto a single source of truth and using that might be more maintainable in the long run, e.g. having a singlefunction
rule in the parser and doing lookup in itsTransformer
function based on a single dict/class (to be created).ABC
Builtin
. All evaluation functionality is defined here, with shared functionality defined onBuiltin
. Properties are used to specify accepted types and tokens for the frontend. Once a new class is added, it will need to be added to thedict
onBuiltins
but other than that no changes to the other Lark elements are needed.np
, these are still explicitly defined. Could migrate these to the same architecture as the other builtins, but they are a lot simpler and are well defined so it may be overkill.Properly handle the Python version issues in a separate PR