Upgrade Python development and use new PyO3 syntax - #134
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates core Rust/Python interoperability dependencies and adapts several exposed Rust #[pyclass] types to the newer PyO3 extraction syntax, while also doing a small test iteration cleanup.
Changes:
- Bumped Rust dependencies:
numpy→0.28.0,pyo3→0.28.3, andarrow/parquet→58.3. - Added
from_py_objectto multiple#[pyclass(...)]declarations to support construction/extraction from Python objects with the new PyO3 syntax. - Simplified a FASTQ streaming reader test loop to use
foriteration.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updates Rust crate versions for PyO3/numpy and arrow/parquet. |
| src/fq_encode/json_encoder.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| src/fq_encode/option.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| src/fq_encode/parquet_encoder.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| src/fq_encode/tensor_encoder.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| src/output/writefq.rs | Refactors streaming-reader test to a for loop iteration style. |
| src/smooth/blat.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| src/smooth/stat.rs | Adds #[pyclass(from_py_object)] for PyO3 extraction compatibility. |
| deepchopper/cli.py | Removes an extra blank line (no functional change). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 primarily updates dependencies and improves Python interoperability for several Rust structs by adding the
from_py_objectattribute to their#[pyclass]macros. It also includes a minor test code simplification.Dependency updates:
numpyto version0.28.0andpyo3to0.28.3inCargo.toml, improving compatibility and access to new features.parquetandarrowcrates to version58.3inCargo.toml.Python interoperability improvements:
from_py_objectto#[pyclass]for the following structs, allowing construction from Python objects:JsonEncoderinsrc/fq_encode/json_encoder.rsFqEncoderOptioninsrc/fq_encode/option.rsParquetEncoderinsrc/fq_encode/parquet_encoder.rsTensorEncoderinsrc/fq_encode/tensor_encoder.rsPslAlignmentinsrc/smooth/blat.rsStatResultinsrc/smooth/stat.rsTest code simplification:
forloop instead of manual iteration insrc/output/writefq.rs.