Repository navigation
Fix CI: constrain baltic<1 and replace pl.count() with pl.len() - #73
Merged
Merged
Conversation
baltic 1.0 renamed its API: loadNewick is now load_newick, and leaf, node and tree are modules rather than classes. Under baltic 1.0, `import abutils` fails on Python 3.10 (a module inside typing.Union annotations), and Phylogeny.tree fails on every Python version. The existing phylo tests never built the baltic tree, so CI stayed green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recent polars releases raise TypeError for pl.count() without an argument. pl.len() is available in every polars the requirements allow (>=1.6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
abutils master last passed CI in April. Since then, two dependency releases have broken it:
loadNewickbecameload_newick, andleaf,nodeandtreeare now modules instead of classes.import abutilsfails.phylo.py:253putsbt.leafinsideUnion[...], and Python 3.10 rejects a module there. This breaks every downstream package on 3.10, including abstar's CI (Fix V(D)J boundary consistency, unify public output (0.9.0 breaking), add corpus CI abstar#135).Phylogeny.treeraisesAttributeError: module 'baltic' has no attribute 'loadNewick'. The existing phylo tests never built the baltic tree, so CI didn't catch it.TypeErrorforpl.count()without an argument. This breaks_deduplicate_sequencesand pooleddeduplicate(..., keep_read_numbers=True), and failstest_deduplicate_sequenceson every Python version.Fix
baltic<1inrequirements.txt. Porting to the 1.0 API is a separate piece of work.test_phylogeny_tree_loads_newick, which builds the baltic tree from a Newick string and checks its leaves.pl.count().alias("count")calls intools/preprocessing.pywithpl.len().alias("count").pl.len()exists in every polars the requirements allow (>=1.6).Verification
test_phylogeny_tree_loads_newickfails under baltic 1.0.0 with theloadNewickAttributeErrorand passes under baltic 0.3.0.test_deduplicate_sequencesfails with thepl.count()TypeErrorbefore the change and passes after.deduplicatepath (line 1033) has no test, so I checked it by hand against polars 1.44.1: it writes one record per unique sequence.Found but not changed
deduplicatedrops every input file whose path contains"tmp"(if "tmp" not in f). Run on a project under/tmp, it finds no files and fails withcannot concat empty list.|2. This behavior is unchanged by this PR.Shipping this needs a patch release (0.6.1). After that, abstar can drop its temporary
baltic<1constraint.🤖 Generated with Claude Code