chore: Scriptorium as a Python test framework (+ Fable 5.8.0 bump)#346
Open
dbrattli wants to merge 2 commits into
Open
chore: Scriptorium as a Python test framework (+ Fable 5.8.0 bump)#346dbrattli wants to merge 2 commits into
dbrattli wants to merge 2 commits into
Conversation
Fable 5.8.0's Python backend propagates the [<EntryPoint>] return value as the process exit code (emits `sys.exit(int(main(...)))`), so a failing test runner is now visible to CI. Bumps the fable tool and fable-library in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Proof-of-concept showing Scriptorium's Nib assertions + Quill runner compile to Python via Fable.Python and can test real bindings. Adds spike/scriptorium/ (Spike.fsproj, Main.fs, README.md) and a `just spike-scriptorium` target. Not wired into CI or the main suite — this is a spike to inform whether/how to adopt Scriptorium. See spike/scriptorium/README.md for findings and trade-offs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A spike to evaluate Scriptorium (Maxime Mangel's F#/Fable testing stack — Nib assertions + Quill runner) as a test framework for Fable.Python, compiled to Python. Opened so we can decide the direction later — it is intentionally not wired into CI or the main suite.
Contents
1.
chore(deps): bump Fable to 5.8.0fabletool 5.6.0 → 5.8.0,fable-library5.6.0 → 5.8.0 (lockstep),uv.lockre-locked.[<EntryPoint>]exit-code propagation — it now emitssys.exit(int(main(...))), so a failing runner is visible to CI. This bug was found by the spike; the fix was contributed upstream and shipped in 5.8.0 (fable-compiler/Fable7848eae46).2.
spike: evaluate Scriptorium (Nib + Quill)spike/scriptorium/—Spike.fsproj,Main.fs,README.md, plus ajust spike-scriptoriumtarget.Fable.Python.Mathbindings, compiled--lang pythonand run on CPython.Findings (full write-up in
spike/scriptorium/README.md)#if FABLE_COMPILER_PYTHONsupport. The runner works on CPython (colored output, diffs, source links), and exit codes are correct (pass→0, fail→1) with no shim on 5.8.0.assertThatthrows on failure, which pytest reports fine. So we could adopt Nib's richer assertions while keeping[<Fact>]+ pytest, without a runner swap.Nib.Browser(Playwright/JS-only);Nib.SnapshotandHedgehoghit fable-library-python runtime gaps.-k/-x, parametrize, plugins, JUnit XML, coverage).Direction options (for discussion, not decided here)
Quill+Nib, evaluate, then decide.Known limitations of the spike
Spike.fsprojreferences a local../../../Scriptoriumcheckout (not NuGet), so it only builds where that checkout exists. Scriptorium's Python-supporting packages would need to be consumed via NuGet/paket before this is portable. This is fine for a spike but means CI does not build it.spike/scriptorium/build/) is gitignored.🤖 Generated with Claude Code