Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare version 5.0 release #176

Merged
merged 107 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b0e574a
Restructure tests folder for separate unit and smoke tests
connoryang1 Oct 9, 2023
3ff3592
Create smoke tests for popgenism.py
connoryang1 Oct 22, 2023
f7ad5cc
Add pytest compatability through pytest-runner
connoryang1 Oct 22, 2023
452b782
Add init files in other test folders for Python2 support
connoryang1 Oct 22, 2023
a8d26fd
Merge remote-tracking branch 'playground/smoke_tests'
connoryang1 Oct 24, 2023
eabe210
Create symlink to src/dendropy for both testing directories
connoryang1 Oct 27, 2023
abf12cd
Drop 2.7 and 3.5 support in CI
connoryang1 Oct 27, 2023
d021b63
Create smoke tests for coalescent.py
connoryang1 Oct 27, 2023
2203ef7
Remove line to fix ci
connoryang1 Oct 27, 2023
c0e847b
Edit CI to be compatible with pytest and new file structure
connoryang1 Oct 29, 2023
e3d9d9b
Change python3 to python
connoryang1 Oct 29, 2023
145b7f7
Force pytest 7.0.0
connoryang1 Oct 29, 2023
7efe1ad
Add requirements.txt
connoryang1 Oct 31, 2023
f2c8118
Change cov to tests/unittests
connoryang1 Oct 31, 2023
0be92af
Update requirements.txt to work with python3.6
connoryang1 Oct 31, 2023
1d80241
Remove .eggs
connoryang1 Oct 31, 2023
cb63e78
Add .eggs to .gitignore
connoryang1 Oct 31, 2023
35c3542
Prepare for merge
connoryang1 Oct 31, 2023
79a0cd8
Remove extra comment from test_popgenism.py
connoryang1 Oct 31, 2023
0b0997d
Fix error in test case
connoryang1 Oct 31, 2023
9f012ab
Merge pull request #1 from Nephrain/add-smoke-tests
connoryang1 Nov 1, 2023
3333518
Add more smoke tests
connoryang1 Nov 10, 2023
e1d7cec
Fix some tests and variable names
connoryang1 Nov 11, 2023
c5e7bca
Format
connoryang1 Nov 11, 2023
59f3c03
Add more smoke tests
connoryang1 Nov 14, 2023
1a6d91d
Format
connoryang1 Nov 14, 2023
833efde
Merge pull request #2 from Nephrain/add-smoke-tests
connoryang1 Nov 14, 2023
734deaa
Protect against root node
connoryang1 Nov 14, 2023
27b7ac5
Fix Latex
connoryang1 Nov 14, 2023
c05a84e
Fix copy paste kwarg in docs
connoryang1 Nov 14, 2023
a76faa0
Check if domain_taxa exists
connoryang1 Nov 14, 2023
5a0d4cd
Test node age fix
connoryang1 Nov 14, 2023
24045c8
Update docstring to specify correct type
connoryang1 Nov 17, 2023
dae496f
Fix typo in newick string formatting
connoryang1 Nov 17, 2023
53a6ab8
Fix typo
connoryang1 Nov 17, 2023
64d42de
Delete extra newline
connoryang1 Nov 17, 2023
573a22b
Add NoneType checking to log()
connoryang1 Nov 17, 2023
a664c18
Try simpler session implementation
connoryang1 Nov 17, 2023
ea1a9cc
fixup! Try simpler session implementation
connoryang1 Nov 17, 2023
bec0b7b
Make processio unit test
connoryang1 Nov 17, 2023
bd066bb
Remove tests covered by new unit test
connoryang1 Nov 17, 2023
6e6d0ca
Fix tests and add missing asserts
connoryang1 Nov 17, 2023
23c37ee
Fix tests
connoryang1 Nov 17, 2023
9590f38
Clean up tests, add missing asserts
connoryang1 Nov 17, 2023
7a62e47
Add missing asserts to tests
connoryang1 Nov 17, 2023
74fef87
Change variable names, remove TODO
connoryang1 Nov 17, 2023
65f0648
Fix LaTex
connoryang1 Nov 28, 2023
01ac653
Deprecate factorial
connoryang1 Nov 28, 2023
fb98ea8
Deprecate gcd
connoryang1 Nov 28, 2023
f1bc174
Replace internal use of deprecated functions
connoryang1 Nov 28, 2023
fd89604
Add is_mutable to docstring
connoryang1 Nov 28, 2023
6fac698
Make parameter docstring more specific
connoryang1 Nov 28, 2023
cfdf50f
Deprecate old arguments
connoryang1 Nov 28, 2023
705a85a
Add deprecation warning if neither arguments provided
connoryang1 Nov 28, 2023
12f9c9f
Fix typo
connoryang1 Nov 28, 2023
3528fe7
Update src/dendropy/model/coalescent.py
connoryang1 Dec 1, 2023
348bc86
Update src/dendropy/model/parsimony.py
connoryang1 Dec 1, 2023
bcb6b47
Delete leftover asserts
connoryang1 Dec 1, 2023
7d872d5
Delete dead code
connoryang1 Dec 1, 2023
eb51c8e
Delete redundant smoke test
connoryang1 Dec 1, 2023
0f3db80
Delete leftover debugging code
connoryang1 Dec 1, 2023
84d6c40
Change file variable names
connoryang1 Dec 1, 2023
b56c3d2
Change getter and setters to use decorators
connoryang1 Dec 1, 2023
ebf6455
Add else condition to set contained_trees to an empty TreeList
connoryang1 Dec 1, 2023
f5dee3f
Delete leftover code
connoryang1 Dec 1, 2023
d18ab4a
Merge branch 'add-smoke-tests' of github.com:Nephrain/DendroPy into a…
connoryang1 Dec 1, 2023
9a1f42a
Merge pull request #3 from Nephrain/add-smoke-tests
connoryang1 Dec 1, 2023
7ed0b65
Delete asdf.xyz
connoryang1 Dec 1, 2023
6cba402
Deprecate bibtex.py
connoryang1 Dec 8, 2023
7e6907e
Create default setup.cfg for pytest
connoryang1 Dec 10, 2023
40e55c4
Revise deprecation notice text
mmore500 May 17, 2024
b8fdea9
Merge pull request #4 from Nephrain/remove-bibtex
mmore500 May 17, 2024
02072d3
Merge branch 'main' into release-5.0
mmore500 May 17, 2024
77caf57
Merge branch 'main' into release-5.0
mmore500 May 17, 2024
9a097f5
Remove duplicated kwarg
mmore500 May 18, 2024
2dd07d5
Strip trailing whitespace
mmore500 May 18, 2024
c925f10
Fix Python versions tested/supported
mmore500 May 18, 2024
fb4f357
Deprecate PatristicDistanceMatrix
mmore500 May 18, 2024
3042a6e
Drop special cases for python < 3.4
mmore500 May 18, 2024
85990b9
Drop more special cases for Python <3.4
mmore500 May 18, 2024
a4da42d
Drop special-case StringIO handling for old python
mmore500 May 18, 2024
8af834b
Drop unused imports
mmore500 May 18, 2024
c70a7b2
Drop more Python2 legacy support
mmore500 May 18, 2024
79e20d4
Add smoke test for fast_birth_death_tree
mmore500 May 18, 2024
5fb2d63
Strip trailing whitespace
mmore500 May 18, 2024
783334a
Deprecate unused kwargs
mmore500 May 18, 2024
c606632
fixup! Deprecate unused kwargs
mmore500 May 18, 2024
8fb6a03
Add missing docstrings
mmore500 May 18, 2024
1d1f995
Fix typo in test file name
mmore500 May 18, 2024
0977e95
Fix taxon namespace conflicts
mmore500 May 18, 2024
c33938c
Track seqgen wrapper API change
mmore500 May 18, 2024
b06e049
Workaround bipartition mutability error
mmore500 May 18, 2024
ae6bc5f
Fix minor typos in docstring
mmore500 May 18, 2024
8e4b564
Workaround mutability for bipartition frozenset
mmore500 May 18, 2024
d3a35e4
Fix consensus tree smoke test
mmore500 May 18, 2024
05a65c0
Warn broken examples
mmore500 May 18, 2024
ef2c39c
Warn on MRCA for unrooted tree
mmore500 May 18, 2024
c405985
Don't depend on deprecated distutils strtobool
mmore500 May 18, 2024
c29bd5d
Fix minor typo in docs
mmore500 May 18, 2024
78c17ac
Use full Newick formatter for __str__
mmore500 May 18, 2024
5040273
Drop docstring entries for nonexistant kwargs
mmore500 May 18, 2024
59ba7d1
Fix docstring typo
mmore500 May 18, 2024
74bc901
Merge branch 'main' of https://github.com/jeetsukumaran/DendroPy into…
mmore500 May 19, 2024
ceeba59
fixup! Warn broken examples
mmore500 May 19, 2024
bf87518
Fix test to track new str behavior
mmore500 May 19, 2024
77dc3e7
fixup! Warn broken examples
mmore500 May 19, 2024
5c84b44
Merge branch 'main' into release-5.0
mmore500 May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 9 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ jobs:
fail-fast: False
matrix:
python-version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
Expand All @@ -91,7 +89,7 @@ jobs:
sudo apt-get update
sudo apt-get install python2 libpython2.7 # required by paup
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f .github/workflows/requirements.txt ]; then pip install -r .github/workflows/requirements.txt; fi
- name: Install paup
run: |
temp_dir=$(mktemp -d)
Expand All @@ -100,26 +98,19 @@ jobs:
chmod +x ${temp_dir}/paup4a168_ubuntu64
sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
- name: Python2 compatibility workaround # TODO remove when Python2 compatibility dropped
if: matrix.python-version == '2.7'
- name: Unit tests with setup.py
run: |
rm tests/dendropy
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo python2
python2 -m pip install setuptools --upgrade
python2 setup.py test
- name: Test with setup.py
if: matrix.python-version != '2.7'
python setup.py pytest --addopts '-m "not smoke"'
- name: Smoke tests with setup.py
run: |
python setup.py test
python setup.py pytest --addopts "-m smoke"

