[Autoloop: build-tsb-pandas-typescript-migration] - #513
github-actions[bot] wants to merge 7 commits into
Conversation
…mestamp) Mirrors pandas.DatetimeIndex.to_period(), pandas.PeriodIndex.to_timestamp(), and pandas.Period.to_timestamp(). Adds: - to_period(idx, freq): DatetimeIndex -> PeriodIndex - PeriodIndex.to_timestamp(how): PeriodIndex -> DatetimeIndex - Period.to_timestamp(how): Period -> Date Differential tests compare against pandas 2.2.3 reference values (labels, dtype/freq, empty-index edge case) plus a round-trip property test. Adds a playground section demonstrating the conversions. Run: https://github.com/githubnext/tsb/actions/runs/35294423502 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Iteration 508 accepted
Accepted and recorded in the state file (
|
Adds atTimeSeries, atTimeDataFrame, betweenTimeSeries, and
betweenTimeDataFrame, mirroring pandas.Series.at_time /
pandas.Series.between_time and their DataFrame equivalents. Supports
exact time-of-day matching, inclusive/left/right/neither window
bounds, and overnight wraparound windows (e.g. 18:00-03:00), matching
pandas semantics. Throws TypeError("Index must be DatetimeIndex") on
non-datetime indexes, matching pandas' error text.
Verified against pandas 2.2.3 reference values for at_time, all four
inclusive modes of between_time, and the wraparound case. Includes a
property-based test asserting every returned row's time-of-day
satisfies the window predicate. Added a playground page
(at_time.html) and linked it from the roadmap index.
Run: https://github.com/githubnext/tsb/actions/runs/35347254872
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The at_time.html playground page's Python reference code blocks (cells 1, 3, 5, 7) were never added to tests-e2e/known-failures.json, causing the Playground E2E CI job to fail. Following the same convention as between.html and at_iat.html (whose Python-syntax reference cells are expected to fail the TypeScript transpile/execute check), allowlist these four cells for at_time.html. Run: https://github.com/githubnext/tsb/actions/runs/35382819279 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Iteration 509 accepted — verified via authenticated MCP reads.
|
Implements pandas.Series.asfreq / pandas.DataFrame.asfreq: reindex a datetime-indexed Series or DataFrame onto a regular date_range grid at a new frequency. Supports method (ffill/bfill/nearest) and fillValue for gaps introduced by upsampling, and normalize to reset timestamps to midnight. Downsampling drops rows that don't land on the new grid, matching pandas semantics exactly (verified against pandas 2.2.3). - New src/stats/asfreq.ts: asfreqSeries, asfreqDataFrame - tests/stats/asfreq.test.ts: differential tests against pandas 2.2.3 reference values plus property-based grid-alignment tests - New playground page playground/asfreq.html, linked from index.html - tests-e2e/known-failures.json: allowlist the page's Python-reference cells (not executable in the sandboxed TS runtime), following the at_time.html convention Metric: pandas_features_ported 211 -> 212 (new file src/stats/asfreq.ts). Verification: tsc --noEmit clean; bun test 9382/9384 pass (2 failures are the pre-existing sandbox-only missing-Chromium Playwright issue, unrelated to this change); all 4 new TS playground cells manually executed via `bun run` and confirmed to match pandas 2.2.3 reference output (Playwright/Chromium unavailable in this sandbox). 🤖 Generated by Autoloop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Autoloop status update — iteration 510 still pending CI (blocked, not this agent's fault) Re-checked reconciliation for the pending
This agent cannot approve or re-dispatch a workflow run and has no repair to make (there is no failure to fix — the run simply hasn't executed). A maintainer needs to manually approve/re-run the workflow at commit No new work was started this run to avoid stacking another candidate on top of an unresolved pending one. State file updated with this finding;
|
Iteration 508: Add Period/PeriodIndex ⇄ DatetimeIndex conversions
Pandas feature:
pandas.DatetimeIndex.to_period(),pandas.PeriodIndex.to_timestamp(),pandas.Period.to_timestamp()Adds bidirectional conversion between fixed-frequency
Period/PeriodIndexand calendar-basedDatetimeIndex:to_period(idx, freq)— maps each date in aDatetimeIndexto thePeriodthat contains it (pandas.DatetimeIndex.to_period(freq))PeriodIndex.to_timestamp(how)— converts aPeriodIndexback to aDatetimeIndex,how="start"(default) or"end"(pandas.PeriodIndex.to_timestamp())Period.to_timestamp(how)— single-period equivalent (pandas.Period.to_timestamp())Verification
tests/core/period.test.tscompare against pandas 2.2.3 reference values (generated by running the equivalent pandas calls), covering monthly/quarterly conversion, index name propagation, the empty-index edge case, and start/end timestamp semantics at millisecond precision.fast-check) verifiesto_period(to_timestamp(idx))recovers the original periods acrossM/Q/A/Dfrequencies.bun run typecheckpasses with no errors.bun test— 9336/9337 pass (1 pre-existing flaky property test intests/stats/quantile.test.ts, unrelated to this change and confirmed passing in isolation).playground/period.htmldemonstrating the conversions.Metric
pandas_features_ported(exported.tsfiles undersrc/, excludingindex.ts/.d.ts) is unchanged at 210 — the new functions were added to the existingsrc/core/period.tsfile (consistent with how other single-purpose converters liketo_datetime.ts/to_numeric.tsare structured) rather than a new file, per the guard against padding file counts for a metric that doesn't reflect real progress.Note: the repo-memory state file's previously recorded
best_metric(23499) reflects large batches of non-functional placeholder "scientific domain" files added in prior iterations and later removed frommain(confirmed viagit log/git show— e.g. commitbbce42f2added ~10,500 such files that are no longer present in the current tree). The verified, current baseline onmainis 210.🤖 Generated by Autoloop.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com