Skip to content

Conversation

@cl445
Copy link

@cl445 cl445 commented Sep 17, 2025

Fixes #334

Summary

  • Support NumPy 2.x
  • Modernize dependencies
  • Update supported Python versions (drop EOL, require 3.10+)
  • Improve tox setup via poetry-plugin-export
  • Isolate motmetrics dependency to a dedicated MOT env (NumPy < 2)

Changes

pyproject.toml

  • Set python = ^3.10
  • Set numpy >= 1.23.0 (works with 1.23+ and 2.x)
  • Set scipy >= 1.13.1 (NumPy 2 compatible)
  • Keep extras minimal:
    • metrics = ["motmetrics"]
    • video = ["opencv-python"]

tox.ini

  • Install test deps via poetry-plugin-export into tox venv
  • Main tests run with NumPy 2.x
  • New env mot-py313:
    • python -m pip install "numpy>=1.23.0,<2.0.0"
    • pip install -e .[metrics]

tests

  • tests/mot_metrics.py:
    • Skip cleanly on NumPy >= 2
    • Robust metrics.txt path
    • Dataset path fixed to train/train

docs

  • CONTRIBUTING.md: Python 3.10–3.13, note that MOT env pins NumPy < 2
  • README.md: supported Python updated to 3.10+

Rationale

Motmetrics requires NumPy < 2. This PR isolates that constraint to the MOT env, while keeping Norfair and its main tests fully compatible with NumPy 2.x.
pyproject.toml remains the single source of truth, avoiding duplicate version pins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for NumPy > 2

1 participant