entrypoints:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: False
matrix:
python-version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
Expand Down Expand Up @@ -187,7 +178,7 @@ jobs:
python3 -m pip install pytest-cov
- name: Generate coverage report
run: |
python3 -m pytest tests --cov=tests/dendropy --cov-report=xml
python3 -m pytest tests/unittests --cov=tests --cov-report=xml
- uses: codecov/codecov-action@v4
with:
token: ae13d715-bae4-4e6d-9dce-f47e7d7c7c01
Expand Down Expand Up @@ -267,7 +258,7 @@ jobs:
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html # The folder the action should deploy.
path: docs/build/html # The folder the action should deploy.
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# folder: docs/build/html # The folder the action should deploy.
Expand All @@ -282,7 +273,7 @@ jobs:
# build_directory: docs/build/html
deploy-docs:
if: github.ref == 'refs/heads/main'

# Add a dependency to the build job
needs: docs

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pytest==7.0.1
iniconfig==1.1.1
pluggy==1.0.0
packaging==21.3
tomli==1.2.3
importlib-metadata==4.8.3
typing-extensions==4.1.1
zipp==3.6.0
17 changes: 17 additions & 0 deletions .github/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
#
attrs==22.2.0 # via pytest
importlib-metadata==4.8.3
iniconfig==1.1.1
packaging==21.3
pluggy==1.0.0
py==1.11.0 # via pytest
pyparsing==3.1.1 # via packaging
pytest==7.0.1
tomli==1.2.3
typing-extensions==4.1.1
zipp==3.6.0
1 change: 1 addition & 0 deletions .github/workflows/requirements37.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
26 changes: 26 additions & 0 deletions .github/workflows/requirements37.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile requirements.in
#
exceptiongroup==1.1.3
# via pytest
importlib-metadata==6.7.0
# via
# pluggy
# pytest
iniconfig==2.0.0
# via pytest
packaging==23.2
# via pytest
pluggy==1.2.0
# via pytest
pytest==7.4.3
# via -r requirements.in
tomli==2.0.1
# via pytest
typing-extensions==4.7.1
# via importlib-metadata
zipp==3.15.0
# via importlib-metadata
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dist/*
setup.cfg
setuptools-*.egg
__pycache__
.eggs

# PyCharm
**/.idea
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/bdtree_multi1.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# /usr/bin/env python

