Copilot/upgrade project dependencies#37
Merged
Merged
Conversation
There was a problem hiding this comment.
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
PyArray2viandarray::Array2+IntoPyArray. - Updated Python packaging metadata: NumPy constraint to
>=2,<3, added project version, and moved pytest into an optionaltestextra.
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 on lines
8
to
10
| dependencies = [ | ||
| 'pytest', | ||
| 'numpy', | ||
| 'numpy>=2,<3', | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Cargo.tomlto use newer versions ofpyo3,e57, andnumpy, ensuring compatibility with the latest APIs and bug fixes.pyproject.toml, requiringnumpy>=2,<3, and increased the minimum required version ofmaturinfor building the package.Project configuration improvements:
0.2.1a1) and movedpytestto an optionaltestdependency group inpyproject.toml, following best practices for Python package configuration. [1] [2]Code modernization and simplification:
src/lib.rsto usePyArray2andArray2from the updated NumPy API, replacing the olderPyArrayusage and simplifying array creation and reshaping logic. [1] [2]