Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Python stubs #1818

Merged
merged 26 commits into from
Jan 3, 2025
Merged

Conversation

Meakk
Copy link
Member

@Meakk Meakk commented Dec 21, 2024

Add a script used to generate Python stubs for our current Python bindings. It will generate .pyi files containing all the available Python API used by IDE to do static code verification.

Fix #972

@Meakk Meakk self-assigned this Dec 21, 2024
@Meakk Meakk changed the title Fix pybind11 stubgen warnings Generate Python stubs Dec 21, 2024
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.69%. Comparing base (1021f00) to head (4074258).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1818      +/-   ##
==========================================
- Coverage   95.71%   95.69%   -0.03%     
==========================================
  Files         125      125              
  Lines        9870     9890      +20     
==========================================
+ Hits         9447     9464      +17     
- Misses        423      426       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Meakk Meakk force-pushed the fix-pybind11-stubgen-warnings branch from 2b96d93 to 93bfb1a Compare December 23, 2024 15:12
@Meakk Meakk force-pushed the fix-pybind11-stubgen-warnings branch from 93bfb1a to bd14e22 Compare December 30, 2024 21:33
@snoyer
Copy link
Contributor

snoyer commented Dec 31, 2024

some changes got lost in a merge

pybind11_stubgen - [  ERROR] In f3d.pyf3d.Camera.state. : Invalid expression 'f3d::camera_state_t'
Warning: stubgen - [WARNING] Raw C++ types/values were found in signatures extracted from docstrings.

py::class_<f3d::camera_state_t> needs to be moved above py::class_<f3d::camera, ...> again, see #1804

pyproject.toml Outdated Show resolved Hide resolved
@mwestphal
Copy link
Contributor

please write a description explaining what this do, idk what is a stub

@Meakk Meakk requested review from snoyer and mwestphal and removed request for snoyer January 2, 2025 20:33
Copy link
Contributor

@mwestphal mwestphal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add something in LANGUAGE_BINDINGS.md about this ?

@Meakk Meakk requested a review from mwestphal January 3, 2025 08:47
@Meakk Meakk merged commit f4f799e into f3d-app:master Jan 3, 2025
47 checks passed
@Meakk Meakk deleted the fix-pybind11-stubgen-warnings branch January 3, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Add stubs for the python bindings
3 participants