Skip to content

Commit

Permalink
Support modern Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
apriha committed Mar 20, 2024
1 parent 328a01c commit a3564a7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 31 deletions.
50 changes: 22 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -46,43 +50,32 @@ 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
# for testing, limit downloads from the resource servers to only the selected job for
# 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: |
Expand Down Expand Up @@ -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/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Also see the `installation documentation <https://lineage.readthedocs.io/en/stab

Dependencies
------------
``lineage`` requires `Python <https://www.python.org>`_ 3.7.1+ and the following Python packages:
``lineage`` requires `Python <https://www.python.org>`_ 3.8+ and the following Python packages:

- `numpy <https://numpy.org>`_
- `pandas <https://pandas.pydata.org>`_
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"],
)

0 comments on commit a3564a7

Please sign in to comment.