import random
import warnings
import dendropy
from dendropy.simulate import treesim

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

def generate(birth_rates, death_rates):
assert len(birth_rates) == len(death_rates)
tree = dendropy.Tree()
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/bdtree_multi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
# -*- coding: utf-8 -*-

import random
import warnings
import dendropy
from dendropy.simulate import treesim

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

def generate(mean, sd, num_periods):
tree = dendropy.Tree()
for i in range(num_periods):
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/bibtex_annotations1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

citation = """\
@article{HeathHH2012,
Author = {Tracy A. Heath and Mark T. Holder and John P. Huelsenbeck},
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/bibtex_annotations2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

citation = {
"BibType": "article",
"Author": "Tracy A. Heath and Mark T. Holder and John P. Huelsenbeck",
Expand Down
9 changes: 9 additions & 0 deletions docs/source/examples/bibtex_annotations3.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)


citation = """\
@article {MEN:MEN2925,
author = {BROWN, JEREMY M. and SAVIDGE, KEVIN and McTAVISH, EMILY JANE B.},
Expand Down
9 changes: 9 additions & 0 deletions docs/source/examples/ds2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)


ds1 = dendropy.DataSet()
taxon_namespace = dendropy.TaxonNamespace()
ds1.attach_taxon_namespace(taxon_namespace)
Expand Down
3 changes: 3 additions & 0 deletions docs/source/examples/paup_estimate_model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy
from dendropy.interop import paup

