Spell out USA in affiliations #450
This file contains 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
name: ci | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
examples: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: False | |
matrix: | |
python-version: | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install aptitude | |
sudo aptitude install -y gcc-7 g++-7 gfortran-7 | |
sudo apt-get install libpython2.7 # required by paup | |
python -m pip install --upgrade pip | |
- name: Install paup | |
run: | | |
temp_dir=$(mktemp -d) | |
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz | |
gunzip ${temp_dir}/paup4a169_ubuntu64.gz | |
chmod +x ${temp_dir}/paup4a169_ubuntu64 | |
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup | |
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}" | |
- name: Install dendropy | |
run: | | |
python -m pip install . | |
- name: Run examples | |
run: | | |
cd docs/source/examples | |
# only allow known failures | |
# and enforce removal of working examples from known failures | |
for f in *.py; do | |
echo "${f}" | |
if timeout 60 python "${f}" && ! grep -q "${f}" backlogged-fail-whitelist.txt; then | |
: | |
elif grep -q "${f}" backlogged-fail-whitelist.txt; then | |
: | |
else | |
echo FAIL "${f}" | |
exit 1 | |
fi | |
done | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff==0.0.292 | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with ruff | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
./lint.sh | |
tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: False | |
matrix: | |
python-version: | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
continue-on-error: true | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install aptitude | |
sudo aptitude install -y gcc-7 g++-7 gfortran-7 | |
sudo apt-get install libpython2.7 # required by paup | |
python -m pip install --upgrade pip | |
if [ -f .github/workflows/requirements.txt ]; then pip install -r .github/workflows/requirements.txt; fi | |
- name: Install paup | |
run: | | |
temp_dir=$(mktemp -d) | |
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz | |
gunzip ${temp_dir}/paup4a169_ubuntu64.gz | |
chmod +x ${temp_dir}/paup4a169_ubuntu64 | |
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup | |
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}" | |
- name: Unit tests with setup.py | |
run: | | |
python setup.py pytest --addopts '-m "not smoke"' | |
- name: Smoke tests with setup.py | |
run: | | |
python setup.py pytest --addopts "-m smoke" | |
entrypoints: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: False | |
matrix: | |
python-version: | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
continue-on-error: true | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install aptitude | |
sudo aptitude install -y gcc-7 g++-7 gfortran-7 | |
sudo apt-get install libpython2.7 # required by paup | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
python -m pip install . | |
- name: Test sumtrees | |
run: | | |
which sumtrees | |
sumtrees --help | |
sumtrees 2>&1 | grep sumtrees || exit 1 | |
- name: Test sumlabels | |
run: | | |
which sumlabels | |
sumlabels --help | |
sumlabels 2>&1 | grep sumlabels || exit 1 | |
- name: Test dendropy-format | |
run: | | |
which dendropy-format | |
dendropy-format --help | |
dendropy-format 2>&1 | grep dendropy-format || exit 1 | |
- name: Test deprecated entrypoints | |
run: | | |
which sumtrees.py | |
sumtrees.py --help | |
sumtrees.py 2>&1 | grep sumtrees.py || exit 1 | |
which sumlabels.py | |
sumlabels.py --help | |
sumlabels.py 2>&1 | grep sumlabels.py || exit 1 | |
coverage: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install aptitude | |
sudo aptitude install -y gcc-7 g++-7 gfortran-7 | |
sudo apt-get install libpython2.7 # required by paup | |
python -m pip install --upgrade pip | |
temp_dir=$(mktemp -d) | |
wget -P ${temp_dir} http://phylosolutions.com/paup-test/paup4a169_ubuntu64.gz | |
gunzip ${temp_dir}/paup4a169_ubuntu64.gz | |
chmod +x ${temp_dir}/paup4a169_ubuntu64 | |
sudo mv ${temp_dir}/paup4a169_ubuntu64 /usr/local/bin/paup | |
echo "export DENDROPY_PAUP_EXECUTABLE_PATH=/usr/local/bin/paup" >> "${GITHUB_ENV}" | |
- name: Install coverage dependencies | |
run: | | |
python3 -m pip install pytest | |
python3 -m pip install pytest-cov | |
- name: Generate coverage report | |
run: | | |
python3 -m pytest tests/unittests --cov=tests --cov-report=xml | |
- uses: codecov/codecov-action@v4 | |
with: | |
token: ae13d715-bae4-4e6d-9dce-f47e7d7c7c01 | |
flags: unittests # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
packaging-bdist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install build tools | |
run: python3 -m pip install pip setuptools wheel --upgrade | |
- name: Build bdist | |
run: | | |
python3 setup.py bdist_wheel | |
tree dist | |
- name: Upgrade pip | |
run: python3 -m pip install pip --upgrade | |
- name: Install from bdist | |
run: python3 -m pip install dist/*.whl | |
- name: Test install | |
run: | | |
find . -type f -name '*.py' -exec rm {} \; | |
python3 -c "import dendropy; print(dendropy.__version__)" | |
packaging-sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install build tools | |
run: python3 -m pip install pip setuptools wheel --upgrade | |
- name: Build sdist | |
run: | | |
python3 setup.py sdist | |
tree dist | |
- name: Install from sdist | |
run: python3 -m pip install dist/*.tar.gz | |
- name: Test install | |
run: | | |
find . -type f -name '*.py' -exec rm {} \; | |
python3 -c "import dendropy; print(dendropy.__version__)" | |
packaging-source: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Upgrade pip | |
run: python3 -m pip install pip --upgrade | |
- name: Install from source | |
run: python3 -m pip install . | |
- name: Test install | |
run: | | |
find . -type f -name '*.py' -exec rm {} \; | |
python3 -c "import dendropy; print(dendropy.__version__)" | |
docs: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
continue-on-error: true | |
with: | |
python-version: 3.9 | |
- name: Upgrade pip | |
run: python3 -m pip install pip --upgrade | |
- name: Install from source | |
run: python3 -m pip install . | |
- name: Install documentation build dependencies | |
run: python3 -m pip install -r docs/requirements.txt | |
- name: Build documentation | |
run: make -C docs html | |
- name: Deploy docs | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/build/html # The folder the action should deploy. | |
# uses: jsmrcaga/[email protected] | |
# with: | |
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
# NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}" | |
# NETLIFY_DEPLOY_TO_PROD: true | |
# install_command: "echo Skipping installing the dependencies" | |
# build_command: "echo Skipping building the web files" | |
# build_directory: docs/build/html | |
deploy: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- examples | |
- lint | |
- tests | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- run: python setup.py sdist bdist_wheel | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
paper: | |
runs-on: ubuntu-latest | |
name: Paper Draft | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build draft PDF | |
uses: openjournals/openjournals-draft-action@master | |
with: | |
journal: joss | |
# This should be the path to the paper within your repo. | |
paper-path: joss/paper.md | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: paper | |
# This is the output path where Pandoc will write the compiled | |
# PDF. Note, this should be the same directory as the input | |
# paper.md | |
path: joss/paper.pdf |