Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ jobs:
# would have. Pinned rather than floating: a green run should mean this
# code passed against a known compiler, not against whatever was newest
# that morning.
- name: Install twill v1.9.0
- name: Install twill v1.12.0
run: |
curl -fsSL -o twill \
https://github.com/twill-lang/twill/releases/download/v1.9.0/twill-v1.9.0-linux-amd64
https://github.com/twill-lang/twill/releases/download/v1.12.0/twill-v1.12.0-linux-amd64
chmod +x twill
./twill --version

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Unreleased

### Changed

- **The suites are written with `std/test`.** `tests/harness.tw` is deleted.
It was the fourth copy of the same harness across four repositories, and
`docs/needs.md` entry 12 said a `std/test` was what would delete it. twill
1.11 shipped one, so every `*_test.tw` imports `"std/test"` and calls the
same four assertions by the same names. The seven suites pass on twill
1.12.0, and the pin moved from 1.9.0 to 1.12.0 in `spool.toml` and CI.

### Added

- **Warmup times itself.** Every pass is measured with `mono_ns`, and the report
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ the 6 test suites under `tests/` pass, the example loads a published model and
answers with it, and CI runs both against a released twill on every push rather
than gating on the prose in this file.

You need twill 1.9.0 or newer. Get one:
You need twill 1.11.0 or newer, because the suites are written with `std/test`,
which arrived in 1.11. Get one:

```bash
curl -fsSL -o twill https://github.com/twill-lang/twill/releases/download/v1.9.0/twill-v1.9.0-linux-amd64
curl -fsSL -o twill https://github.com/twill-lang/twill/releases/download/v1.12.0/twill-v1.12.0-linux-amd64
chmod +x twill
```

The asset name is `twill-v1.9.0-<os>-<arch>`: `linux-amd64`, `linux-arm64`,
The asset name is `twill-v1.12.0-<os>-<arch>`: `linux-amd64`, `linux-arm64`,
`darwin-amd64`, `darwin-arm64`, `windows-amd64.exe`.

The suite needs a checkout of [selvedge](https://github.com/twill-lang/selvedge)
Expand Down
23 changes: 14 additions & 9 deletions docs/needs.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,20 @@ line, now lit from the shared palette so it never drifts in colour.
### 12. A test runner

**Would improve:** `tests/`
**Status:** DELIVERED. `twill test tests` collects `*_test.tw`, runs each in a
fresh interpreter and reports once. CI calls it and so does the README.
`tests/harness.tw` stays, because the runner names the file that failed and the
harness names the assertion inside it; deleting the three copies across three
repositories wants a `std/test`.

`tests/harness.tw` is now the fourth identical copy of the same file across four
repositories. A `twill test` that collected `*_test.tw`, ran each in a fresh
interpreter and reported once would delete all four.
**Status:** DELIVERED, both halves. `twill test tests` collects `*_test.tw`,
runs each in a fresh interpreter and reports once. CI calls it and so does the
README. twill 1.11 then shipped `std/test`, which is what this entry said would
delete the harness copies, and `tests/harness.tw` is deleted: every suite
imports `"std/test"` and calls `check`, `equal_str`, `equal_i64` and `near` by
the same names with the same signatures, so no assertion changed. `near` still
takes the tolerance and never defaults it. The summary is now printed in the
shape the runner reads, `<suite> passed <p> failed <f>` and then `OK` or
`FAILED`, which the copy never was.

What it said while the copy was here: `tests/harness.tw` stays, because the
runner names the file that failed and the harness names the assertion inside
it; deleting the three copies across three repositories wants a `std/test`. It
was the fourth identical copy of the same file across four repositories.

### 13. Concurrency, and a process interface

Expand Down
2 changes: 1 addition & 1 deletion spool.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ entry = "src/predict.tw"
# The language itself, pinned to the release whose std modules and tensor
# builtins this source was written against. spool has no notion of a toolchain
# dependency, so it is declared as an ordinary git dependency.
twill = { version = "^1.9.0", git = "https://github.com/twill-lang/twill" }
twill = { version = "^1.12.0", git = "https://github.com/twill-lang/twill" }

# Reading model archives. A real dependency and not a convenience: loading
# through selvedge gets the model's declared input and output shapes out of the
Expand Down
2 changes: 1 addition & 1 deletion tests/batcher_test.tw
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mode systems

import "harness.tw" as t
import "std/test" as t
import "../src/signature.tw" as sg
import "../src/model.tw" as md
import "../src/batcher.tw" as bat
Expand Down
71 changes: 0 additions & 71 deletions tests/harness.tw

This file was deleted.

2 changes: 1 addition & 1 deletion tests/model_test.tw
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mode systems
# it back through shuttle. It is the only test in the repository that touches
# the filesystem, and it cleans up after itself.

import "harness.tw" as t
import "std/test" as t
import "../src/model.tw" as md
import "../src/signature.tw" as sg
import "../../selvedge/src/archive.tw" as arc
Expand Down
2 changes: 1 addition & 1 deletion tests/predict_test.tw
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mode systems

import "harness.tw" as t
import "std/test" as t
import "../src/signature.tw" as sg
import "../src/model.tw" as md
import "../src/predict.tw" as pr
Expand Down
2 changes: 1 addition & 1 deletion tests/quant_test.tw
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mode systems
# unbiased, that the sizes are what the projection says, and that a saturating
# calibration says how much it saturated.

import "harness.tw" as t
import "std/test" as t
import "../src/signature.tw" as sg
import "../src/model.tw" as md
import "../src/quant.tw" as q
Expand Down
2 changes: 1 addition & 1 deletion tests/score_test.tw
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mode systems

import "harness.tw" as t
import "std/test" as t
import "../src/signature.tw" as sg
import "../src/model.tw" as md
import "../src/score.tw" as sc
Expand Down
2 changes: 1 addition & 1 deletion tests/signature_test.tw
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mode systems
# debug, which is the situation twill's checker exists to prevent and which
# serving otherwise reintroduces.

import "harness.tw" as t
import "std/test" as t
import "../src/signature.tw" as sg
import "std/text" as tx

Expand Down
2 changes: 1 addition & 1 deletion tests/warmup_test.tw
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mode systems
# saving is only claimed when there is enough evidence for one, that a first
# pass no slower than the rest claims nothing, and that every pass is timed.

import "harness.tw" as t
import "std/test" as t
import "std/text" as tx
import "../src/signature.tw" as sg
import "../src/model.tw" as md
Expand Down
Loading