apache / apache/arrow-nanoarrow

Automate testing and updating of stub files in Python bindings

Open
#624 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
249
Forks
68
Avg merge
2d 21h
Merged PRs (30d)
11

Description

Apparently `stubtest` is not quite sufficient to detect out-of-date stubs, as found in https://github.com/apache/arrow-nanoarrow/pull/606, and generating the stubs using mypy on CI and checking that the .pyi files didn't change also didn't quite work out-of-the-box. There are some options for generating type stubs that might be simpler than mypy or might not require installing in advance, and it might be necessary to not use .pyi files that start with an underscore for this to work with mypy.

In general, we should be able to follow the work in pyarrow to provide stubs that can at least enable a useful developer experience and user experience for the few object types that we don't provide Python wrappers for (e.g., buffer view).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing PR 606 and the existing pyarrow approach to Python type stubs, then compare the stubtest and mypy-based CI options described in the issue. Done means CI reliably detects out-of-date .pyi files and provides useful stubs for the unwrapped object types mentioned, such as buffer view.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.