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

source-academy / py-slang / 31136681664
86%

Build:
DEFAULT BRANCH: main
Ran 07 Aug 2026 01:20AM UTC
Jobs 1
Files 138
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 Aug 2026 01:01AM UTC coverage: 86.118% (+0.06%) from 86.063%
31136681664

push

github

web-flow
Stepper: give a built-in used as a value a hover popup (#409)

* Stepper: give a built-in used as a value a hover popup

is_function(print) had no way to show what `print` (unapplied) is:
a bare built-in-named Identifier rendered like any other name, with
no popup, unlike a user-defined function's mu-term hover.

The obvious "hack" -- checking whether an Identifier's name matches a
builtin -- already exists throughout reduce.ts/builtins.ts for actual
evaluation (contractCall's built-in dispatch), but that check can't
be baked into a real node type at translation time: a builtin's name
can be locally shadowed (e.g. `def print(x): return is_function(print)`
is valid, if confusing, Python -- see the extended discussion on
py-slang#404), and py-slang's substitution model only resolves that
shadowing as reduction proceeds, not statically up front.

Add ast.ts's markBuiltins: a display-only pass getSteps.ts runs on
each step's tree, after reduction, right before serialization. A
bare Identifier surviving to that point genuinely refers to the
built-in of that name -- any shadowing binding has already
substituted the occurrence away by then, the same guarantee
contractCall already relies on -- except inside a not-yet-invoked
function value's own body, which is opaque cargo substitution hasn't
reached yet, so the walk tracks bound names there exactly like
substitute() does, to avoid mislabelling a future recursive
self-reference as a builtin.

Since this walk runs after a contraction's preRedex/postRedex are
already captured by identity from the pre-relabeling tree, it also
returns a correspondence map so getSteps.ts can translate a marker's
redex into its (possibly relabeled) counterpart -- needed whenever
the redex itself is what gets relabeled, e.g. breakpoint()'s own
callee.

Renders via the new Builtin node type + syntaxProfile.ts's hoverText
rule, added to @sourceacademy/common-stepper/web-stepper in
source-academy/plugins#92 (not yet published, hence th... (continued)

4771 of 5978 branches covered (79.81%)

Branch coverage included in aggregate %.

50 of 50 new or added lines in 4 files covered. (100.0%)

10663 of 11944 relevant lines covered (89.27%)

165072.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31136681664.1 07 Aug 2026 01:20AM UTC 138
86.12
GitHub Action Run
Source Files on build 31136681664
  • Tree
  • List 138
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #31136681664
  • 1fdbc97d on github
  • Prev Build on main (#31115137852)
  • Next Build on main (#31143071608)
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