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

source-academy / py-slang / 28242804192
76%

Build:
DEFAULT BRANCH: main
Ran 26 Jun 2026 02:01PM UTC
Jobs 1
Files 74
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

26 Jun 2026 01:58PM UTC coverage: 74.161%. Remained the same
28242804192

push

github

web-flow
feat: add standalone headless evaluator and Node.js library export (#170)

* feat: add standalone CLI for headless SICPy evaluation

Adds src/repl.ts and rollup.repl.mjs to build a standalone Node.js
CLI (dist/repl.cjs) that runs SICPy programs through the CSE evaluator
without the browser/Conductor stack.

Usage:
  yarn build:repl          # build dist/repl.cjs
  yarn repl <file> [-v 1-4]  # run a SICPy file (variant defaults to 4)

The CLI wires process.stdout/stderr to the CSE engine's stream layer,
loads the appropriate builtins and prelude for the requested variant,
runs the program to completion (maxSnapshots=0), and exits non-zero on
any parse, analysis, or runtime error.

Addresses issue #164: enables automated SICPy testing against py-slang
by providing a headless evaluator comparable to the js-slang CLI.

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

* feat: add library export and refactor CLI around shared runner

Extracts the core headless evaluation logic into src/runner.ts, which
both the CLI and a new library entry point (src/index.ts) use.

- src/runner.ts: runCode(code, variant) evaluates a SICPy program
  through the CSE machine and returns all stdout as a string. Errors
  are thrown as RunError with a kind field (parse/analysis/runtime).
- src/index.ts: public library entry point exporting runCode and RunError.
- src/repl.ts: simplified to a thin CLI wrapper around runCode.
- rollup.lib.mjs: builds dist/index.cjs for use as a Node.js library.
- rollup.repl.mjs: builds dist/repl.cjs for use as a standalone CLI.
- package.json: adds build:lib and build:repl scripts; moves commander
  to dependencies since the CLI bundle requires it at runtime.

Allows external scripts (e.g. the SICP test runner) to import py-slang
directly instead of spawning a subprocess, matching the pattern used by
js-slang in the JS edition tests.

Co-Authored-By: Akshay Narayanan <akshaydocs2007@gmail.com>

* fix: address review comments on runner.ts... (continued)

1589 of 2404 branches covered (66.1%)

Branch coverage included in aggregate %.

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

4619 of 5967 relevant lines covered (77.41%)

13159.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28242804192.1 26 Jun 2026 02:01PM UTC 74
74.16
GitHub Action Run
Source Files on build 28242804192
  • Tree
  • List 74
  • Changed 3
  • Source Changed 3
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28242804192
  • 990d22e8 on github
  • Prev Build on main (#28103238638)
  • Next Build on main (#28285307339)
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