Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Dependency Update Plan

  • Review current dependency specifications in all configuration files
  • Update setup.py dependencies to latest versions:
    • Update numpy to >=2.0.0
    • Update imageio to >=2.35.0
    • Update matplotlib to >=3.8.0
    • Update scikit-image to >=0.23.0
    • Update scipy to >=1.11.0
    • Update natsort to >=8.4.0
    • Update tqdm to >=4.66.0
    • Update importlib_resources to >=5.12.0
  • Update setup.py Python version classifiers (3.10, 3.11, 3.12, 3.13)
  • Update pyproject.toml dependencies to match setup.py
  • Update openpiv/docs/requirements.txt to remove outdated numpy requirement
  • Install updated dependencies using poetry
  • Run test suite to check for compatibility issues
  • Fix any numpy 2.x compatibility issues if found (none found!)
  • Verify all tests pass with updated dependencies (203 passed, 12 skipped)
  • Final validation and documentation check

Summary

Successfully updated all dependencies to latest versions:

  • NumPy upgraded from >=1.21.6 to >=2.0.0 (installed 2.2.6)
  • SciPy upgraded to >=1.11.0 (installed 1.13.0)
  • Matplotlib upgraded to >=3.8.0 (installed 3.8.4)
  • Scikit-image upgraded to >=0.23.0 (installed 0.23.1)
  • All other dependencies updated with minimum version constraints

All 203 tests pass successfully with no deprecation warnings related to numpy 2.x. The codebase is fully compatible with NumPy 2.x without requiring any code changes.

Original prompt

Problem Statement

The repository currently specifies numpy>=1.21.6 (from January 2022) as the minimum requirement. This should be updated to use the latest compatible version of numpy and other dependencies for better performance, security, and compatibility.

Required Changes

1. Update dependency requirements in both configuration files:

Files to update:

  • setup.py
  • pyproject.toml
  • openpiv/docs/requirements.txt (if necessary)

2. Dependency Version Updates

Based on current compatibility requirements (Python 3.10+) and latest stable releases as of January 2026:

Current versions:

'numpy>=1.21.6',
'imageio>=2.22.4',
'matplotlib>=3',
'scikit-image',
'scipy',
'natsort',
'tqdm',
'importlib_resources'

Updated versions to use:

'numpy>=2.0.0',  # NumPy 2.x is compatible with Python 3.10-3.13, major performance improvements
'imageio>=2.35.0',  # Latest stable version
'matplotlib>=3.8.0',  # Latest 3.x stable branch
'scikit-image>=0.23.0',  # Specified in pyproject.toml, use consistently
'scipy>=1.11.0',  # Latest stable with NumPy 2.x compatibility
'natsort>=8.4.0',  # Already pinned, keep current
'tqdm>=4.66.0',  # Already pinned, keep current  
'importlib_resources>=5.12.0'  # Pin minimum version

3. Update Python version requirements

In pyproject.toml, the Python version is specified as python = ">=3.10" which is correct. However, setup.py still lists Python 3.7-3.10 in classifiers. Update to:

'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',

4. Testing Requirements

After updating dependencies:

  1. Run the full test suite using pytest to ensure all tests pass with the new dependencies
  2. Check for deprecation warnings related to numpy 2.x API changes
  3. Verify compatibility with the following test files:
    • openpiv/test/test_piv.py
    • openpiv/test/test_pyprocess.py
    • openpiv/test/test_tools.py
    • openpiv/test/test_filters.py
    • openpiv/test/test_windef_coverage.py

5. Key NumPy 2.x Compatibility Considerations

NumPy 2.x introduced some breaking changes. Check for:

  • Use of deprecated np.math (should be math module directly)
  • Changes to dtype behavior
  • String representation changes
  • Ensure all array operations use proper dtypes

6. Documentation

Update openpiv/docs/requirements.txt to remove the outdated numpy>=1.9 requirement and ensure consistency with main package requirements.

Expected Outcomes

  1. Both setup.py and pyproject.toml should have consistent, updated dependency versions
  2. All existing tests should pass without modification (or with minimal numpy 2.x compatibility fixes if needed)
  3. Python version classifiers should be updated to reflect actual supported versions
  4. No deprecation warnings from updated dependencies

Testing Command

Ensure the following command runs successfully:

pytest openpiv/test/ -v

Additional Notes

  • NumPy 2.0+ provides significant performance improvements and better compatibility with modern Python versions
  • The codebase uses standard NumPy operations that should be compatible with NumPy 2.x
  • If any compatibility issues are found, they should be minimal and easily fixable
  • The version constraints use >= to allow users to install newer compatible versions while ensuring minimum requirements are met

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 22, 2026 22:41
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com>
@alexlib alexlib marked this pull request as ready for review January 22, 2026 22:46
Copilot AI review requested due to automatic review settings January 22, 2026 22:46
@alexlib alexlib merged commit 8ff73b6 into master Jan 22, 2026
3 checks passed
@alexlib alexlib deleted the copilot/update-dependency-requirements branch January 22, 2026 22:46
Copilot AI requested a review from alexlib January 22, 2026 22:46
Copilot stopped work on behalf of alexlib due to an error January 22, 2026 22:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dependency versions across the OpenPIV project to use the latest stable releases, with a major upgrade to NumPy 2.x from the previous 1.21.6 requirement. The changes improve performance, security, and compatibility with modern Python versions.

Changes:

  • Updated all dependency minimum version requirements in both setup.py and pyproject.toml to latest stable versions
  • Upgraded NumPy from >=1.21.6 to >=2.0.0 (installed 2.2.6)
  • Updated Python version classifiers to reflect support for Python 3.10-3.13 (removed 3.7-3.9)
  • Removed outdated numpy requirement from documentation requirements file

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
setup.py Updated all dependency version constraints and Python classifiers to support 3.10-3.13
pyproject.toml Updated dependencies to match setup.py, changed from caret (^) to >= syntax for consistency, added Python 3.13 classifier
poetry.lock Automatically generated lock file with updated package versions including numpy 2.2.6, scipy 1.13.0, matplotlib 3.8.4, scikit-image 0.23.1, and imageio 2.37.2
openpiv/docs/requirements.txt Removed outdated numpy>=1.9 requirement to avoid conflicts

'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.13 classifier added but not tested in CI. The GitHub Actions workflow in .github/workflows/testing.yml only tests Python 3.10, 3.11, and 3.12. To properly support Python 3.13, it should be added to the CI test matrix to verify compatibility with all dependencies, especially numpy 2.x and scipy 1.13.0.

Copilot uses AI. Check for mistakes.
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.13 classifier added but not tested in CI. The GitHub Actions workflow in .github/workflows/testing.yml only tests Python 3.10, 3.11, and 3.12. To properly support Python 3.13, it should be added to the CI test matrix to verify compatibility with all dependencies, especially numpy 2.x and scipy 1.13.0.

Copilot uses AI. Check for mistakes.
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.

2 participants