Skip to content
Open
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
74 changes: 10 additions & 64 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,14 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
numpy-version: [ "1.24", "1.25", "1.26", "2.0", "2.1", "2.2", "2.3", "2.4" ]
python-version: [ "3.11", "3.12", "3.13", "3.14", "3.15" ]
numpy-version: [ "2.0", "2.1", "2.2", "2.3", "2.4", "2.5" ]
exclude:
- python-version: "3.10"
numpy-version: "2.3"
os: ubuntu-latest
- python-version: "3.10"
numpy-version: "2.4"
os: ubuntu-latest
- python-version: "3.11"
numpy-version: "2.4"
os: ubuntu-latest
- python-version: "3.12"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.12"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.26"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.26"
- python-version: "3.11"
numpy-version: "2.5"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -76,7 +49,7 @@ jobs:
python -m pip install -U setuptools
python -m pip install -U wheel
python -m pip install -U pytest
python -m pip install "numpy==${{ matrix.numpy-version }}"
python -m pip install "numpy==${{ matrix.numpy-version }}.*"

- name: Install
run: |
Expand All @@ -93,41 +66,14 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
numpy-version: [ "1.24", "1.25", "1.26", "2.0", "2.1", "2.2", "2.3", "2.4" ]
python-version: [ "3.11", "3.12", "3.13", "3.14", "3.15" ]
numpy-version: [ "2.0", "2.1", "2.2", "2.3", "2.4", "2.5" ]
exclude:
- python-version: "3.10"
numpy-version: "2.3"
os: ubuntu-latest
- python-version: "3.10"
numpy-version: "2.4"
os: ubuntu-latest
- python-version: "3.11"
numpy-version: "2.4"
os: ubuntu-latest
- python-version: "3.12"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.12"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.13"
numpy-version: "1.26"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.24"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.25"
os: ubuntu-latest
- python-version: "3.14"
numpy-version: "1.26"
- python-version: "3.11"
numpy-version: "2.5"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -156,7 +102,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U setuptools
python -m pip install -U wheel
python -m pip install "numpy==${{ matrix.numpy-version }}"
python -m pip install "numpy==${{ matrix.numpy-version }}.*"
python -m pip install -U pytest
python -m pip install -U mypy

Expand Down
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Unreleased

- Correct the pond force unit to 0.00980665 N (one gram-force); it was
previously 1000 times too large (`#44 <https://github.com/python-quantities/python-quantities/issues/44>`_).
- Fix type checking with NumPy 2.5
- Add CI testing for Python 3.15 and NumPy 2.5, drop support for Python 3.10 and for NumPy 1.x (following NEP 29 plus one year)

------
0.16.4
Expand Down
4 changes: 2 additions & 2 deletions doc/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Prerequisites

Quantities has a few dependencies:

* Python_ (>=3.8)
* NumPy_ (>=1.19)
* Python_ (>=3.11)
* NumPy_ (>=2.0)

(bearing in mind that not all combinations of Python and NumPy versions necessarily work).

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "quantities"
description = "Support for physical quantities with units, based on numpy"
readme = "README.rst"
requires-python = ">=3.10"
requires-python = ">=3.11"
license-files = ["doc/user/license.rst"]
authors = [
{name = "Darren Dale", email = "[email protected]"}
Expand All @@ -24,7 +24,7 @@ classifiers = [
"Topic :: Scientific/Engineering"
]
dependencies = [
"numpy>=1.24"
"numpy>=2.0"
]
dynamic = ["version"]

Expand Down Expand Up @@ -58,7 +58,7 @@ write_to = "quantities/_version.py"

[tool.ruff]
line-length = 120
target-version = "py310"
target-version = "py311"

[tool.ruff.lint]
# pycodestyle errors and warnings, pyflakes, isort.
Expand Down
3 changes: 2 additions & 1 deletion quantities/quantity.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Any, Optional

import numpy as np
import numpy.typing as npt

from quantities.dimensionality import Dimensionality
Expand All @@ -21,7 +22,7 @@ def scale_other_units(f: Any) -> None:
...


class Quantity(npt.NDArray):
class Quantity(np.ndarray[Any, np.dtype[Any]]):

def __new__(cls, data: QuantityData, units: DimensionalityDescriptor = ...,
dtype: Optional[object] = ..., copy: bool = ...) -> Quantity:
Expand Down
Loading