Skip to content

Commit bdb0c6b

Browse files
committed
A bunch of AI slop to generate scan graphs, as well as fixing lots of split problems
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 2acbce9 commit bdb0c6b

5 files changed

Lines changed: 139 additions & 5 deletions

File tree

.github/workflows/web.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,27 @@ jobs:
3636
- "vortex-web/**"
3737
- ".github/workflows/web.yml"
3838
39+
check:
40+
name: Lint & Typecheck
41+
needs: [changes]
42+
if: needs.changes.outputs.web == 'true'
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 10
45+
steps:
46+
- uses: actions/checkout@v6
47+
- uses: actions/setup-node@v4
48+
with:
49+
node-version: "22"
50+
cache: "npm"
51+
cache-dependency-path: vortex-web/package-lock.json
52+
- run: npm ci
53+
- run: npm run lint
54+
- run: npm run typecheck
55+
3956
build:
4057
name: Build
58+
needs: [changes]
59+
if: needs.changes.outputs.web == 'true'
4160
runs-on: ubuntu-latest
4261
timeout-minutes: 30
4362
steps:
@@ -55,8 +74,11 @@ jobs:
5574
cache: "npm"
5675
cache-dependency-path: vortex-web/package-lock.json
5776
- run: npm ci
77+
- name: Verify committed WASM types are up-to-date
78+
run: |
79+
npm run wasm
80+
git diff --exit-code src/wasm/pkg/*.d.ts src/wasm/pkg/package.json
5881
- run: npm run build
59-
- run: npm run lint
6082
- uses: actions/upload-artifact@v4
6183
with:
6284
name: vortex-web-dist
@@ -94,7 +116,7 @@ jobs:
94116
pull-requests: write
95117
deployments: write
96118
environment:
97-
name: storybook-preview
119+
name: preview
98120
url: ${{ steps.deploy.outputs.deployment-url }}
99121
steps:
100122
- uses: actions/download-artifact@v4
@@ -143,8 +165,7 @@ jobs:
143165
144166
preview:
145167
name: Deploy Preview
146-
needs: [build, changes]
147-
if: needs.changes.outputs.web == 'true'
168+
needs: [build]
148169
runs-on: ubuntu-latest
149170
timeout-minutes: 10
150171
permissions:

vortex-web/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
dist
3-
src/wasm/pkg
3+
storybook-static
4+
src/wasm/pkg/*.js
5+
src/wasm/pkg/*.wasm
46
*.local
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "vortex-web-wasm",
3+
"type": "module",
4+
"description": "WASM bindings for the Vortex web explorer",
5+
"version": "0.1.0",
6+
"license": "Apache-2.0",
7+
"files": [
8+
"vortex_web_wasm_bg.wasm",
9+
"vortex_web_wasm.js",
10+
"vortex_web_wasm.d.ts"
11+
],
12+
"main": "vortex_web_wasm.js",
13+
"types": "vortex_web_wasm.d.ts",
14+
"sideEffects": [
15+
"./snippets/*"
16+
]
17+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
4+
/**
5+
* A handle to an opened Vortex file, exposing metadata to JavaScript.
6+
*/
7+
export class VortexFileHandle {
8+
private constructor();
9+
free(): void;
10+
[Symbol.dispose](): void;
11+
/**
12+
* The top-level DType of the file as a string.
13+
*/
14+
readonly dtype: string;
15+
/**
16+
* The total number of rows in the file.
17+
*/
18+
readonly row_count: bigint;
19+
}
20+
21+
/**
22+
* Initialize the WASM module (sets up panic hook for better error messages).
23+
*/
24+
export function init(): void;
25+
26+
/**
27+
* Open a Vortex file from raw bytes and return a handle for exploration.
28+
*
29+
* Call this from JavaScript after reading a `.vortex` file via drag-and-drop.
30+
*/
31+
export function open_vortex_file(data: Uint8Array): VortexFileHandle;
32+
33+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
34+
35+
export interface InitOutput {
36+
readonly memory: WebAssembly.Memory;
37+
readonly init: () => void;
38+
readonly open_vortex_file: (a: number, b: number) => [number, number, number];
39+
readonly __wbg_vortexfilehandle_free: (a: number, b: number) => void;
40+
readonly vortexfilehandle_row_count: (a: number) => bigint;
41+
readonly vortexfilehandle_dtype: (a: number) => [number, number];
42+
readonly wasm_bindgen__closure__destroy__h315b7af3ad8e2911: (a: number, b: number) => void;
43+
readonly wasm_bindgen__convert__closures_____invoke__hd9aaad206556e4f9: (a: number, b: number, c: any) => [number, number];
44+
readonly wasm_bindgen__convert__closures_____invoke__hbcb1741f2446bbd2: (a: number, b: number) => number;
45+
readonly __wbindgen_exn_store: (a: number) => void;
46+
readonly __externref_table_alloc: () => number;
47+
readonly __wbindgen_externrefs: WebAssembly.Table;
48+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
49+
readonly __wbindgen_malloc: (a: number, b: number) => number;
50+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
51+
readonly __externref_table_dealloc: (a: number) => void;
52+
readonly __wbindgen_start: () => void;
53+
}
54+
55+
export type SyncInitInput = BufferSource | WebAssembly.Module;
56+
57+
/**
58+
* Instantiates the given `module`, which can either be bytes or
59+
* a precompiled `WebAssembly.Module`.
60+
*
61+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
62+
*
63+
* @returns {InitOutput}
64+
*/
65+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
66+
67+
/**
68+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
69+
* for everything else, calls `WebAssembly.instantiate` directly.
70+
*
71+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
72+
*
73+
* @returns {Promise<InitOutput>}
74+
*/
75+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export const memory: WebAssembly.Memory;
4+
export const init: () => void;
5+
export const open_vortex_file: (a: number, b: number) => [number, number, number];
6+
export const __wbg_vortexfilehandle_free: (a: number, b: number) => void;
7+
export const vortexfilehandle_row_count: (a: number) => bigint;
8+
export const vortexfilehandle_dtype: (a: number) => [number, number];
9+
export const wasm_bindgen__closure__destroy__h315b7af3ad8e2911: (a: number, b: number) => void;
10+
export const wasm_bindgen__convert__closures_____invoke__hd9aaad206556e4f9: (a: number, b: number, c: any) => [number, number];
11+
export const wasm_bindgen__convert__closures_____invoke__hbcb1741f2446bbd2: (a: number, b: number) => number;
12+
export const __wbindgen_exn_store: (a: number) => void;
13+
export const __externref_table_alloc: () => number;
14+
export const __wbindgen_externrefs: WebAssembly.Table;
15+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
16+
export const __wbindgen_malloc: (a: number, b: number) => number;
17+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
18+
export const __externref_table_dealloc: (a: number) => void;
19+
export const __wbindgen_start: () => void;

0 commit comments

Comments
 (0)