Skip to content

Automatically generate pyi stubs for built extensions #80

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

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

virtuald
Copy link
Member

... I haven't really tried this yet with anything other than the demo, so YMMV.

@virtuald
Copy link
Member Author

Sad, fails on OSX because of relinking related issues.

@virtuald
Copy link
Member Author

Looks like the std::function in hal.simulation are getting misinterpreted?

    def registerFPGAButtonCallback(self, callback: std::function<void (wpi::StringRef, HAL_Value const*)>, initialNotify: bool) -> CallbackStore: 
        """
        registerFPGAButtonCallback(self: hal.simulation._simulation.RoboRioSim, callback: std::function<void (wpi::StringRef, HAL_Value const*)>, initialNotify: bool) -> hal.simulation._simulation.CallbackStore
        """

Actually, looks like none of those include <pybind11/functional.h> for some reason, so that's probably it.

@virtuald
Copy link
Member Author

Filed a bug about this at the stubgen repo: sizmailov/pybind11-stubgen#33

@virtuald
Copy link
Member Author

Fixed OSX with this latest push. Newest version of pybind11-stubgen now complains about invalid stubs, so that makes them easier to find. However, there's a lot of them... :(

@virtuald virtuald force-pushed the generate-pyi branch 2 times, most recently from d354d5e to a6d8842 Compare August 26, 2020 06:05
@virtuald
Copy link
Member Author

Looks like it's failing on Windows, the error was getting ignored previously. :(

@virtuald
Copy link
Member Author

Say @TheTripleV , any chance you can take a look at this Windows issue... :-D

@TheTripleV
Copy link
Member

Sure, do I just pick a robotpy repo and build it using this branch of rpybuild?

@virtuald
Copy link
Member Author

The github actions for this repo fail, so that should be sufficient. tests/run_tests.py I think.

@virtuald
Copy link
Member Author

Looks like it only fails on Python 3.8?

@TheTripleV
Copy link
Member

InvalidSignatureInDocstring has been removed from pybind11-stubgen as of v0.7.0.

@virtuald
Copy link
Member Author

Upgraded to latest stubgen.

@virtuald
Copy link
Member Author

wtf black

@virtuald virtuald force-pushed the generate-pyi branch 3 times, most recently from cd986ce to d4c92d5 Compare September 3, 2020 04:19
@virtuald
Copy link
Member Author

virtuald commented Sep 3, 2020

@TheTripleV
Copy link
Member

Huh, the Ubuntu ci failed exactly where the Windows 3.8 one did.

@virtuald virtuald force-pushed the generate-pyi branch 2 times, most recently from db35de9 to 11a7f3b Compare September 7, 2020 05:50
@virtuald virtuald merged commit 9a9016e into master Sep 9, 2020
@virtuald virtuald deleted the generate-pyi branch September 9, 2020 13:50
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.

Generate .pyi files for all generated modules
2 participants