MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _painter_project

Function _painter_project

tests/integration/test_painter_widget.py:30–46  ·  view source on GitHub ↗

Build a minimal project JSON containing a single painter group.

(code: str = DEFAULT_PAINTER_CODE)

Source from the content-addressed store, hash-verified

28
29
30def _painter_project(code: str = DEFAULT_PAINTER_CODE) -> dict:
31 """Build a minimal project JSON containing a single painter group."""
32 group = {
33 "title": "Custom",
34 "widget": "painter",
35 "datasets": [],
36 "painterCode": code,
37 }
38 return {
39 "title": "Painter Test",
40 "frameStart": "/*",
41 "frameEnd": "*/",
42 "frameDetection": 1,
43 "checksum": "",
44 "frameParser": "function parse(frame) { return [frame]; }",
45 "groups": [group],
46 }
47
48
49# ---------------------------------------------------------------------------

Calls

no outgoing calls

Tested by

no test coverage detected