Skip to content

[Autoloop: build-tsb-pandas-typescript-migration] - #248

Merged
mrjf merged 4 commits into
mainfrom
autoloop/build-tsb-pandas-typescript-migration
May 1, 2026
Merged

[Autoloop: build-tsb-pandas-typescript-migration]#248
mrjf merged 4 commits into
mainfrom
autoloop/build-tsb-pandas-typescript-migration

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Summary

Program goal: Build tsb — a complete TypeScript port of pandas, one feature at a time.

Current best metric: 137 pandas_features_ported (↑ from 136)

Program issue: #1


Iteration 296 — hashPandasObject

Added hashPandasObject(obj, options?) — mirrors pandas.util.hash_pandas_object.

  • src/stats/hash_pandas_object.ts — FNV-1a 64-bit hashing for Series and DataFrame.
    • Series: one hash per element (optionally including the index label)
    • DataFrame: one hash per row (all columns concatenated, optionally with index)
    • index option (default true) controls whether the index label is mixed into the hash
  • tests/stats/hash_pandas_object.test.ts — 20+ unit + property-based tests
  • playground/hash_pandas_object.html — interactive tutorial page
  • Exported from src/stats/index.ts and src/index.ts

Metric: 137 (was 136, +1)

Generated by Autoloop · ● 5.4M ·

@mrjf
mrjf marked this pull request as ready for review April 30, 2026 05:44
@mrjf

mrjf commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@copilot fix tests

…s_object

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Commit pushed: c6462da

Generated by Evergreen — PR Health Keeper

@github-actions

Copy link
Copy Markdown
Contributor Author

Evergreen fix applied

Fixed TypeScript error in src/stats/hash_pandas_object.ts:

  • dtype: "float64" (string literal) → dtype: Dtype.float64 (proper Dtype instance)
  • Added missing import { Dtype } from "../core/dtype.ts"

This resolves TS2322: Type 'string' is not assignable to type 'Dtype' at lines 186 and 208.

Generated by Evergreen — PR Health Keeper · ● 1M ·

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@copilot fix tests

The tests were failing because dependencies weren't installed (fast-check was missing). Running bun install resolved it — all 24 tests in hash_pandas_object.test.ts and all 5636 tests in the full suite now pass.

…pe, format

- Use local variable 'h' instead of reassigning 'hash' parameter in fnvString and fnvScalar
- Replace non-null assertion bytes[i]! with null-coalescing bytes[i] ?? 0
- Auto-fix: sort imports, make DataFrame import type-only, format test file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Commit pushed: 5e55e96

Generated by Evergreen — PR Health Keeper

@github-actions

Copy link
Copy Markdown
Contributor Author

🟢 Evergreen: CI fix applied

Fixed 12 lint errors in src/stats/hash_pandas_object.ts and tests/stats/hash_pandas_object.test.ts:

  • noParameterAssign (7 errors): Used local variable h instead of reassigning the hash function parameter in fnvString and fnvScalar
  • noNonNullAssertion: Replaced bytes[i]! with bytes[i] ?? 0
  • useImportType: DataFrame is only used as a type (overload signatures), made it import type
  • organizeImports + format: Auto-fixed by Biome

Commit: 77ac4877aebe133f482b9a3d0e72945aef9c337f

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by Evergreen — PR Health Keeper · ● 1.6M ·

…ground standards

Rewrite the static documentation page as a fully interactive playground
matching the structure required by the conformance tests in
tests/playground.test.ts:
- Add #playground-loading overlay
- Add dark-theme CSS variables (--bg, --accent, etc.)
- Add .playground-block containers with .playground-editor, .playground-run
  button, and .playground-output elements
- Load playground-runtime.js as ES module

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Commit pushed: 7193c02

Generated by Evergreen — PR Health Keeper

@github-actions

Copy link
Copy Markdown
Contributor Author

Evergreen fix: Rewrote playground/hash_pandas_object.html to conform to the interactive playground standards.

Root cause: The page was a static HTML documentation page lacking the required interactive playground structure that tests/playground.test.ts (from main) validates on all PR merges.

Fix: Converted the static page to a full interactive playground with:

  • #playground-loading overlay
  • Dark-theme CSS variables (--bg, --accent, etc.)
  • Multiple .playground-block sections with .playground-editor, .playground-run button, and .playground-output elements
  • playground-runtime.js ES module script tag

All 7 failing conformance checks should now pass.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by Evergreen — PR Health Keeper · ● 4.3M ·

@mrjf
mrjf merged commit fac2c68 into main May 1, 2026
4 checks passed
@mrjf
mrjf deleted the autoloop/build-tsb-pandas-typescript-migration branch May 1, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants