From 3f0974706b35f1ef3b886c1ab86fc1d3a487b77b Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 30 Dec 2021 14:38:11 -0800 Subject: [PATCH 1/3] add variable for Augur version associated with min Python version ref https://github.com/matplotlib/matplotlib/pull/18895/commits/f9907b49f9d00c03cf014a25d057d0d09d43d8cf --- setup.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index f78572b05..dcab8b8e6 100644 --- a/setup.py +++ b/setup.py @@ -2,16 +2,20 @@ import setuptools import sys -min_version = (3, 6) +py_min_version = (3, 6) # minimal supported python version +since_augur_version = (7, 0) # py_min_version is required since this augur version -if sys.version_info < min_version: +if sys.version_info < py_min_version: error = """ -Beginning with augur 7.0.0, Python {0} or above is required. +Beginning with augur {0}, Python {1} or above is required. +You are using Python {2}. This may be due to an out of date pip. Make sure you have pip >= 9.0.1. -""".format('.'.join(str(n) for n in min_version)), +""".format('.'.join(str(n) for n in since_augur_version), + '.'.join(str(n) for n in py_min_version), + '.'.join(str(n) for n in sys.version_info[:3])) sys.exit(error) base_dir = Path(__file__).parent.resolve() @@ -45,7 +49,7 @@ }, packages = setuptools.find_packages(), package_data = {'augur': ['data/*']}, - python_requires = '>={}'.format('.'.join(str(n) for n in min_version)), + python_requires = '>={}'.format('.'.join(str(n) for n in py_min_version)), install_requires = [ "bcbio-gff >=0.6.0", "biopython >=1.67, !=1.77, !=1.78", From 65c736fdce7809385d2ffb5771b7490bc3059819 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:17:41 -0800 Subject: [PATCH 2/3] update python versions to 3.7-3.10 --- .github/workflows/ci.yaml | 4 ++-- .readthedocs.yml | 2 +- docs/contribute/DEV_DOCS.md | 2 +- docs/installation/installation.md | 2 +- setup.py | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index af0acf53a..312b2270b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8'] + python-version: ['3.7', '3.8', '3.9', '3.10'] defaults: run: shell: bash -l {0} @@ -26,7 +26,7 @@ jobs: - run: pytest -c pytest.python3.ini --cov-report=xml --cov=augur - run: cram --shell=/bin/bash tests/functional/*.t tests/builds/*.t - run: bash tests/builds/runner.sh - - if: matrix.python-version == 3.8 + - if: matrix.python-version == 3.10 uses: codecov/codecov-action@v2 with: fail_ci_if_error: true diff --git a/.readthedocs.yml b/.readthedocs.yml index 5dfaa1927..bad4782f9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,7 @@ --- version: 2 python: - version: 3.6 + version: 3.7 install: - method: pip path: . diff --git a/docs/contribute/DEV_DOCS.md b/docs/contribute/DEV_DOCS.md index cc470adfa..4ae6883e8 100644 --- a/docs/contribute/DEV_DOCS.md +++ b/docs/contribute/DEV_DOCS.md @@ -27,7 +27,7 @@ Please see the [project board](https://github.com/orgs/nextstrain/projects/6) fo ## Contributing code -We currently target compatibility with Python 3.6 and higher. As Python releases new versions, +We currently target compatibility with Python 3.7 and higher. As Python releases new versions, the minimum target compatibility may be increased in the future. Versions for this project, Augur, from 3.0.0 onwards aim to follow the diff --git a/docs/installation/installation.md b/docs/installation/installation.md index 468a15910..75074444e 100644 --- a/docs/installation/installation.md +++ b/docs/installation/installation.md @@ -40,7 +40,7 @@ mamba install -c conda-forge -c bioconda augur ## Using pip from PyPi -Augur is written in Python 3 and requires at least Python 3.6. +Augur is written in Python 3 and requires at least Python 3.7. It's published on [PyPi](https://pypi.org) as [nextstrain-augur](https://pypi.org/project/nextstrain-augur), so you can install it with `pip` like so: ```bash diff --git a/setup.py b/setup.py index dcab8b8e6..e5c48d267 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import setuptools import sys -py_min_version = (3, 6) # minimal supported python version +py_min_version = (3, 7) # minimal supported python version since_augur_version = (7, 0) # py_min_version is required since this augur version if sys.version_info < py_min_version: @@ -91,9 +91,10 @@ # Python 3 only "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], # Install an "augur" program which calls augur.__main__.main() # https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation From 6451394b0e594082a533de526f4f538573be773a Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:19:19 -0800 Subject: [PATCH 3/3] bump augur version for min python version to 14 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e5c48d267..d1749bce2 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import sys py_min_version = (3, 7) # minimal supported python version -since_augur_version = (7, 0) # py_min_version is required since this augur version +since_augur_version = (14, 0) # py_min_version is required since this augur version if sys.version_info < py_min_version: error = """