Skip to content

Commit

Permalink
Adding support for Python 3.13 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
sm00thix committed Jan 31, 2025
1 parent d11746d commit 8e26e35
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 291 deletions.
8 changes: 4 additions & 4 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: Build the package
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -40,7 +40,7 @@ runs:
shell: bash

- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
14 changes: 0 additions & 14 deletions .github/actions/publish/action.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release
description: Create a GitHub release

runs:
using: "composite"
steps:
- name: Extract version from pyproject.toml
id: get_version
run: |
version=$(grep -o 'version = "[^"]*"' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
echo "VERSION=$version" >> $GITHUB_ENV
shell: bash
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
"v${{ env.VERSION }}"
--repo "$GITHUB_REPOSITORY"
--notes ""
shell: bash
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
"v${{ env.VERSION }}" dist/**
--repo "$GITHUB_REPOSITORY"
shell: bash
25 changes: 18 additions & 7 deletions .github/workflows/package_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
name: Python Package

on:
workflow_run:
workflows: ["Tests"]
types:
- completed

jobs:
build_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build

publish_package:
needs: build_package
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment:
name: pypi
url: https://pypi.org/p/ikpls
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/publish
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
github_release:
needs: publish_package
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
environment:
name: pypi
url: https://pypi.org/p/ikpls
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/release

3 changes: 2 additions & 1 deletion .github/workflows/pull_request_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ on:
jobs:
test_package:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ on:

jobs:
test_package:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.12"
python: "3.13"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[tool.poetry]
name = "ikpls"
version = "1.2.5"
version = "1.2.5.post10"
description = "Improved Kernel PLS and Fast Cross-Validation."
authors = ["Sm00thix <oleemail@icloud.com>"]
maintainers = ["Sm00thix <oleemail@icloud.com>"]
authors = ["sm00thix <oleemail@icloud.com>"]
maintainers = ["sm00thix <oleemail@icloud.com>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://ikpls.readthedocs.io/en/latest/"
repository = "https://github.com/Sm00thix/IKPLS"
repository = "https://github.com/sm00thix/ikpls"

[tool.poetry.dependencies]
python = ">=3.9, <3.13"
python = ">=3.10, <3.14"
numpy = ">=1.26.3"
jax = "^0.4.20"
jaxlib = "^0.4.20"
scikit-learn = "^1.5.0"
tqdm = "^4.66.1"
joblib = "^1.3.2"
jax = ">=0.5.0"
jaxlib = ">=0.5.0"
scikit-learn = ">=1.5.0"
tqdm = ">=4.66.1"
joblib = ">=1.3.2"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading

0 comments on commit 8e26e35

Please sign in to comment.