Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: python 3.13 support #30

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]
[![Conda latest release][conda-version]][conda-link]
<!-- [![Conda latest release][conda-version]][conda-link] -->
[![LICENSE][license-badge]][license-link] [![Scikit-HEP][sk-badge]][sk-link]

`cuda-histogram` is a histogram filling package for GPUs. The package tries to
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
Loading