[Autoloop: build-tsb-pandas-typescript-migration]#323
[Autoloop: build-tsb-pandas-typescript-migration]#323github-actions[bot] wants to merge 72 commits into
Conversation
…readXml() and toXml() — pd.read_xml() / DataFrame.to_xml() port Zero-dep XML tokenizer supporting attributes, child elements, CDATA, entities, namespace prefix stripping, naValues, usecols, nrows, indexCol. toXml: rootName, rowName, attribs, xmlDeclaration, namespaces, indent, cdataCols. Entity encoding/decoding, full round-trip support. 50+ tests + property tests. Playground page with 9 interactive examples. Run: https://github.com/githubnext/tsb/actions/runs/25970646245 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…readTable() — pd.read_table() port Add `readTable()` function that mirrors `pandas.read_table()`: - Thin wrapper around `readCsv` defaulting sep to '\t' (tab) - Distinct from readCsv (different default separator) - Full ReadCsvOptions forwarding: indexCol, nRows, skipRows, dtype, naValues - 40+ unit tests covering all options, edge cases, and property-based round-trips - Interactive playground page with 9 examples Run: https://github.com/githubnext/tsb/actions/runs/25992061510 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…caseWhen() — pd.Series.case_when() port Implements pandas.Series.case_when(caselist) (pandas 2.2+) as a standalone caseWhen() function. Applies an ordered list of (condition, replacement) pairs — first matching condition wins, unmatched rows keep original value. - src/stats/case_when.ts: full implementation with ResolvedBranch pre-extraction - Conditions: boolean Series, boolean array, or predicate (value, idx) => boolean - Replacements: scalar, Series, or array - 316 lines of tests (unit + property-based with fast-check) - 9-example playground page - Exported from src/stats/index.ts and src/index.ts Run: https://github.com/githubnext/tsb/actions/runs/26021661493 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Warning The Evergreen update 🌿 Two pushes made to fix this PR:
The
|
|
Warning The Evergreen CI FixPush 1 — Rebase onto Push 2 — TypeScript fixes for the
Playground E2E: The failure was a Playwright 30s timeout (
|
|
Warning The Evergreen fixStep 1 — Rebase onto Step 2 — Fixed TypeScript errors (from the failing
The
|
|
Warning The Evergreen — CI fix applied 🔧Push 1 — Rebase onto Push 2 — TypeScript fixes: The previous CI run had 5 type errors that needed fixing:
The Playground E2E failure in the previous run was a 30 s
|
|
Warning The Evergreen CI Fix 🌿Push 1 — Rebase onto Push 2 — TypeScript fix: Fixed the following typecheck errors that were blocking CI:
The Playground E2E timeout seen in the previous run appears to be infrastructure flakiness (30s Autoloop program un-pausing is pending CI results on the new HEAD.
|
|
Warning The Evergreen fix applied 🌲Push 1 — Rebase onto Push 2 — TypeScript CI fix: Fixed the following typecheck errors:
The Playground E2E failure appears to be a flaky timeout unrelated to these changes — it should resolve after the rebase lands on a fresh CI run.
|
|
Warning The Evergreen FixPush 1 — Rebase onto main (11 commits): Cleanly rebased the branch onto Push 2 — TypeScript typecheck fixes: The
The Playground E2E timeout was likely downstream of the typecheck failure causing runtime import errors.
|
|
Warning The Evergreen 🌲 — Rebase onto The PR branch was 11 commits behind CI checks were previously failing — the rebase may resolve those (often caused by drift). If checks are still failing on the new HEAD, Evergreen will investigate in a follow-up run.
|
|
Warning The Evergreen fix applied 🌿 Rebased onto Changes:
The Playwright E2E timeout appears to be a flaky environment issue — the typecheck/test failure was the root cause of the CI failure. CI should now pass.
|
|
Warning The Evergreen: CI Fix Applied ✅Push 1 — Rebase onto Push 2 — TypeScript fixes for failing
|
|
Warning The Evergreen fix — 2026-05-28Push 1 — Rebase onto Push 2 — Fix TypeScript errors: Fixed 5 TypeScript errors caught by the
The Playground E2E failure (timeout waiting for page) is a flaky infra issue unrelated to code changes — it should pass on retry after the rebase brings in latest
|
|
Warning The Evergreen rebased this branch onto If checks are still failing after this rebase, Evergreen will investigate on the next run.
|
|
Warning The Evergreen Fix ReportPush 1 — Rebase onto Push 2 — TypeScript type fixes: Fixed 5 type errors from the failing
The Playground E2E timeout failure is a flaky runtime test (30 s browser timeout), not caused by these code changes — it should resolve on the next CI run.
|
|
Warning The Evergreen: PR health fixPush 1 — Rebase onto Push 2 — Fix failing TypeScript checks: Fixed the following
The Playground E2E timeout was a transient infrastructure issue (30s waitForFunction timeout) — not a code bug. It should pass on re-run.
|
|
Warning The Evergreen Fix ReportPush 1 — Rebase onto Push 2 — TypeScript CI fix
The
|
|
Warning The Evergreen 🌲 — Rebased onto The PR branch was 11 commits behind
|
|
Warning The Evergreen: PR health fix 🌿This PR was 11 commits behind Push 1 — Rebase onto Push 2 — Fix TypeScript errors
The Playground E2E failure appears to be a timeout waiting for page initialization — an infrastructure/flaky test issue unrelated to these code changes.
|
|
Warning The Evergreen: PR Fixed 🌱Push 1 — Rebase onto main: Rebased the branch onto Push 2 — TypeScript fix: Fixed 5 type errors that were failing the
The Playground E2E timeout appears to be an intermittent infrastructure issue (30s timeout waiting for page load) unrelated to the code changes.
|
…toExcel (XLSX writer) Implement toExcel() to serialize a DataFrame to XLSX binary format. Mirrors pandas.DataFrame.to_excel(). - Pure-TS CRC32 + ZIP writer with DEFLATE via node:zlib - Full OOXML (XLSX) structure: 7 XML parts (content types, rels, workbook, worksheet, SST, styles) - All scalar types: string, number, bigint, boolean, null, Date, TimedeltaLike - Options: sheetName, index, header, naRep, columns, startRow, startCol - Shared string table (SST) deduplication - Comprehensive tests with round-trip via readExcel + property-based tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pure-TypeScript Arrow IPC file format reader and writer with no native dependencies. Implements Apache Arrow Feather v2 using a FlatBuffer backward builder. Supported types: - Writing: Int64 (all integer dtypes), Float32/64, Bool, Utf8 - Reading: Int8/16/32/64, UInt8/16/32/64, Float32/64, Bool, Utf8/LargeUtf8 Null values are supported via Arrow validity bitmaps. Columns with no nulls emit a zero-length validity buffer (no bitmap allocation). Key implementation details: - FbBuilder: backward builder with align/grow/finish, uoffset/soffset correctly computed as relative distances - FbTable: reads vtable field offsets, navigates offset vectors and inline struct vectors (FieldNode, Buffer, Block) - Arrow IPC frame: continuation(0xFFFFFFFF) + paddedMetaSize + FlatBuffer + body (8-byte aligned buffers) - Footer: FlatBuffer with Schema + Block vector, followed by int32 size and ARROW1 trailing magic - Options: usecols (subset of columns), indexCol (row index from column), writeIndex (emit index as __index_level_0__) Equivalent to pandas.read_feather() / DataFrame.to_feather(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…readHdf/toHdf (HDF5 v0 I/O) Implements pure-TypeScript HDF5 v0 Superblock format I/O: - readHdf(data, options?): parse HDF5 binary buffer into DataFrame - toHdf(df, options?): serialize DataFrame to HDF5 binary buffer Supported column types: Float64/Float32, Int8/16/32/64, UInt8/16/32/64, Bool (uint8), String (fixed-length null-padded UTF-8) Options: key, usecols, indexCol, writeIndex Run: https://github.com/githubnext/tsb/actions/runs/27889914172 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pd.arrays namespace (nullable typed extension arrays) Implements pandas.arrays namespace with 6 nullable typed extension array classes: IntegerArray, FloatingArray, BooleanArray (Kleene 3-valued logic), StringArray, DatetimeArray, TimedeltaArray. Abstract MaskedArray base class provides shared logic (isna/notna, fillna, dropna, iteration). Metric: 160 → 167 (+7 source files) Run: https://github.com/githubnext/tsb/actions/runs/27905740764 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pandas.tseries.holiday — holiday calendar system Add USFederalHolidayCalendar and full holiday calendar infrastructure: - src/tseries/holiday.ts: AbstractHolidayCalendar, Holiday class, observance helpers (nearestWorkday, sundayToMonday, nextMonday, nextMondayOrTuesday, previousFriday, previousWorkday), WeekdayOffset, weekday constructors (MO, TU, WE, TH, FR, SA, SU), get_calendar/register_calendar registry - src/tseries/us_holidays.ts: USFederalHolidayCalendar with 11 US federal holidays; all individual rule constants exported - src/tseries/index.ts: barrel export Mirrors pandas.tseries.holiday. Floating holidays use weekday offset (MO(3) = 3rd Monday, TH(4) = 4th Thursday). Fixed holidays use observance functions to shift weekends to the nearest workday. Run: https://github.com/githubnext/tsb/actions/runs/27924367245 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix useBlockStatements lint errors in nullable array types (pd.arrays) and tseries/holiday observance functions. Also fix useSimplifiedLogicExpression errors in BooleanArray three-valued logic (De Morgan's law). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tseries/offsets, tseries/frequencies, and io/read_sas - src/tseries/offsets.ts: QuarterEnd, QuarterBegin, BMonthEnd, BMonthBegin, BYearEnd, BYearBegin - src/tseries/frequencies.ts: toOffset(), inferFreq(), FREQ_ALIASES map with all pandas aliases - src/io/read_sas.ts: SAS XPORT v5 reader (IBM 370 float conversion, namestr parsing) - tests/tseries/offsets.test.ts: comprehensive tests for all 6 new offset classes - tests/tseries/frequencies.test.ts: tests for toOffset and inferFreq - tests/io/read_sas.test.ts: binary XPORT builder + parser round-trip tests - playground/sas.html: interactive documentation for readSas Metric: 172 (was 171) GitHub Actions run: https://github.com/githubnext/tsb/actions/runs/27940628202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- src/tseries/frequencies.ts: add explicit Map<string, OffsetFactory> type argument to fix TS2769 overload resolution error - playground/fwf.html: fix Python skiprows=2 → skiprows=[1] so the header row is preserved and index_col="id" resolves correctly - src/io/to_excel.ts: remove node:zlib/deflateRawSync (unavailable in browser bundle); use ZIP stored entries (method 0) which are valid XLSX and work in all environments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
🌿 Evergreen CI FixFixed 3 failing checks in commit 1. Type check (
|
…SparseArray + SparseDtype Implements pandas.arrays.SparseArray and pandas.SparseDtype — memory-efficient storage for arrays where most values share a common fill value (NaN or 0). SparseArray stores only non-fill values and their indices (COO format). Key properties: sp_values, sp_index, density, npoints, fill_value, dtype. Key methods: at(), toDense(), toCoo(), fillna(), withFillValue(), slice(), add(), mul(), sum(), mean(), max(), min(), std(). Static factories: fromDense(), fromSparse(). Includes comprehensive unit and property-based tests (fast-check). Adds interactive playground page: playground/sparse.html. Updates playground/index.html and both barrel exports. Metric: 172 → 173 (pandas_features_ported) Run: https://github.com/githubnext/tsb/actions/runs/27979943852 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- tests/core/sparse.test.ts: narrow toDense()[i] to number via guard to fix TS2769 (number | undefined not assignable to number in toBe) - playground/sparse.html: replace broken module import of playground-runtime with proper window.__tsb access; add four interactive .playground-block cells (Quick Start + 3 use cases) with .playground-run buttons; load playground-runtime.js as <script type="module" src="..."> so the E2E test can find and enable the Run buttons Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
🤖 Evergreen FixI found and fixed two CI failures in commit 1. TypeScript type error (
|
Summary
Iteration 316: Add
readXml()andtoXml()— port ofpandas.read_xml()/DataFrame.to_xml().What's new
src/io/xml.ts— zero-dependency XML I/O module:readXml(text, options?): parses XML into a DataFramens:col→col)&,<,A,A, ...)rowTag,indexCol,usecols,naValues,converters,nrows,attribs,elemstoXml(df, options?): serializes DataFrame to well-formed XMLattribs: true)rootName,rowName,attribs,xmlDeclaration,namespaces,indent,cdataColstests/io/xml.test.ts— 50+ tests: unit, property-based (fast-check), round-tripplayground/xml.html— 9 interactive playground examplesUpdated
src/io/index.ts,src/index.ts,playground/index.htmlMetric
pandas_features_ported: 148 → 149 (+1)Program
Related to issue #1.
🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.