• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / py-slang / 30410611527 / 1
86%
main: 86%

Build:
DEFAULT BRANCH: main
Ran 29 Jul 2026 12:33AM UTC
Files 120
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jul 2026 12:15AM UTC coverage: 86.205% (+0.05%) from 86.159%
30410611527.1

push

github

web-flow
Add draw_data to the py2js engine (#366)

Wires draw_data up for the py2js engine, alongside the existing CSE
machine support. Available from chapter 2 onward, bridged natively as
part of the LINKED_LISTS group (the same group pair/llist/head/tail
belong to) rather than the generic CSE-Value round-trip bridge every
other stdlib builtin goes through.

That's a deliberate choice, not a shortcut: the generic bridge's
toTagged/toTaggedList walk a pair/list's spine with no cycle guard,
which is fine for every other bridged builtin (none is ever handed a
genuinely self-referential structure in practice) but wrong for
draw_data specifically, since chapter 3+'s set_head/set_tail can build
exactly that, and visualizing such a structure gracefully (a "ref"
arrow, not a hang) is the whole point of the feature. draw_data instead
walks native PyValues directly via a new toDataVisualizerNodePy2Js
adapter, with its own refs-based cycle guard — proven by a test that
draws a genuinely self-referential pair without hanging.

- src/conductor/dataVisualizer/toDataVisualizerNodePy2Js.ts — the py2js
  native-value counterpart of toDataVisualizerNode.ts, dispatching on
  py2js's own unboxed value shapes instead of CSE's tagged Value.
- src/conductor/dataVisualizer/Py2JsDataVisualizerRunnerPlugin.ts —
  thin BaseDataVisualizerRunnerPlugin<PyValue> binding, mirroring
  PythonDataVisualizerRunnerPlugin's shape.
- src/engines/py2js/stdlibBridge.ts — nativeDrawData, registered when
  bridging the LINKED_LISTS group.
- src/engines/py2js/index.ts / src/conductor/Py2JsEvaluator.ts —
  thread a registered Py2JsDataVisualizerRunnerPlugin down into the
  session (variant >= 2 only, mirroring PyCseEvaluatorBase's identical
  gate), with resetRun() called per chunk.


Claude-Session: https://claude.ai/code/session_014SWoqgBNWe8oP21aL2qejk

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

4443 of 5546 branches covered (80.11%)

Branch coverage included in aggregate %.

9630 of 10779 relevant lines covered (89.34%)

179273.54 hits per line

Source Files on job 30410611527.1
  • Tree
  • List 120
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30410611527
  • 9fc96632 on github
  • Prev Job for on main (#30367171085.1)
  • Next Job for on main (#30423622243.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc