tudat-team / tudat-multidoc

BSD 2-Clause "Simplified" License
3 stars 9 forks source link

Generate stub files from API docstrings and disseminate them via Conda #23

Open FilippoOggionni opened 2 years ago

FilippoOggionni commented 2 years ago

While autocomplete is working on different IDEs (see tudat-team/tudatpy#22), we could also think of generating our own stub files for tudatpy - we already have the content from the API reference - and disseminate them through conda.

Low priority for now but it should not be difficult to implement, as we can simply reuse the content written for the API.

See tudat-team/tudatpy#22 for more details.

DominicDirkx commented 2 years ago

Is this still relevant? With the autocomplete working, perhaps we can close this.

FilippoOggionni commented 2 years ago

I think this is still relevant. For now, we have the autocomplete working, but the next step would be the have all the documentation currently in the API reference website also available locally. This can be done by using the content of the API docstring to generate stubs and disseminate them through conda. Not super important, but it would be elegant to have it locally as well 🙂

Pocket-titan commented 3 months ago

Just commenting to say autocomplete/intellisense for tudatpy doesn't work out-of-the-box in VSCode at the moment, but I was able to generate usable type stubs using pybind11-stubgen (pip install pybind11-stubgen && pybind11-stubgen tudatpy in conda environment, then copy stubs over to package location using cp -RT). They are not perfect and there are some errors, but might be helpful for any future implementers.

DominicDirkx commented 2 months ago

Thanks! @alfonsoSR and @alopezrivera have been working on this, perhaps they can give an update?