Add stubgen autogeneration#453
Merged
fredroy merged 22 commits intosofa-framework:masterfrom Jan 8, 2025
Merged
Conversation
…ith a in build startegy and isnt working in install because the install order is random
8653620 to
13ba8e9
Compare
alxbilger
requested changes
Nov 6, 2024
Contributor
alxbilger
left a comment
There was a problem hiding this comment.
I would prefer the script generate_stubs to be written in Python. It would more readable and cross-platform.
… use of either pybind11 or mypy
…der. This should be removed once create_sofa_stubs is able to merge the generated stubs with existing implementation
…ption when input type is unknown
alxbilger
approved these changes
Jan 8, 2025
bakpaul
added a commit
that referenced
this pull request
Jan 8, 2025
* Add stubgen auto generaiton after bindings build * Generating stubs through cmake does not work as expected with ninja with a in build startegy and isnt working in install because the install order is random * fix missing quote * Add python path for stubgen * Try to find out what is wrong when generating * Change script to python , add Sofa.Component generation and allow the use of either pybind11 or mypy * fix action * try fix env for stubgen * try fix action * Add env for SOFA libs * Remove output * Add echot osee line * Add more informaiton * Fix python script * Try fix unit tests * Fix mistake in split * add filter to skip synchronizing files that already exist in dest folder. This should be removed once create_sofa_stubs is able to merge the generated stubs with existing implementation * Fix windows stubgen by printing a warning instead of throwing an exception when input type is unknown * Fix warning print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At first I wanted to make it auto generated in the CMake project, to have a well integrated workflow in the build. I tried in many ways :
add_custom_commandbut it isn't possible because the targets SofaPython3 and Bindings are Interfaces.So back to the weak solution, a script that needs to be run by hands. I'll really enjoy adding it to Jenkins...