Skip to content

build(deps): support genoray 4.x - #347

Merged
d-laub merged 2 commits into
mainfrom
build/genoray-4x
Aug 21, 2026
Merged

build(deps): support genoray 4.x#347
d-laub merged 2 commits into
mainfrom
build/genoray-4x

Conversation

@d-laub

@d-laub d-laub commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Widens the genoray constraint from >=3.4.0,<4 to >=3.4.0,<5 and moves the lock to genoray 4.0.0. 3.x compatibility is retained — the floor is unchanged, so both majors resolve.

Why it's safe

genoray 4.0.0's two breaking changes are on APIs GVL never calls:

  • SparseVar2.from_vcf(tune=) removed — GVL never passed tune=.
  • SparseVar2.from_vcf_list(max_mem=) became a whole-process byte budget rather than a per-chunk cap — GVL does not use from_vcf_list at all.

GVL leans on a lot of genoray private API, so those were checked specifically. Every private symbol GVL imports is unchanged between the 3.4.0 and 4.0.0 tags:

_types.{POS_TYPE,V_IDX_TYPE,DOSAGE_TYPE} · _contigs.ContigNormalizer · _utils.{format_memory,parse_memory} · _svar2_batch.{MAX_END_SHIFT,_find_ranges_chunked} · _svar2_fields.{StoredField,FormatField,InfoField,_META_DTYPE} · _svar.dense2sparse · _svar._convert._dense2sparse_with_length · exprs.ILEN

_svar2_batch.py is byte-identical across the two tags.

genoray 4.0.0 requires seqpro>=0.21.1,<0.23, which the pinned seqpro==0.22.0 satisfies.

Verification (against genoray 4.0.0)

Check Result
pytest tests -q (full tree) 1130 passed, 58 skipped, 4 xfailed
pytest tests -q -m slow 6 passed, 3 skipped
cargo-test 134 + 4 passed
ruff check / ruff format --check clean
typecheck (pyrefly) 0 errors

The first run errored on 3 test_ds_haps_1kg tests, but that was a stale local fixture (untracked, written by gvl 0.35.0 at dataset format v1 vs the current v2) — pre-existing and unrelated to genoray. Regenerated via gen-1kg so the 1kg parity tests actually ran.

Commits

  1. build(deps): support genoray 4.x — the constraint widening in pyproject.toml, pixi.toml, docs/requirements.txt (whose genoray>=2.3.1 floor was long stale), plus the lock move.
  2. build(deps): align the Rust genoray pin with genoray 4.0.0 — optional, see below.

The second commit is separable

The Rust svar2-codec / genoray_core git pin sat at rev 66ba734 (genoray 3.0.0) — it already lagged the Python package before this PR. Commit 2 moves both crates to rev 1bac5f9 (tag 4.0.0) so the Rust reader and Python writer are built from the same genoray revision, closing a skew that could let an svar2 on-disk format change slip past the Python-writer/Rust-reader tests. No GVL source change was needed.

Cost: genoray 4.0.0 declares tracing and tracing-subscriber as unconditional dependencies rather than feature-gating them, so default-features = false doesn't avoid them. This adds 11 transitive crates GVL never uses (tracing*, matchers, sharded-slab, thread_local, nu-ansi-term, lazy_static, valuable). Gating them upstream in genoray would make this pin free.

Drop commit 2 if that build cost isn't worth it — commit 1 passes the full suite on its own.

Notes

  • pixi install rewrote some cosmetic lock formatting (dropped virtual-packages blocks, ./.) from a newer pixi version. It's in commit 1's diff and unrelated to genoray; no package other than genoray changed in the lock.
  • Left alone: pyproject.toml:11 says >= 3.14 blocked by pyarrow/genoray, but genoray 4.0.0 now allows <3.15 and pyarrow is uncapped >=3.10. The <3.14 cap is likely still correct (conda-pinned numba==0.59.1), but confirming that needs a py314 env — separate change.
  • No public API change, so no skills/genvarloader/SKILL.md or api.md update is required; no prose doc asserts a genoray version.

🤖 Generated with Claude Code

d-laub and others added 2 commits August 20, 2026 14:11
Widen the genoray constraint from >=3.4.0,<4 to >=3.4.0,<5 in pyproject.toml,
pixi.toml, and docs/requirements.txt, and move the lock to genoray 4.0.0.

genoray 4.0.0's two breaking changes are on APIs GVL never calls:

- SparseVar2.from_vcf(tune=) removal — GVL never passed tune=.
- SparseVar2.from_vcf_list(max_mem=) becoming a whole-process budget rather
  than a per-chunk cap — GVL does not use from_vcf_list at all.

Every genoray private symbol GVL imports (_types.{POS,V_IDX,DOSAGE}_TYPE,
_contigs.ContigNormalizer, _utils.{format,parse}_memory, _svar2_batch's
MAX_END_SHIFT and _find_ranges_chunked, _svar2_fields.{StoredField,FormatField,
InfoField,_META_DTYPE}, _svar.dense2sparse, _svar._convert._dense2sparse_with_length,
exprs.ILEN) is unchanged between 3.4.0 and 4.0.0; _svar2_batch.py is byte-identical
across the two tags.

The 3.x floor stays: 4.0.0 requires seqpro>=0.21.1,<0.23, which the pinned
seqpro==0.22.0 satisfies, so both majors resolve.

The Rust genoray_core/svar2-codec git pin is deliberately left at rev 66ba734
(genoray 3.0.0) — it already lagged the Python package, and the svar2 tests
exercise the Python-writer/Rust-reader format boundary end to end.

Verified against genoray 4.0.0: 1130 passed / 58 skipped / 4 xfailed (full
tree, after regenerating the stale 1kg fixtures), 6 passed in the slow tier,
134 + 4 cargo tests, ruff check + format clean, pyrefly 0 errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The svar2-codec / genoray_core git pin sat at rev 66ba734 (genoray 3.0.0)
while the Python package moved to 3.4.0 and now 4.0.0. Move both crates to
rev 1bac5f9 (tag 4.0.0) so the Rust reader and the Python writer are built
from the same genoray revision, removing a skew that could let an svar2
on-disk format change slip past the Python-writer/Rust-reader tests.

No GVL source change was needed: the genoray_core APIs GVL uses
(query::{ContigReader,FieldView,BatchResultSplit,KeyRef,dense_abs_row,
unpack_vk_src,pack_vk_src}, field::StorageDtype, layout::{ContigPaths,FieldSub},
bits_get_bit) and the svar2_codec encode/decode helpers are unchanged.

Cost: genoray 4.0.0 declares `tracing` and `tracing-subscriber` as
unconditional dependencies rather than feature-gated ones, so this adds 11
transitive crates (tracing*, matchers, sharded-slab, thread_local, nu-ansi-term,
lazy_static, valuable) that GVL never uses. Gating them upstream would let this
pin carry no extra build cost.

Verified: 134 + 4 cargo tests, 1130 passed / 58 skipped / 4 xfailed pytest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@d-laub
d-laub merged commit 7fd55e8 into main Aug 21, 2026
8 checks passed
@d-laub
d-laub deleted the build/genoray-4x branch August 21, 2026 20:10
@bschilder

Copy link
Copy Markdown
Contributor

Rejoice! 👼 🎉

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.

2 participants