Skip to content

Commit

Permalink
py3.12 support (#169)
Browse files Browse the repository at this point in the history
* py3.12 support, fixes #168
  • Loading branch information
cbyrohl authored Jul 31, 2024
1 parent 9e3bb64 commit ea7b507
Show file tree
Hide file tree
Showing 7 changed files with 1,983 additions and 1,790 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==23.0.1
nox==2022.11.21
nox-poetry==1.0.2
poetry==1.3.2
virtualenv==20.15.0
pip==24.1.2
nox==2024.4.15
nox-poetry==1.0.3
poetry==1.7.1
virtualenv==20.26.3
33 changes: 27 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,36 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
run_full_matrix:
description: 'Run the full matrix of Python versions'
required: false
default: 'false'

jobs:
tests:
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
name: ${{ matrix.session }} ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
session: [tests]
python-version: ['3.10']
include:
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
#- { python: "3.9", os: "ubuntu-latest", session: "tests" }
- python-version: '3.9'
os: ubuntu-latest
session: tests
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true' }}
- python-version: '3.11'
os: ubuntu-latest
session: tests
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true' }}
- python-version: '3.12'
os: ubuntu-latest
session: tests
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true' }}
env:
NOXSESSION: ${{ matrix.session }}
FORCE_COLOR: "1"
Expand All @@ -27,10 +46,10 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
Expand All @@ -49,6 +68,7 @@ jobs:
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt poetry
pipx inject --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt poetry poetry-plugin-export
poetry --version
- name: Install Nox
Expand Down Expand Up @@ -95,7 +115,7 @@ jobs:
export SCIDA_TESTDATA_PATH=${{ env.SCIDA_TESTDATA_PATH }}
echo "test data path: $SCIDA_TESTDATA_PATH"
echo "test data path content: $(ls $SCIDA_TESTDATA_PATH)"
nox --python=${{ matrix.python }}
nox --python=${{ matrix.python-version }}
- name: Upload coverage data
if: always() && matrix.session == 'tests'
Expand All @@ -110,6 +130,7 @@ jobs:
with:
name: docs
path: docs/_build
continue-on-error: ${{ github.event.inputs.run_full_matrix == 'false' && matrix.full_matrix != true }}

coverage:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This tool uses dask, allowing analysis to scale up from your personal computer t

## Requirements

- Python 3.9, 3.10, 3.11
- Python 3.9, 3.10, 3.11, 3.12


## Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Installation

scida can be installed via [PyPI](https://pypi.org/). scida requires a Python version 3.9, 3.10 or 3.11.
scida can be installed via [PyPI](https://pypi.org/). scida requires a Python version 3.9, 3.10, 3.11 or 3.12.

??? tip "Encapsulating packages"
We recommend encapsulating your python environments. For example using [anaconda](https://www.anaconda.com/) or [virtualenv](https://virtualenv.pypa.io/en/latest/).
Expand Down
8 changes: 6 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from pathlib import Path

from nox_poetry import Session, session
# waiting for https://github.com/python-poetry/poetry-plugin-export/pull/286
# for now have to fall back to nox rather than nox_poetry
from nox import Session, session

python_versions = ["3.11", "3.10", "3.9"]
# from nox_poetry import Session, session

python_versions = ["3.12", "3.11", "3.10", "3.9"]
python_dflt = "3.10"


Expand Down
Loading

0 comments on commit ea7b507

Please sign in to comment.