From 8eb91ac00156c6d244acae1cf0203f131dc8b9a5 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:40:46 -0700 Subject: [PATCH 01/10] Setting up GH actions --- .../workflows/ci.yml => .github/workflows/cli.yml | 0 .../workflows/ci.yml => .github/workflows/python.yml | 3 ++- .../ci.yml => .github/workflows/typescript.yml | 0 mise.toml | 12 ++++++++++++ typescript/README.md | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) rename cli/.github/workflows/ci.yml => .github/workflows/cli.yml (100%) rename python/.github/workflows/ci.yml => .github/workflows/python.yml (88%) rename typescript/.github/workflows/ci.yml => .github/workflows/typescript.yml (100%) create mode 100644 mise.toml diff --git a/cli/.github/workflows/ci.yml b/.github/workflows/cli.yml similarity index 100% rename from cli/.github/workflows/ci.yml rename to .github/workflows/cli.yml diff --git a/python/.github/workflows/ci.yml b/.github/workflows/python.yml similarity index 88% rename from python/.github/workflows/ci.yml rename to .github/workflows/python.yml index 4669aae..395533b 100644 --- a/python/.github/workflows/ci.yml +++ b/.github/workflows/python.yml @@ -18,7 +18,8 @@ jobs: # https://docs.astral.sh/uv/guides/integration/github/ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b with: - version: "0.11.17" + # this is the actual uv version + version: "0.11.21" - uses: jdx/mise-action@v2 - name: Run Python SDK CI diff --git a/typescript/.github/workflows/ci.yml b/.github/workflows/typescript.yml similarity index 100% rename from typescript/.github/workflows/ci.yml rename to .github/workflows/typescript.yml diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..0845a89 --- /dev/null +++ b/mise.toml @@ -0,0 +1,12 @@ +[tools] +# keep this version inline with the version declared in .github/workflows/typescript +bun = "1.3.14" +# keep this version inline with rust stable +rust = "1.96.0" +# keep this version inline with the version declared in .github/workflows/python +uv = "0.11.21" + +[monorepo] +config_roots = [".", "cli", "typescript", "python"] + +experimental_monorepo_root = true diff --git a/typescript/README.md b/typescript/README.md index a3759f7..56c2968 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -1,4 +1,4 @@ -# @quantiles/sdk +# `@quantiles/sdk` TypeScript client for the local Quantiles eval runner. From bde5341fddb631c686b227eb11e55d80c369247c Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:42:32 -0700 Subject: [PATCH 02/10] fixup --- mise.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mise.toml b/mise.toml index 0845a89..36da1f4 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,8 @@ +monorepo_root = true + +[monorepo] +config_roots = [".", "cli", "typescript", "python"] + [tools] # keep this version inline with the version declared in .github/workflows/typescript bun = "1.3.14" @@ -5,8 +10,3 @@ bun = "1.3.14" rust = "1.96.0" # keep this version inline with the version declared in .github/workflows/python uv = "0.11.21" - -[monorepo] -config_roots = [".", "cli", "typescript", "python"] - -experimental_monorepo_root = true From 62129f7c616c5c2d68273432377b2e0208db40cb Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:43:40 -0700 Subject: [PATCH 03/10] small gitignore cleanup --- .gitignore | 2 ++ cli/.gitignore | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0f5de7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.envrc +.DS_Store diff --git a/cli/.gitignore b/cli/.gitignore index 6ae5d45..47b21b7 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -19,7 +19,6 @@ target # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ -.DS_Store /.quantiles /.wrangler /dist From c1ba9b8887ed6a1d0cace38ffc4cd08e9f44e981 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:47:29 -0700 Subject: [PATCH 04/10] fixups --- .github/workflows/cli.yml | 2 +- .github/workflows/python.yml | 2 +- .github/workflows/typescript.yml | 2 +- typescript/mise.toml | 14 +++++++++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1e08313..b422d68 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -23,4 +23,4 @@ jobs: workspaces: . - uses: jdx/mise-action@v2 - name: Run CLI checks - run: mise r ci + run: mise //cli:ci diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 395533b..6959d8b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -23,4 +23,4 @@ jobs: - uses: jdx/mise-action@v2 - name: Run Python SDK CI - run: mise run ci + run: mise //python:ci diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 48f22a0..2ef75a3 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -17,4 +17,4 @@ jobs: bun-version: 1.3.14 - uses: jdx/mise-action@v2 - name: run-ci - run: mise r ci + run: mise //typescript:ci diff --git a/typescript/mise.toml b/typescript/mise.toml index 6264871..0377cef 100644 --- a/typescript/mise.toml +++ b/typescript/mise.toml @@ -1,21 +1,29 @@ +[tasks.install] +run = "bun install" + +[tasks.install-frozen] +run = "bun install --frozen-lockfile" + [tasks.check] +depends = ["install-frozen"] run = "bun run check" [tasks.typecheck] +depends = ["install-frozen"] run = "bunx tsc --noEmit" [tasks.lint] +depends = ["install-frozen"] run = "bunx biome ci" [tasks.fmt] +depends = ["install-frozen"] run = "bun run fmt" [tasks.example-prompt-eval] +depends = ["install-frozen"] run = "qt run support-triage -- bun run examples/prompt_eval.ts" -[tasks.install-frozen] -run = "bun install --frozen-lockfile" - [tasks.ci] run = [ "bun install --frozen-lockfile", From 83ad52d25f86e1ea602a75d873143ef506edf8fd Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:47:57 -0700 Subject: [PATCH 05/10] naming of GH actions --- .github/workflows/cli.yml | 2 +- .github/workflows/python.yml | 2 +- .github/workflows/typescript.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index b422d68..c5a6461 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -1,4 +1,4 @@ -name: standard ci checks +name: cli on: push: diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6959d8b..c2e899d 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,4 +1,4 @@ -name: standard ci +name: python-sdk on: push: diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 2ef75a3..e1fd9e3 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -1,4 +1,4 @@ -name: standard ci checks +name: typescript-sdk on: push: From 91b3e8c2b923999100ca2fc8302346a56b39efcd Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:49:04 -0700 Subject: [PATCH 06/10] fixup --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a0f5de7..8f73094 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .envrc .DS_Store +/.quantiles From b296f21fbdaa78affaa8e527468a6f171d3d75ee Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:13:25 -0700 Subject: [PATCH 07/10] fixups --- .github/workflows/cli.yml | 2 ++ python/src/quantiles/datasets.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index c5a6461..e703974 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -17,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt,clippy - uses: mozilla-actions/sccache-action@v0.0.9 - uses: Swatinem/rust-cache@v2 with: diff --git a/python/src/quantiles/datasets.py b/python/src/quantiles/datasets.py index 947d307..f1280c9 100644 --- a/python/src/quantiles/datasets.py +++ b/python/src/quantiles/datasets.py @@ -186,7 +186,10 @@ async def _execute() -> JsonValue: # `list[JsonValue]` when resolving the recursive type alias. # The cast is a workaround for this limitation. The data is guaranteed # by `load_batch`'s return type. - return cast(JsonValue, await self._source.load_batch(self._offset, self._batch_size)) + raw: list[dict[str, JsonValue]] = await self._source.load_batch( + self._offset, self._batch_size + ) + return cast(JsonValue, raw) batch = await step( self._ctx, @@ -194,8 +197,14 @@ async def _execute() -> JsonValue: input_value=cast(JsonValue, batch_input), execute=_execute, ) + # Note that _execute must return a `JsonValue`, per the contract in `step`, + # but in reality it returns a `list[dict[str, JsonValue]]` and casts to a + # `JsonValue`. The narrower list[dict...] type actually is a JsonValue, so + # that's just an up-cast. this is a(n admittedly weak) attempt at downcasting, + # but in reality, as long as the typing here matches with that above in + # _execute, we're fine. batch_list = batch if isinstance(batch, list) else [] - self._buffer.extend(batch_list) + self._buffer.extend(cast(list[dict[str, JsonValue]], batch_list)) async def dataset[RowT: BaseModel]( From 7e2c9120f09f08132ee7e6ae37db7e9215ada9f9 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:19:12 -0700 Subject: [PATCH 08/10] setting up mise version --- .github/workflows/cli.yml | 2 ++ .github/workflows/python.yml | 2 ++ .github/workflows/typescript.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index e703974..38c2853 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -24,5 +24,7 @@ jobs: with: workspaces: . - uses: jdx/mise-action@v2 + with: + version: 2026.6.11 - name: Run CLI checks run: mise //cli:ci diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index c2e899d..8b8be89 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -22,5 +22,7 @@ jobs: version: "0.11.21" - uses: jdx/mise-action@v2 + with: + version: 2026.6.11 - name: Run Python SDK CI run: mise //python:ci diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index e1fd9e3..ef7005f 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -16,5 +16,7 @@ jobs: with: bun-version: 1.3.14 - uses: jdx/mise-action@v2 + with: + version: 2026.6.11 - name: run-ci run: mise //typescript:ci From b8157c12d2316d09869ca3031fe1f103956bf444 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:20:23 -0700 Subject: [PATCH 09/10] comment --- .github/workflows/cli.yml | 2 ++ .github/workflows/python.yml | 2 ++ .github/workflows/typescript.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 38c2853..2337360 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -26,5 +26,7 @@ jobs: - uses: jdx/mise-action@v2 with: version: 2026.6.11 + # TODO: consider cache: true + # https://github.com/marketplace/actions/mise-action#example-workflow - name: Run CLI checks run: mise //cli:ci diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8b8be89..d3bace6 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -24,5 +24,7 @@ jobs: - uses: jdx/mise-action@v2 with: version: 2026.6.11 + # TODO: consider cache: true + # https://github.com/marketplace/actions/mise-action#example-workflow - name: Run Python SDK CI run: mise //python:ci diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index ef7005f..8ddbef5 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -18,5 +18,7 @@ jobs: - uses: jdx/mise-action@v2 with: version: 2026.6.11 + # TODO: consider cache: true + # https://github.com/marketplace/actions/mise-action#example-workflow - name: run-ci run: mise //typescript:ci From 1c20b32effae25c080b217e39a8934b4c50f9fb1 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:21:15 -0700 Subject: [PATCH 10/10] fixup --- .github/workflows/cli.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 2337360..7e2bc82 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -28,5 +28,7 @@ jobs: version: 2026.6.11 # TODO: consider cache: true # https://github.com/marketplace/actions/mise-action#example-workflow + - name: Ensure rustfmt and clippy are installed for pinned Rust version + run: mise x -- rustup component add rustfmt clippy --toolchain 1.96.0 - name: Run CLI checks run: mise //cli:ci