Skip to content

Copilot/upgrade project dependencies#37

Merged
dancergraham merged 3 commits into
mainfrom
copilot/upgrade-project-dependencies
Jun 10, 2026
Merged

Copilot/upgrade project dependencies#37
dancergraham merged 3 commits into
mainfrom
copilot/upgrade-project-dependencies

Conversation

@dancergraham

Copy link
Copy Markdown
Owner

This pull request updates dependencies, improves Python bindings, and modernizes the handling of NumPy arrays in the Rust code. The changes focus on updating package versions, aligning with the latest NumPy and PyO3 APIs, and cleaning up the project configuration for testing and packaging.

Dependency and API updates:

  • Updated Rust dependencies in Cargo.toml to use newer versions of pyo3, e57, and numpy, ensuring compatibility with the latest APIs and bug fixes.
  • Updated Python dependencies in pyproject.toml, requiring numpy>=2,<3, and increased the minimum required version of maturin for building the package.

Project configuration improvements:

  • Added a project version (0.2.1a1) and moved pytest to an optional test dependency group in pyproject.toml, following best practices for Python package configuration. [1] [2]

Code modernization and simplification:

  • Refactored the Rust FFI code in src/lib.rs to use PyArray2 and Array2 from the updated NumPy API, replacing the older PyArray usage and simplifying array creation and reshaping logic. [1] [2]

Copilot AI review requested due to automatic review settings June 10, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request upgrades the Rust/Python dependency stack (PyO3, numpy, e57) and updates the Rust → Python bindings to use the newer numpy crate APIs for returning 2D NumPy arrays.

Changes:

  • Updated Rust crate dependencies (PyO3/e57/numpy) and regenerated Cargo.lock.
  • Modernized the Rust FFI layer to return PyArray2 via ndarray::Array2 + IntoPyArray.
  • Updated Python packaging metadata: NumPy constraint to >=2,<3, added project version, and moved pytest into an optional test extra.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/lib.rs Switches exported array types to PyArray2 and creates arrays via Array2 + IntoPyArray.
pyproject.toml Updates build requirements, pins NumPy to >=2,<3, adds version, and adds optional test dependencies.
Cargo.toml Bumps Rust dependency versions and removes direct ndarray dependency.
Cargo.lock Regenerated lockfile reflecting upgraded dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines 8 to 10
dependencies = [
'pytest',
'numpy',
'numpy>=2,<3',
]
@dancergraham dancergraham merged commit b5e13bd into main Jun 10, 2026
8 of 13 checks passed
@dancergraham dancergraham deleted the copilot/upgrade-project-dependencies branch June 11, 2026 09:50
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.

3 participants