Auto-generate type stubs (#2384)
So far, we have manually generated stubs by installing `pybind11-stubgen`, using it, and finally copying over the result into `python/stubs`. This is tedious and tends to get forgotten, thus stubs are outdated, and clashes with `black` constantly. Thus, we - remove the static stub directory - generate stubs directly during build time - enable users to opt out PS: There are some fixes to warnings thrown during the stub construction, too.
Showing
- .github/workflows/test-pip.yml 19 additions, 5 deletions.github/workflows/test-pip.yml
- CMakeLists.txt 3 additions, 1 deletionCMakeLists.txt
- pyproject.toml 2 additions, 0 deletionspyproject.toml
- python/CMakeLists.txt 18 additions, 1 deletionpython/CMakeLists.txt
- python/domain_decomposition.cpp 15 additions, 0 deletionspython/domain_decomposition.cpp
- python/network.cpp 71 additions, 108 deletionspython/network.cpp
- python/pyarb.cpp 1 addition, 1 deletionpython/pyarb.cpp
- python/recipe.cpp 0 additions, 1 deletionpython/recipe.cpp
- python/stubs/arbor/__init__.pyi 0 additions, 303 deletionspython/stubs/arbor/__init__.pyi
- python/stubs/arbor/_arbor/__init__.pyi 0 additions, 3356 deletionspython/stubs/arbor/_arbor/__init__.pyi
- python/stubs/arbor/_arbor/env.pyi 0 additions, 47 deletionspython/stubs/arbor/_arbor/env.pyi
- python/stubs/arbor/_arbor/units.pyi 0 additions, 192 deletionspython/stubs/arbor/_arbor/units.pyi
Please register or sign in to comment