Skip to content

Fix pandas 3.1 readers and require stride-aware ruranges - #210

Merged
endrebak merged 3 commits into
masterfrom
fix/pandas-3.1-doctests
Oct 26, 2026
Merged

endrebak merged 3 commits into
masterfrom
fix/pandas-3.1-doctests

Conversation

@endrebak

@endrebak endrebak commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Preserve chromosome names as text when pandas 3.1 reads BED, GFF3, peak and signal files: requesting categorical dtypes directly can infer integers and merge distinct names such as "01" and "1". Categorize after parsing, retain pandas/Arrow parity, and scope the no-pyarrow fixture to PyRanges1 imports so it does not invalidate pandas' cached optional-dependency state.

Require ruranges >= 0.2.8 for contiguous normalization at the Rust boundary and gtfreader >= 0.3.1 for the equivalent GTF reader fix. Add 13 strided-column integration cases with coordinates beyond int32 and make the column-display doctests insensitive to whitespace. Bumps PyRanges1 to 1.5.1.

Prerequisites: merge and publish these backend fixes before merging/releasing this dependency update:

Validation with Python 3.12 / pandas 3.1.0 and rebuilt backend wheels:

  • Ruff formatting and lint checks pass.
  • ty 0.0.87 check passes.
  • pytest --doctest-modules pyranges1/ tests/unit/: 969 passed, 9 skipped.
  • Additional BED/GFF3/narrowPeak/bedGraph checks preserve distinct "1" and "01" chromosome names on the applicable pandas/Arrow paths.

PR CI builds wheels from pinned companion backend commits and supplies them to tox through PIP_FIND_LINKS, allowing validation before PyPI publication. Local full tox py312 run passes, including tutorials, package doctests, 860 unit tests, typing and Ruff.

@endrebak
endrebak merged commit f910211 into master Oct 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant