Skip to content

Commit

Permalink
Merge branch 'gpimm/python_3.12_support' into 'master'
Browse files Browse the repository at this point in the history
Add python 3.12 support

See merge request minknow/pod5-file-format!302
  • Loading branch information
0x55555555 committed Nov 27, 2023
2 parents 25a3406 + a6b9c9b commit 0ba232d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
41 changes: 15 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ linux-x64-gcc9-release-build:
PYTHON_ENABLED: "ON"
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11"]
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11", "3.12"]

linux-aarch64-gcc9-release-build:
image: quay.io/pypa/manylinux2014_aarch64
Expand All @@ -284,7 +284,7 @@ linux-aarch64-gcc9-release-build:
PYTHON_ENABLED: "ON"
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11"]
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11", "3.12"]


# ======================================
Expand Down Expand Up @@ -344,7 +344,7 @@ osx-x64-clang12-release-build:
- PYTHON_VERSION: ["3.8.9", "3.9.13"]
MACOSX_DEPLOYMENT_TARGET: "10.9"
OUTPUT_SKU: "osx-10.9-x64"
- PYTHON_VERSION: ["3.10.10", "3.11.2"]
- PYTHON_VERSION: ["3.10.10", "3.11.2", "3.12.0"]
MACOSX_DEPLOYMENT_TARGET: "10.9"
OUTPUT_SKU: "osx-10.9-x64"

Expand All @@ -365,7 +365,7 @@ osx-arm64-clang13-release-build:
MACOSX_DEPLOYMENT_TARGET: "10.9"
OUTPUT_SKU: "osx-10.9-arm64"
FORCE_PYTHON_PLATFORM: macosx_11_0_arm64
- PYTHON_VERSION: ["3.10.10", "3.11.2"]
- PYTHON_VERSION: ["3.10.10", "3.11.2", "3.12.0"]
MACOSX_DEPLOYMENT_TARGET: "11.0"
OUTPUT_SKU: "osx-11.0-arm64"
FORCE_PYTHON_PLATFORM: macosx_11_0_arm64
Expand All @@ -385,14 +385,7 @@ osx-arm64-clang13-release-build:
retry: 1
before_script:
- conan config install --verify-ssl=no "${CONAN_CONFIG_URL}"
- export PYENV="${HOME}/.pyenv/pyenv-win"
- export PYENV_ROOT="${PYENV}"
- export PYENV_HOME="${PYENV}"
- export PATH="${PYENV}/bin:${PYENV}/shims:${PATH}"
- if [[ -z $(pyenv install --list | grep "${PYTHON_VERSION}") ]]; then pyenv update; fi
- pyenv install ${PYTHON_VERSION} --skip-existing
- pyenv local ${PYTHON_VERSION}
- python -m venv .venv
- c:/Python${PYTHON_VERSION}/python -m venv .venv
- source .venv/Scripts/activate
script:
- pod5_version="$(cmake -P ci/get_tag_version.cmake 2>&1)"
Expand Down Expand Up @@ -422,7 +415,7 @@ win-x64-msvc2017-release-build:
OUTPUT_SKU: "win-x64"
parallel:
matrix:
- PYTHON_VERSION: ["3.8.0", "3.9.13", "3.10.10", "3.11.2"]
- PYTHON_VERSION: ["38", "39", "310", "311", "312"]
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
Expand Down Expand Up @@ -480,7 +473,7 @@ build-python-api:
.parallel-py-minor-ver: &parallel-py-minor-ver
parallel:
matrix:
- PY_MINOR_VER: ["8", "9", "10", "11"]
- PY_MINOR_VER: ["8", "9", "10", "11", "12"]

tools-linux-x64:
stage: test
Expand Down Expand Up @@ -544,7 +537,9 @@ pytest-linux-aarch64:
needs:
- linux-aarch64-gcc9-release-build
- build-python-api
<<: *parallel-py-minor-ver
parallel:
matrix:
- PY_MINOR_VER: ["8", "9", "10", "11"] # TODO: Missing 12 as h5py doenst have binaries for 3.12 aarch64 yet

.versions-matrix-pyenv-and-venv: &versions-matrix-pyenv-and-venv
parallel:
Expand All @@ -557,6 +552,8 @@ pytest-linux-aarch64:
PYTHON_VERSION: "3.10.10"
- PY_MINOR_VER: "11"
PYTHON_VERSION: "3.11.2"
- PY_MINOR_VER: "12"
PYTHON_VERSION: "3.12.0"

pytest-osx-x64:
extends: [".pytest"]
Expand Down Expand Up @@ -590,19 +587,10 @@ pytest-win-x64:
- win-x64-msvc2017-release-build
- build-python-api
before_script:
# pyenv doesn't live on the PATH by default (and pyenv-win doesn't have `pyenv init`)
- export PYENV=~/.pyenv/pyenv-win
- export PATH=${PYENV}/bin:${PYENV}/shims:${PATH}
# needs PYTHON_VERSION set, and optionally VENV_BIN_DIR
- if [[ -z $( pyenv install --list | grep "${PYTHON_VERSION}" ) ]]; then pyenv update; fi
- pyenv install --skip-existing ${PYTHON_VERSION}
- pyenv global ${PYTHON_VERSION}
- python --version
# with pyenv, we don't have to use `python3` (and `python` also works on Windows)
- python -m venv .venv/
- c:/Python3${PY_MINOR_VER}/python -m venv .venv
- source .venv/Scripts/activate
- python -m pip install --upgrade pip
- python --version
- python -m pip install --upgrade pip
<<: *versions-matrix-pyenv-and-venv


Expand Down Expand Up @@ -978,6 +966,7 @@ mlhub:
- PYTHON_VERSION:
- "3.8"
- "3.11"
- "3.12"


# ======================================
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ All notable changes, updates, and fixes to pod5 will be documented here
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.2]

## Added

- Support for Python 3.12

## [0.3.1] 2023-11-10

Expand All @@ -33,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Removed python3.7 support


## [0.2.9] 2023-11-02

### Fixed
Expand All @@ -51,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove exposed artifactory URL env var from gitlab ci config.
- `convert to_fast5` writes byte encoded read_ids to match Minkow (was `str`)


## [0.2.7] 2023-09-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion ci/setup_python_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git clone https://github.com/gregneagle/relocatable-python.git
echo "Generating python ${version} into ${destination}"

os_version="10.9"
if [[ "${version}" == "3.10.10" || "${version}" == "3.11.2" ]]; then
if [[ "${version}" == "3.10.10" || "${version}" == "3.11.2" || "${version}" == "3.12.0" ]]; then
os_version="11"
fi

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ sphinx-rtd-theme
sphinx==v5.3.0
myst-parser
# Paths are relative to project root for ReadTheDocs and docs/Makefile
pod5==0.3.1
pod5==0.3.2
6 changes: 3 additions & 3 deletions python/pod5/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ classifiers=[
]

dependencies = [
"lib_pod5 == 0.3.1",
"lib_pod5 == 0.3.2",
"iso8601",
'importlib-metadata; python_version<"3.8"',
"more_itertools",
"numpy >= 1.21.0",
'typing-extensions; python_version<"3.8"',
"pyarrow ~= 11.0.0",
"pyarrow ~= 14.0.0",
"pytz",
"packaging",
"polars~=0.19",
"h5py~=3.8.0",
"h5py~=3.10.0",
"vbz_h5py_plugin",
"tqdm"
]
Expand Down

0 comments on commit 0ba232d

Please sign in to comment.