Skip to content

Commit 61f20ed

Browse files
committed
Merge remote-tracking branch 'origin/main' into polytomize-root
2 parents a6025df + 0f46d43 commit 61f20ed

File tree

761 files changed

+3834
-988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

761 files changed

+3834
-988
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Expected behavior**
14+
A clear and concise description of what you expected to happen.
15+
16+
**To Reproduce**
17+
Steps to reproduce the behavior:
18+
19+
**Computational environment**
20+
- OS: [e.g., Windows 10]
21+
- Python version [e.g., 3.8]
22+
- DendroPy version [e.g., 4.6.1]
23+
24+
**Additional context**
25+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is.
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yaml

Lines changed: 170 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ci
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
examples:
@@ -21,17 +21,27 @@ jobs:
2121
uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{ matrix.python-version }}
24+
- name: Refresh Package Sources
25+
run: |
26+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
27+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
28+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
29+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
30+
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
31+
sudo apt-get update -y
2432
- name: Install dependencies
2533
run: |
26-
sudo apt-get install libpython2.7 # required by paup
34+
sudo apt-get install aptitude
35+
sudo aptitude install -y gcc-7 g++-7 gfortran-7
36+
sudo apt-get install -y libpython2.7 # required by paup
2737
python -m pip install --upgrade pip
2838
- name: Install paup
2939
run: |
3040
temp_dir=$(mktemp -d)
31-
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64.gz
32-
gunzip ${temp_dir}/paup4a168_ubuntu64.gz
33-
chmod +x ${temp_dir}/paup4a168_ubuntu64
34-
sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
41+
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz
42+
gunzip ${temp_dir}/paup4a169_ubuntu64.gz
43+
chmod +x ${temp_dir}/paup4a169_ubuntu64
44+
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
3545
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
3646
- name: Install dendropy
3747
run: |
@@ -71,8 +81,6 @@ jobs:
7181
fail-fast: False
7282
matrix:
7383
python-version:
74-
- "2.7"
75-
- "3.5"
7684
- "3.6"
7785
- "3.7"
7886
- "3.8"
@@ -86,31 +94,95 @@ jobs:
8694
continue-on-error: true
8795
with:
8896
python-version: ${{ matrix.python-version }}
97+
- name: Refresh Package Sources
98+
run: |
99+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
100+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
101+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
102+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
103+
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
104+
sudo apt-get update -y
89105
- name: Install dependencies
90106
run: |
91-
sudo apt-get update
92-
sudo apt-get install python2 libpython2.7 # required by paup
107+
sudo apt-get install aptitude
108+
sudo aptitude install -y gcc-7 g++-7 gfortran-7
109+
sudo apt-get install -y libpython2.7 # required by paup
93110
python -m pip install --upgrade pip
94-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
111+
if [ -f .github/workflows/requirements.txt ]; then pip install -r .github/workflows/requirements.txt; fi
95112
- name: Install paup
96113
run: |
97114
temp_dir=$(mktemp -d)
98-
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64.gz
99-
gunzip ${temp_dir}/paup4a168_ubuntu64.gz
100-
chmod +x ${temp_dir}/paup4a168_ubuntu64
101-
sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
115+
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz
116+
gunzip ${temp_dir}/paup4a169_ubuntu64.gz
117+
chmod +x ${temp_dir}/paup4a169_ubuntu64
118+
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
102119
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
103-
- name: Python2 compatibility workaround # TODO remove when Python2 compatibility dropped
104-
if: matrix.python-version == '2.7'
120+
- name: Unit tests with setup.py
121+
run: |
122+
python setup.py pytest --addopts '-m "not smoke"'
123+
- name: Smoke tests with setup.py
124+
run: |
125+
python setup.py pytest --addopts "-m smoke"
126+
127+
entrypoints:
128+
runs-on: ubuntu-20.04
129+
strategy:
130+
fail-fast: False
131+
matrix:
132+
python-version:
133+
- "3.6"
134+
- "3.7"
135+
- "3.8"
136+
- "3.9"
137+
- "3.10"
138+
- "3.11"
139+
steps:
140+
- uses: actions/checkout@v3
141+
- name: Set up Python ${{ matrix.python-version }}
142+
uses: actions/setup-python@v4
143+
continue-on-error: true
144+
with:
145+
python-version: ${{ matrix.python-version }}
146+
- name: Refresh Package Sources
105147
run: |
106-
rm tests/dendropy
107-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo python2
108-
python2 -m pip install setuptools --upgrade
109-
python2 setup.py test
110-
- name: Test with setup.py
111-
if: matrix.python-version != '2.7'
148+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
149+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
150+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
151+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
152+
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
153+
sudo apt-get update -y
154+
- name: Install dependencies
112155
run: |
113-
python setup.py test
156+
sudo apt-get install aptitude
157+
sudo aptitude install -y gcc-7 g++-7 gfortran-7
158+
sudo apt-get install libpython2.7 # required by paup
159+
python -m pip install --upgrade pip
160+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
161+
python -m pip install .
162+
- name: Test sumtrees
163+
run: |
164+
which sumtrees
165+
sumtrees --help
166+
sumtrees 2>&1 | grep sumtrees || exit 1
167+
- name: Test sumlabels
168+
run: |
169+
which sumlabels
170+
sumlabels --help
171+
sumlabels 2>&1 | grep sumlabels || exit 1
172+
- name: Test dendropy-format
173+
run: |
174+
which dendropy-format
175+
dendropy-format --help
176+
dendropy-format 2>&1 | grep dendropy-format || exit 1
177+
- name: Test deprecated entrypoints
178+
run: |
179+
which sumtrees.py
180+
sumtrees.py --help
181+
sumtrees.py 2>&1 | grep sumtrees.py || exit 1
182+
which sumlabels.py
183+
sumlabels.py --help
184+
sumlabels.py 2>&1 | grep sumlabels.py || exit 1
185+
114186
coverage:
115187
runs-on: ubuntu-20.04
116188
steps:
@@ -119,24 +191,36 @@ jobs:
119191
uses: actions/setup-python@master
120192
with:
121193
python-version: 3.8
122-
- name: Install paup
194+
- name: Refresh Package Sources
123195
run: |
124-
sudo apt-get install libpython2.7 # required by paup
196+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" > /etc/apt/sources.list'
197+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" >> /etc/apt/sources.list'
198+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list'
199+
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" >> /etc/apt/sources.list'
200+
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu focal partner" >> /etc/apt/sources.list'
201+
sudo apt-get update -y
202+
- name: Install dependencies
203+
run: |
204+
sudo apt-get install aptitude
205+
sudo aptitude install -y gcc-7 g++-7 gfortran-7
206+
sudo apt-get install -y libpython2.7 # required by paup
207+
python -m pip install --upgrade pip
125208
temp_dir=$(mktemp -d)
126-
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a168_ubuntu64.gz
127-
gunzip ${temp_dir}/paup4a168_ubuntu64.gz
128-
chmod +x ${temp_dir}/paup4a168_ubuntu64
129-
sudo mv ${temp_dir}/paup4a168_ubuntu64 /usr/local/bin/paup
209+
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz
210+
gunzip ${temp_dir}/paup4a169_ubuntu64.gz
211+
chmod +x ${temp_dir}/paup4a169_ubuntu64
212+
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup
130213
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}"
131214
- name: Install coverage dependencies
132215
run: |
133216
python3 -m pip install pytest
134217
python3 -m pip install pytest-cov
135218
- name: Generate coverage report
136219
run: |
137-
python3 -m pytest tests --cov=tests/dendropy --cov-report=xml
138-
- uses: codecov/codecov-action@v3
220+
python3 -m pytest tests/unittests --cov=tests --cov-report=xml
221+
- uses: codecov/codecov-action@v4
139222
with:
223+
token: ae13d715-bae4-4e6d-9dce-f47e7d7c7c01
140224
flags: unittests # optional
141225
fail_ci_if_error: true # optional (default = false)
142226
verbose: true # optional (default = false)
@@ -189,6 +273,40 @@ jobs:
189273
run: |
190274
find . -type f -name '*.py' -exec rm {} \;
191275
python3 -c "import dendropy; print(dendropy.__version__)"
276+
docs:
277+
permissions:
278+
contents: write
279+
runs-on: ubuntu-latest
280+
steps:
281+
- name: Checkout
282+
uses: actions/checkout@v2
283+
- name: Set up Python 3.9
284+
uses: actions/setup-python@v4
285+
continue-on-error: true
286+
with:
287+
python-version: 3.9
288+
- name: Upgrade pip
289+
run: python3 -m pip install pip --upgrade
290+
- name: Install from source
291+
run: python3 -m pip install .
292+
- name: Install documentation build dependencies
293+
run: python3 -m pip install -r docs/requirements.txt
294+
- name: Build documentation
295+
run: make -C docs html
296+
- name: Deploy docs
297+
if: github.ref == 'refs/heads/main'
298+
uses: JamesIves/github-pages-deploy-action@v4
299+
with:
300+
folder: docs/build/html # The folder the action should deploy.
301+
# uses: jsmrcaga/[email protected]
302+
# with:
303+
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
304+
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
305+
# NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}"
306+
# NETLIFY_DEPLOY_TO_PROD: true
307+
# install_command: "echo Skipping installing the dependencies"
308+
# build_command: "echo Skipping building the web files"
309+
# build_directory: docs/build/html
192310
deploy:
193311
runs-on: ubuntu-latest
194312
if: startsWith(github.ref, 'refs/tags/v')
@@ -212,3 +330,23 @@ jobs:
212330
with:
213331
user: __token__
214332
password: ${{ secrets.PYPI_API_TOKEN }}
333+
paper:
334+
runs-on: ubuntu-latest
335+
name: Paper Draft
336+
steps:
337+
- name: Checkout
338+
uses: actions/checkout@v4
339+
- name: Build draft PDF
340+
uses: openjournals/openjournals-draft-action@master
341+
with:
342+
journal: joss
343+
# This should be the path to the paper within your repo.
344+
paper-path: joss/paper.md
345+
- name: Upload
346+
uses: actions/upload-artifact@v4
347+
with:
348+
name: paper
349+
# This is the output path where Pandoc will write the compiled
350+
# PDF. Note, this should be the same directory as the input
351+
# paper.md
352+
path: joss/paper.pdf

