Improve Dtype + Series: widened signatures, lint fixes, and removed unsafe casts#14
Merged
Improve Dtype + Series: widened signatures, lint fixes, and removed unsafe casts#14
Conversation
Closed
Add Dtype immutable singleton system (16 pandas dtypes with kind, itemsize, casting rules, and inferFrom), implement Series<T> (1-D labeled array with dtype inference, element access, arithmetic, comparison, boolean masking, statistical aggregation, sorting, and manipulation), plus comprehensive tests. Fix pre-existing noUncheckedIndexedAccess errors in base-index.ts. Run: https://github.com/githubnext/tsessebe/actions/runs/23968306924 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
…nt issues Cherry-pick the Dtype system and Series implementation from the autoloop branch (autoloop/build-tsb-pandas-typescript-migration-bdf4100e5aade1f0). Resolve merge conflicts by keeping main's base-index.ts fixes (wider Label types, no as-casts). Fix new lint warnings: use barrel exports, add default switch clause, extract sort comparator to reduce cognitive complexity. Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/8871403f-f41c-4311-a8fd-19f148d98d2d Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Widen arithmetic methods to accept number | Series<Scalar> instead of T | Series<T>, comparison methods to accept Scalar | Series<Scalar>, and isin to accept readonly Scalar[]. This avoids literal type narrowing issues that previously required as-never casts in tests. Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/8871403f-f41c-4311-a8fd-19f148d98d2d Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix autoloop patch application failure
Apply Autoloop Iteration 3: Dtype system + Series implementation
Apr 4, 2026
Contributor
|
@copilot was this already merged? if not resolve conflicts |
# Conflicts: # src/core/dtype.ts # src/core/series.ts # src/index.ts # tests/core/dtype.test.ts # tests/core/series.test.ts Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Contributor
Author
PR #15 already merged the Dtype + Series to main. I've now merged |
Copilot
AI
changed the title
Apply Autoloop Iteration 3: Dtype system + Series implementation
Improve Dtype + Series: widened signatures, lint fixes, and removed unsafe casts
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Dtype + Series code from Autoloop Iteration 3 was already merged to main via PR #15. This PR adds improvements on top of that merge.
Lint/type fixes
src/core/index.ts) to satisfyuseImportRestrictionsdefaultclause toDtype.build()switchcompareScalars()helper to bringsortValuesunder cognitive complexity limitisinsignatures fromT | Series<T>tonumber | Series<Scalar>/Scalar | Series<Scalar>, eliminating allas nevercasts in tests:Conflict resolution
origin/maininto branch to resolve conflicts, keeping our improved versions