Generate PyO3 stub files automatically?

Open
#359 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reading the manually maintained python/ffsim/_lib.pyi file and the Rust bindings it describes. Investigate whether pyo3-stub-gen can generate equivalent stubs for ffsim, and compare its output with the existing file. Done means the stub files can be generated automatically and accurately describe the implemented Python functions.

Written by the indexing model from the issue text.

Description

rust

Currently, we manually maintain https://github.com/qiskit-community/ffsim/blob/main/python/ffsim/_lib.pyi to describe the Python functions implemented in Rust. We can investigate generating the stub files automatically using https://github.com/Jij-Inc/pyo3-stub-gen.

Dominant language
Python
Stars
116
Forks
50
Avg merge
2h 1m
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Qiskit/ffsim

All issues in Qiskit/ffsim

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.