.github/workflows/requirements.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pytest==7.0.1
2+
iniconfig==1.1.1
3+
pluggy==1.0.0
4+
packaging==21.3
5+
tomli==1.2.3
6+
importlib-metadata==4.8.3
7+
typing-extensions==4.1.1
8+
zipp==3.6.0

.github/workflows/requirements.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile --output-file requirements.txt requirements.in
6+
#
7+
attrs==22.2.0 # via pytest
8+
importlib-metadata==4.8.3
9+
iniconfig==1.1.1
10+
packaging==21.3
11+
pluggy==1.0.0
12+
py==1.11.0 # via pytest
13+
pyparsing==3.1.1 # via packaging
14+
pytest==7.0.1
15+
tomli==1.2.3
16+
typing-extensions==4.1.1
17+
zipp==3.6.0

.github/workflows/requirements37.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

.github/workflows/requirements37.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.7
3+
# by the following command:
4+
#
5+
# pip-compile requirements.in
6+
#
7+
exceptiongroup==1.1.3
8+
# via pytest
9+
importlib-metadata==6.7.0
10+
# via
11+
# pluggy
12+
# pytest
13+
iniconfig==2.0.0
14+
# via pytest
15+
packaging==23.2
16+
# via pytest
17+
pluggy==1.2.0
18+
# via pytest
19+
pytest==7.4.3
20+
# via -r requirements.in
21+
tomli==2.0.1
22+
# via pytest
23+
typing-extensions==4.7.1
24+
# via importlib-metadata
25+
zipp==3.15.0
26+
# via importlib-metadata

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dist/*
99
setup.cfg
1010
setuptools-*.egg
1111
__pycache__
12+
.eggs
1213

1314
# PyCharm
1415
**/.idea

AUTHORS.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Jeet Sukumaran <[email protected]>
2-
Mark T. Holder <[email protected]>
1+
- Jeet Sukumaran <[email protected]>
2+
- Mark T. Holder <[email protected]>
3+
- Matthew Andres Moreno <[email protected]>
34

45
Find a comprehensive, up-to-date listing of project contributors `here <https://github.com/jeetsukumaran/DendroPy/graphs/contributors>`_.

0 commit comments

Comments
 (0)