Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
create-symlink: true

- name: Install python tools
run: uv pip install --system -r dev-requirements.txt pytest-github-actions-annotate-failures 'numpy>=2.0.0b1; python_version>="3.9"'
run: uv pip install --system -r dev-requirements.txt pytest-github-actions-annotate-failures

- name: Configure
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ compile_commands.json

# Cache
/emsdk-cache/*

# Nox
.nox/*
14 changes: 2 additions & 12 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ def tests(session: nox.Session) -> None:
session.run("pytest", *session.posargs)


@nox.session
def testsnp2(session: nox.Session) -> None:
"""
Run the unit and regular tests with NumPy 2.
"""

session.install(".[test]", "numpy>=2.0a1")
session.run("pytest", *session.posargs)


@nox.session
def hist(session: nox.Session) -> None:
"""
Expand Down Expand Up @@ -127,8 +117,8 @@ def pylint(session: nox.Session) -> None:
"""

session.install("pylint==3.2.*")
session.install(".")
session.run("pylint", "src", *session.posargs)
session.install("-e.")
session.run("pylint", "boost_histogram", *session.posargs)


@nox.session
Expand Down
19 changes: 12 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core>=0.9", "pybind11>=2.12"]
requires = ["scikit-build-core>=0.10", "pybind11>=2.12"]
build-backend = "scikit_build_core.build"

[project]
Expand All @@ -9,7 +9,8 @@ description = "The Boost::Histogram Python wrapper."
readme = "README.md"
requires-python = ">=3.7"
authors = [
{ name = "Hans Dembinski and Henry Schreiner", email = "[email protected]" },
{ name = "Hans Dembinski", email = "[email protected]" },
{ name = "Henry Schreiner", email = "[email protected]" },
]
keywords = [
"boost-histogram",
Expand Down Expand Up @@ -91,11 +92,9 @@ Homepage = "https://github.com/scikit-hep/boost-histogram"


[tool.scikit-build]
minimum-version = "build-system.requires"
cmake.version = "CMakeLists.txt"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/boost_histogram/version.py"]
wheel.expand-macos-universal-tags = true
minimum-version = "0.9"
cmake.version = ">=3.24"
sdist.exclude = [
"extern/**/*.py",
"extern/**/*.md",
Expand All @@ -113,8 +112,14 @@ sdist.exclude = [
]


[[tool.scikit-build.generate]]
path = "boost_histogram/version.py"
template = '''
__version__ = version = '$version'
'''


[tool.setuptools_scm]
write_to = "src/boost_histogram/version.py"


[tool.pytest.ini_options]
Expand Down
2 changes: 2 additions & 0 deletions src/boost_histogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
sum,
underflow,
)

# pylint: disable-next=import-error
from .version import version as __version__

try:
Expand Down
1 change: 0 additions & 1 deletion src/boost_histogram/version.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import annotations

version: str
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]
Loading