warnings.warn("This example requires paup to be installed to run.")

data = dendropy.DnaCharacterMatrix.get(
path="pythonidae.nex",
schema="nexus")
Expand Down
3 changes: 3 additions & 0 deletions docs/source/examples/paup_estimate_tree_ml.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy
from dendropy.interop import paup

warnings.warn("This example requires paup to be installed to run.")

data = dendropy.DnaCharacterMatrix.get(
path="pythonidae.nex",
schema="nexus")
Expand Down
3 changes: 3 additions & 0 deletions docs/source/examples/paup_estimate_tree_nj.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy
from dendropy.interop import paup

warnings.warn("This example requires paup to be installed to run.")

data = dendropy.DnaCharacterMatrix.get(
path="pythonidae.nex",
schema="nexus")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/pdm_mpd1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# /usr/bin/env python

from io import StringIO
import dendropy
from dendropy.utility import container
from dendropy.utility.textprocessing import StringIO


phylogeny_str = """\
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/pdm_ses1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# /usr/bin/env python

from io import StringIO
import dendropy
from dendropy.utility import container
from dendropy.utility.textprocessing import StringIO

phylogeny_str = """\
[&R]((((spA:0.10,spB:0.10):0.67,(((spC:0.08,spD:0.08):0.24,(spE:0.13,spF:0.13):0.19):0.40,(spG:0.12,((spH:0.04,spI:0.04):0.07,spJ:0.12):0.00):0.60):0.05):0.78,((spK:0.05,(spL:0.04,spM:0.04):0.01):0.31,spN:0.37):1.19):1.22,spO:2.79);
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/pdm_ses2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# /usr/bin/env python

import collections
from io import StringIO
import dendropy
from dendropy.utility import container
from dendropy.utility.textprocessing import StringIO

phylogeny_str = """\
[&R]((((spA:0.10,spB:0.10):0.67,(((spC:0.08,spD:0.08):0.24,(spE:0.13,spF:0.13):0.19):0.40,(spG:0.12,((spH:0.04,spI:0.04):0.07,spJ:0.12):0.00):0.60):0.05):0.78,((spK:0.05,(spL:0.04,spM:0.04):0.01):0.31,spN:0.37):1.19):1.22,spO:2.79);
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/pdm_ses3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# /usr/bin/env python

from io import StringIO
import dendropy
from dendropy.utility.textprocessing import StringIO

phylogeny_str = """\
[&R]((((spA:0.10,spB:0.10):0.67,(((spC:0.08,spD:0.08):0.24,(spE:0.13,spF:0.13):0.19):0.40,(spG:0.12,((spH:0.04,spI:0.04):0.07,spJ:0.12):0.00):0.60):0.05):0.78,((spK:0.05,(spL:0.04,spM:0.04):0.01):0.31,spN:0.37):1.19):1.22,spO:2.79);
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/pdm_tns1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

tns = dendropy.TaxonNamespace()
mle_tree = dendropy.Tree.get(
path="pythonidae.mle.nex",
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/preorder_filtered_edge_iteration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

mle = dendropy.Tree.get(
path='pythonidae.mle.nex',
schema='nexus')
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples/preorder_filtered_node_iteration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy

warnings.warn(
"This example is known to be broken! "
"It will be fixed or removed in the future. "
"See https://github.com/jeetsukumaran/DendroPy/issues/160 for details. "
"Patch contributions are welcome.",
)

mle = dendropy.Tree.get(
path='pythonidae.mle.nex',
schema='nexus')
Expand Down
4 changes: 4 additions & 0 deletions docs/source/examples/raxml_estimate_tree.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
import dendropy
from dendropy.interop import raxml

warnings.warn("This example requires Raxml to be installed to run.")


data = dendropy.DnaCharacterMatrix.get(
path="pythonidae.nex",
schema="nexus")
Expand Down
Loading
Loading