Skip to content

fix(vcf): return (filter, pl_filter) tuple from VCF.filter getter#54

Merged
d-laub merged 1 commit into
mainfrom
fix/vcf-filter
Jun 6, 2026
Merged

fix(vcf): return (filter, pl_filter) tuple from VCF.filter getter#54
d-laub merged 1 commit into
mainfrom
fix/vcf-filter

Conversation

@d-laub
Copy link
Copy Markdown
Owner

@d-laub d-laub commented Jun 5, 2026

Summary

VCF.filter's getter returned only the cyvcf2 callable while the setter accepted a (filter, pl_filter) tuple, so vcf.filter = vcf.filter did not round-trip. The getter now returns both as a tuple ((None, None) when unset), mirroring the setter.

Changes

  • genoray/_vcf.py — getter returns (filter, pl_filter).
  • tests/test_vcf.py — assertions updated to the tuple shape + a round-trip check.
  • skills/genoray-api/SKILL.md — getter description updated (public API change).

Breaking note

The getter no longer returns a bare callable, so external code doing if vcf.filter: or vcf.filter(variant) would break. Nothing in the repo besides the one test relied on the old shape.

🤖 Generated with Claude Code

The getter returned only the cyvcf2 callable while the setter accepted a
(filter, pl_filter) tuple, so vcf.filter = vcf.filter did not round-trip.
Return both as a tuple ((None, None) when unset) to mirror the setter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@d-laub d-laub merged commit e527bb9 into main Jun 6, 2026
7 checks passed
@d-laub d-laub deleted the fix/vcf-filter branch June 6, 2026 09:58
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