lablup / lablup/raftify

Define `PyRaftServiceClient` method return types

Open
#113 0 comments 0 reactions 0 assignees View on GitHub
feature ossca-24 python
Dominant language
Rust
Stars
44
Forks
14
PR merge metrics
No merged PRs in 30d

Description

### GOAL
Let's specify return types of functions in raft_client.rs file like:
https://github.com/lablup/raftify/blob/914d3fa0f0830436031196c03d657d21d5f1d6ab/binding/python/src/bindings/raft_client.rs#L27-L32

### TODO
I'm totally newbie with python-rust mapping... so need to:
- [x] Learn pyo3(https://pyo3.rs/v0.20.2/) and pyo3-asyncio(https://github.com/awestlake87/pyo3-asyncio) first
- [x] Learn raft_client.rs code: `&'a` grammar and attributes like `#[pyclass], #[pymethods], ...`, `into()` function, etc ...
- [ ] Finally write some code
- [ ] `raftify.pyi`: declare return type for each functions
- [ ] `raft_client.rs` (or somewhere else if needed..?)
- [ ] Define new struct and implementation
- **RULES**: Use `Py-` as prefix, make `inner` field in it.
- [ ] Change return statements by wrapping objects in proper return type.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading binding/python/src/bindings/raft_client.rs at the linked methods and the existing raftify.pyi declarations, then consult the referenced PyO3 and pyo3-asyncio documentation. Done means each function has an appropriate declared return type, with the required Py- prefixed wrapper structs and inner fields used consistently where needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.