Skip to content

Add Python scripting, StringSeries support, and UI improvements to Custom Functions #1323

Open
Alvvalencia wants to merge 37 commits intofacontidavide:mainfrom
Alvvalencia:main
Open

Add Python scripting, StringSeries support, and UI improvements to Custom Functions #1323
Alvvalencia wants to merge 37 commits intofacontidavide:mainfrom
Alvvalencia:main

Conversation

@Alvvalencia
Copy link
Copy Markdown
Contributor

  • Python engine: Embedded Python 3.12 interpreter alongside the existing Lua engine.
    Users can write calc(time, value, ...) functions in Python with full traceback error
    reporting and line-number mapping to the editor.

  • StringSeries support: Custom Functions now accept string timeseries as main sources
    or additional sources. A MixedSource abstraction handles dispatch between numeric
    (PlotData) and string (StringSeries) inputs in both engines.

  • Mixed-type additional sources: Additional sources passed to calc() can be any
    combination of numeric and string series, passed to the scripting engine as native types.

  • Language persistence: The selected scripting language (Lua/Python) is saved as part
    of the snippet and stored in the function library. Fully backward compatible — snippets
    without a language attribute default to Lua.

  • UI refactor and optimizations: Improved Function Editor layout and language selector.
    Fixed white-rendering artifacts when switching scripting language.

return std::make_shared<LuaCustomFunction>(snippet);
}

void FunctionEditorWidget::setupFunctionAppsButton()

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 109 lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants