Skip to content

Commit 20c1e8e

Browse files
authored
MAINT: Update tests to ensure deprecated functions are unused (#302)
* MAINT: Use new support and remove discontinued functions * MAINT: Bumpy minimum cogent3 version
1 parent 01212dc commit 20c1e8e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/quickstart/construct_ml_tree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ log_likelihood = tree.params["lnL"]
2222
### Ultrafast Bootstrap
2323

2424
To perform ultrafast bootstrapping, the number of replicates can be specified. The number of replicates must be at least 1000.
25-
The support for each node in the tree object can be accessed from `#!py3 node.params["support"]`.
25+
The support for each node in the tree object can be accessed from `#!py3 node.support`.
2626

2727
```python
2828
from cogent3 import load_aligned_seqs

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "piqtree"
7-
dependencies = ["cogent3>=2025.7.10a1", "pyyaml", "requests"]
7+
dependencies = ["cogent3>=2025.7.10a8", "pyyaml", "requests"]
88
requires-python = ">=3.11, <3.14"
99

1010
authors = [

tests/test_app/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_piq_build_tree_support(four_otu: Alignment) -> None:
1818
app = get_app("piq_build_tree", model=make_model("JC"), bootstrap_reps=1000)
1919
got = app(four_otu)
2020
supports = [
21-
node.params.get("support", None)
21+
node.support
2222
for node in got.postorder()
2323
if not node.is_tip() and node.name != "root"
2424
]

tests/test_iqtree/test_build_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def test_build_tree_bootstrapping(four_otu: Alignment) -> None:
118118
)
119119

120120
supported_node = max(tree.children, key=lambda x: len(x.children))
121-
assert "support" in supported_node.params
121+
assert supported_node.support is not None
122122

123123

124124
@pytest.mark.parametrize(

tests/test_iqtree/test_fit_tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def check_rate_parameters(got: PhyloNode, expected: PhyloNode) -> None:
5454

5555

5656
def check_branch_lengths(got: PhyloNode, expected: PhyloNode) -> None:
57-
got = got.get_distances()
58-
expected = expected.get_distances()
57+
got = got.tip_to_tip_distances()
58+
expected = expected.tip_to_tip_distances()
5959
# make sure the distance matrices have the same name order
6060
# so we can just compare entire numpy arrays
6161
expected = expected.take_dists(got.names)

0 commit comments

Comments
 (0)