Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(luau): add cumulative and lag helper functions
Implements additional helper functions for qsv's Lua DSL as suggested in #1782:
qsv_loadjson - load a JSON file into a Luau table
Cumulative functions:
Lag/diff functions:
qsv_loadjson is designed to work in CKAN so we can send package and resource info to DP+, so it can infer suggested metadata for the DRUF workflow, as we use the
luau
command for complex inferencing beyond the capabilities of MiniJinja.This effectively gives us two DSLs for the DRUF workflow. MiniJinja for simple metadata inferences, and Luau for complex ones. Both MiniJinja and Luau are purpose-built as DSLs, so we don't need to use Python
eval
which leaves a gaping security hole.The cumulative and lag/diff helpers enhances qsv's data analysis capabilities with R-like functionality.
Closes #1782
cc @ggrothendieck