Skip to content

Preserve mapping attribution and run NumPy correctness checks in CI - #45

Merged
endrebak merged 1 commit into
masterfrom
codex/mapping-correctness-ci
Oct 27, 2026
Merged

endrebak merged 1 commit into
masterfrom
codex/mapping-correctness-ci

Conversation

@endrebak

Copy link
Copy Markdown
Collaborator

Make transcript projection safe to call with original row order, expose the original annotation row for each fragment, and check public NumPy results on every PR. This follows the argument-order correction in #43.

Require ruranges-core 0.1.16 for numeric sorting and two-sided exon clipping. map_to_global(..., return_exon_indices=True) adds an optional fifth output, while the default remains four arrays. This lets PyRanges1 reconstruct metadata and original fragment order without rediscovering exon matches or sorting numeric intervals in Python. Bump the Python package and Rust binding crate together to 0.2.9.

Replace the symmetric strided-array mapping smoke test with unequal query/exon tables and explicit coordinate, strand, and query-attribution assertions. Cover shuffled query/exon inputs, original exon indices, both output-order modes, integer widths, and queries before or across exon boundaries. CI installs the built package and runs tests/ outside the source checkout on Python 3.12, 3.13 and 3.14; publishing also requires this correctness job.

Validation:

  • A release ABI3 wheel built against the local 0.1.16 core passes all 73 tests on Python 3.12/3.13/3.14 with NumPy 2.5.4, plus Python 3.12 with NumPy 1.26.4. The checks run outside the checkout against the installed wheel.
  • maturin develop --release, cargo test --offline, and git diff --check pass. The changed Rust binding is rustfmt-clean. Repository-wide rustfmt/strict Clippy still report existing generated-signature formatting and crate-wide lint diagnostics; unrelated files are unchanged.
  • The dependent PyRanges1 Rust mapping passes 860 existing unit tests, 111 doctests, Ruff, and ty, with exact pandas comparisons of coordinate/strand results, indices, original order, metadata and dtypes.

Dependency: this draft requires ruranges-core#15 to be merged and ruranges-core 0.1.16 published before registry-based CI can build it. Local validation used an uncommitted Cargo path patch; no local paths or development checks outside the requested NumPy regression tests are included in the PR.

@endrebak
endrebak marked this pull request as ready for review October 27, 2026 10:10
@endrebak
endrebak merged commit 6d7de90 into master Oct 27, 2026
20 of 38 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