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

source-academy / py-slang / 30788832906
86%

Build:
DEFAULT BRANCH: main
Ran 03 Aug 2026 06:20AM UTC
Jobs 1
Files 137
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

03 Aug 2026 06:01AM UTC coverage: 86.029% (-0.1%) from 86.155%
30788832906

push

github

web-flow
Stepper: support a subset of module imports (#386)

* Make the Python stepper handle a subset of module imports (#385)

`from X import Y` used to make the stepper report "Evaluation stuck"
the instant it saw the import line, regardless of whether the
imported name was ever used. This wires up real module resolution
for the substitution stepper, mirroring the CSE machine's own
two-phase (load-then-run) model:

- FromImport now translates to a no-op statement instead of an inert
  placeholder identifier, rendering the student's actual import text.
- New OpaqueValue/ModuleFunction StepNode kinds represent opaque
  module handles and imported callables as legitimate, substitutable
  values.
- ModuleLoaderRunnerPlugin is registered on PyStepperEvaluatorBase,
  exactly as the CSE/py2js/Pvml evaluators already do.
- moduleInterop.ts resolves and substitutes a program's imports
  before stepping begins, and calls imported functions (trying the
  synchronous closure_call_sync fast path first, falling back to
  draining the async closure_call_unchecked generator). A Python
  closure passed as an argument into a module call is declined —
  that stays an honest "Evaluation stuck", the same degrade input()
  already gets — since supporting it would require re-entering the
  reducer's own step machinery mid-call.
- reduce.ts/getSteps.ts are now async end-to-end to support this.

Verified with integration tests against a fake module (the same
GenericDataHandler + ModuleLoaderRunnerPlugin harness
py2js-from-import.test.ts uses), not just the no-evaluator-wired
degrade path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017w4FqCep4j8XyFpF4kpVue

* Address CodeRabbit review on #386

- moduleInterop.ts: use Promise.allSettled (not Promise.all) when
  requesting a program's modules, so a second rejection is observed
  instead of becoming an unhandled rejection racing the first one's
  throw. Preserve the loader's ... (continued)

4657 of 5836 branches covered (79.8%)

Branch coverage included in aggregate %.

129 of 158 new or added lines in 8 files covered. (81.65%)

2 existing lines in 2 files now uncovered.

10386 of 11650 relevant lines covered (89.15%)

166941.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
23
68.15
src/conductor/stepper/moduleInterop.ts
2
45.45
-4.55% src/conductor/stepper/PyStepperRunnerPlugin.ts
1
43.64
4.42% src/conductor/PyStepperEvaluator.ts
1
89.35
0.01% src/conductor/stepper/ast.ts
1
87.78
-0.28% src/conductor/stepper/builtins.ts
1
93.99
-0.43% src/conductor/stepper/reduce.ts

Coverage Regressions

Lines Coverage ∆ File
1
87.78
-0.28% src/conductor/stepper/builtins.ts
1
45.45
-4.55% src/conductor/stepper/PyStepperRunnerPlugin.ts
Jobs
ID Job ID Ran Files Coverage
1 30788832906.1 03 Aug 2026 06:20AM UTC 137
86.03
GitHub Action Run
Source Files on build 30788832906
  • Tree
  • List 137
  • Changed 9
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30788832906
  • b99435d2 on github
  • Prev Build on main (#30760838288)
  • Next Build on main (#30790277143)
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