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

source-academy / py-slang / 28852666182
78%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 08:34AM UTC
Jobs 1
Files 86
Run time 1min
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

07 Jul 2026 08:31AM UTC coverage: 77.943% (+0.03%) from 77.913%
28852666182

push

github

web-flow
feat(stepper): report cumulative print output per step (#203)

* feat(stepper): report cumulative print output per step

Each serialized step now carries the program's cumulative textual output
(everything `print` has written) up to and including that step, so the host can
render a running output panel that grows as the slider advances.

- builtins: `formatPrintOutput(args)` — CPython default formatting (`str()` of
  each arg, space-joined, trailing newline; `print()` is a blank line).
- reduce: `ReduceResult.output`; `contractCall` records a `print` call's text;
  threaded through `stepHead`/`reduceProgram`/`reduceBlock`. `print` still
  evaluates to `None`.
- getSteps: `drive()` accumulates output across contractions and stamps every
  step; a print's text first appears on its "Ran print" step and persists on
  every step after it. Emitted only when non-empty.

The `output` field is emitted via a small local type-widening until this package
depends on `@sourceacademy/common-stepper` >= 0.0.2 (which adds `output` to
`SerializedStepperStep`); it crosses the runner->host channel as plain JSON
regardless. Rendering the panel is the host (plugins) side.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(stepper): address review feedback on cumulative-output PR

- Hoist a single `isTruthy` predicate into ast.ts, shared by reduce.ts
  (if/ternary conditions) and builtins.ts (`bool()`), replacing two
  independent copies of the same logic that could silently drift apart.
- getSteps.ts: replace the 7 call sites that each manually repeated
  `steps.push({..., output})` with a `pushStep(ast, markers)` closure
  that captures `output` by reference, so a future push site can't
  forget to stamp it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Shrey Jain <“shreyjain5132@email.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Martin Henz <henz@nus.edu.sg>

2559 of 3549 branches covered (72.1%)

Branch coverage included in aggregate %.

26 of 31 new or added lines in 4 files covered. (83.87%)

6042 of 7486 relevant lines covered (80.71%)

14253.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
89.34
-6.06% src/conductor/stepper/ast.ts
Jobs
ID Job ID Ran Files Coverage
1 28852666182.1 07 Jul 2026 08:34AM UTC 86
77.94
GitHub Action Run
Source Files on build 28852666182
  • Tree
  • List 86
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28852666182
  • e4407548 on github
  • Prev Build on main (#28845351947)
  • Next Build on main (#28873565352)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc