Skip to content

Commit

Permalink
ci: python 3.13 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp committed Oct 8, 2024
1 parent dee1b5b commit a0028ef
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand All @@ -51,9 +51,7 @@ jobs:
allow-prereleases: true

- name: Test package and generate coverage report
run:
pipx run nox -s coverage-${{ matrix.python-version.key ||
matrix.python-version }} --verbose
run: pipx run nox -s coverage-${{ matrix.python-version }} --verbose

- name: Upload coverage report
uses: codecov/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.3"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
Expand Down
14 changes: 7 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import nox

DIR = Path(__file__).parent.resolve()
ALL_PYTHON = ["3.8", "3.9", "3.10", "3.11", "3.12"]
ALL_PYTHON = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

nox.needs_version = ">=2024.3.2"
nox.options.sessions = ["lint", "pylint", "tests"]
nox.options.sessions = ["lint", "tests"]
nox.options.default_venv_backend = "uv|virtualenv"


@nox.session
@nox.session(reuse_venv=True)
def lint(session: nox.Session) -> None:
"""
Run the linter.
Expand All @@ -25,7 +25,7 @@ def lint(session: nox.Session) -> None:
)


@nox.session(python=ALL_PYTHON)
@nox.session(reuse_venv=True, python=ALL_PYTHON)
def tests(session: nox.Session) -> None:
"""
Run the unit and regular tests.
Expand All @@ -34,7 +34,7 @@ def tests(session: nox.Session) -> None:
session.run("pytest", *session.posargs)


@nox.session(python=ALL_PYTHON)
@nox.session(reuse_venv=True, python=ALL_PYTHON)
def coverage(session: nox.Session) -> None:
"""Run tests and compute coverage."""
session.posargs.append("--cov=cuda_histogram")
Expand Down Expand Up @@ -83,7 +83,7 @@ def docs(session: nox.Session) -> None:
session.run("sphinx-build", "--keep-going", *shared_args)


@nox.session
@nox.session(reuse_venv=True)
def build_api_docs(session: nox.Session) -> None:
"""
Build (regenerate) API docs.
Expand All @@ -102,7 +102,7 @@ def build_api_docs(session: nox.Session) -> None:
)


@nox.session
@nox.session(reuse_venv=True)
def build(session: nox.Session) -> None:
"""
Build an SDist and wheel.
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
Expand Down Expand Up @@ -113,8 +114,6 @@ disallow_incomplete_defs = true


[tool.ruff]
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
Expand Down
3 changes: 1 addition & 2 deletions src/cuda_histogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
from __future__ import annotations

from cuda_histogram import axis
from cuda_histogram._version import version as __version__
from cuda_histogram.hist import Hist

from ._version import version as __version__

__all__: list[str] = [
"Hist",
"axis",
Expand Down

0 comments on commit a0028ef

Please sign in to comment.