Skip to content

scientific-python/docstub

docstub

Note

In early development! Docstub is not feature-complete or thoroughly tested yet. Its behavior, configuration or command line interface may change significantly between releases.

docstub is a command-line tool to generate Python stub files. It extracts necessary type information from NumPyDoc style docstrings.

Many packages in the scientific Python ecosystem already describe expected parameter and return types in their docstrings. Docstub aims to take advantage of these and help with the adoption of type annotations. It does so by supporting widely used readable conventions such as array of dtype or iterable of int(s) which are translated into valid type annotations.

Installation & getting started

Please refer to the introduction to get started with docstub.

Contributing

The best way you can help and contribute right now is by trying docstub out! Feedback to what features might still be missing or where it breaks for you would be greatly appreciated. As well as pointers to where the documentation is confusing and unclear. Feel welcome to open an issue! 🚀

Since docstub is still in early development there isn't an official contribution guide yet. Features and API are still being heavily extended and the internal structure is still somewhat in flux. The development is, in part, motivated by an effort to add type annotations to the scikit-image project. This may inform some short-term priorities and the roadmap.

That said, docstub is a project for the community and welcomes contributions in any form! Please do check in with an issue if you are interested in working on something.

Our project follows the Scientific Python's Code of Conduct.

Acknowledgements

Thanks to docs2stubs by which this project was heavily inspired and influenced.

And thanks to CZI for supporting this work with an EOSS grant.

About

Generate Python stub files from docstrings

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages