From a3564a732b5358a2743e451bd0cf9cff9bf77bb5 Mon Sep 17 00:00:00 2001 From: Andrew Riha Date: Tue, 19 Mar 2024 22:25:48 -0700 Subject: [PATCH] Support modern Python versions --- .github/workflows/ci.yml | 50 ++++++++++++++++++---------------------- README.rst | 2 +- setup.py | 5 ++-- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c095bb6..3af5bc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Install Black run: | pip install black @@ -31,8 +33,10 @@ jobs: build-docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Install Sphinx run: | pip install -r docs/requirements.txt @@ -46,33 +50,25 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: + os: [ubuntu-latest] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] include: - - os: ubuntu-latest - python-version: '3.7' - job_id: 0 - - os: ubuntu-latest - python-version: '3.8' - job_id: 1 - - os: ubuntu-latest - python-version: '3.9' - job_id: 2 - - os: ubuntu-latest - python-version: '3.10' - job_id: 3 - os: macos-latest - python-version: '3.10' - job_id: 4 + python-version: '3.12' - os: windows-latest - python-version: '3.10' - job_id: 5 + python-version: '3.12' + + env: + JOB_ID: ${{ strategy.job-index }} + NUM_JOBS: ${{ strategy.job-total }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Determine if downloads are enabled for this job @@ -80,9 +76,6 @@ jobs: # PRs and the master branch; note that the master branch is tested weekly via `cron`, # so this ensures all Python versions will be periodically integration tested with the # resource servers - env: - NUM_JOBS: 6 - JOB_ID: ${{ matrix.job_id }} if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/master' }} shell: bash run: | @@ -110,6 +103,7 @@ jobs: working-directory: C:\a\lineage\lineage run: | pytest --cov=lineage tests - - name: Upload coverage to Codecov (Ubuntu & macOS) - if: ${{ matrix.os != 'windows-latest' }} - uses: codecov/codecov-action@v3 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4.1.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.rst b/README.rst index d580754..b1ced0a 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ Also see the `installation documentation `_ 3.7.1+ and the following Python packages: +``lineage`` requires `Python `_ 3.8+ and the following Python packages: - `numpy `_ - `pandas `_ diff --git a/setup.py b/setup.py index 04436fd..8e2d2fa 100644 --- a/setup.py +++ b/setup.py @@ -97,10 +97,11 @@ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Scientific/Engineering :: Information Analysis", @@ -115,6 +116,6 @@ keywords="dna genes genetics genealogy snps chromosomes genotype " "bioinformatics ancestry", install_requires=["numpy", "pandas", "matplotlib", "atomicwrites", "snps"], - python_requires=">=3.7.1", + python_requires=">=3.8", platforms=["any"], )