Skip to content

Commit ea02276

Browse files
jgallowa07claude
andcommitted
Fix partis imports to use installed package instead of submodule
Updated parse_cluster.py and write_lh_annotations.py to import from the partis-bcr PyPI package (installed via requirements.txt) instead of the deprecated lib/partis submodule path. Changes: - Removed manual sys.path manipulation for lib/partis - Changed imports from python.utils to partis.utils - Changed imports from python.glutils to partis.glutils - Changed imports from python.clusterpath to partis.clusterpath 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 5bdf960 commit ea02276

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

scripts/parse_cluster.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
import colored_traceback.always
1515
from util_functions import write_to_fasta
1616

17-
default_partis_path = os.path.join(os.getcwd(), "lib/partis")
18-
sys.path.append(default_partis_path)
19-
import python.utils as utils
20-
import python.glutils as glutils
21-
from python.clusterpath import ClusterPath
17+
import partis.utils as utils
18+
import partis.glutils as glutils
19+
from partis.clusterpath import ClusterPath
2220

2321

2422
def show_available_clusters(cpath, ipartition, ptn):

scripts/write_lh_annotations.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
23
from __future__ import absolute_import
34
import math
45
import copy
@@ -8,9 +9,7 @@
89
import sys
910
from io import open
1011
from six.moves import zip
11-
default_partis_path = os.path.join(os.getcwd(), 'lib/partis')
12-
sys.path.append(default_partis_path)
13-
import python.utils as utils
12+
import partis.utils as utils
1413

1514
# reads sampled trees/annotation pairs, collapses duplicate annotations while keeping tracking of all the trees that contributed, then writes all [best] unique annotations to linearham_run_all[best].yaml
1615
# This does not add the inferred ancestral sequences to the annotations (atm this is done in partis/test/linearham-run.py, although maybe it'd make sense to do it here)

0 commit comments

Comments
 (0)