Add v0.1 skeleton: spec, parser/runtime, CLI, hello example, tests, CI#2
Closed
minglong51 wants to merge 2 commits into
Closed
Add v0.1 skeleton: spec, parser/runtime, CLI, hello example, tests, CI#2minglong51 wants to merge 2 commits into
minglong51 wants to merge 2 commits into
Conversation
Owner
Author
|
Superseded — main has long since shipped past this v0.1 skeleton (v0.8 as of June 2026). Closing stale PR. |
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.
Motivation
Description
pyproject.toml), a console scriptthread(src/threadlang/cli.py), and package exports (src/threadlang/__init__.py).src/threadlang/ast.py(Program,ContextAssign,Emit,StringLiteral,VariableRef,Concat).src/threadlang/parser.pysupportingthread Name { ... },context { key = "string" },emit text { ... },context.<key>,inputs.<key>, and+concatenation, plus placeholder handling forinputs/rules/stepsblocks.src/threadlang/runtime.pythat evaluates the AST and returnsRunResult(output, trace)with trace events (parse_ok,context_set,emit).docs/spec.md,docs/grammar.ebnf), example program (examples/hello.thread), golden test (tests/test_golden_hello.py), and GitHub Actions workflow (.github/workflows/ci.yml).README.mdwith local run/test instructions and the hello example command.Testing
python -m pip install -e .which failed in this environment due to network/proxy restrictions when resolving build dependencies.python -m pip install -e . --no-build-isolationsucceeded in this environment.python -m pytestpassed (1 test), and the golden testtests/test_golden_hello.pyassertsresult.output == "Hello, world!"and a trace sequence["parse_ok", "context_set", "emit"].thread run examples/hello.thread --inputs name=worldproducedHello, world!as expected.Codex Task