My very opinionated way to pull and format NumPy-ish docstrings from Python
modules. Get it via a simple:
$ pip install git+https://github.com/carnarez/astdocs@masterthen installing itself as an astdocs command line tool (on top of adding the Python
package to the import path), or:
$ wget https://raw.githubusercontent.com/carnarez/astdocs/master/astdocs/astdocs.pyfor the script itself, whatever you find more
appropriate. Accepts a single
argument, a file (e.g., Python module) or a directory (in which it will
recursively fish for all *.py files). Due to its
cleaner type hints Python v3.10 is
required.
This little stunt is fully tested (100% coverage).
See an example -documentation of this very script- of the Markdown output generated
via this little DIY and rendered by the GitHub engine here. It
is also accessible there for me to test the
[not so] new GitHub Pages service and some rendering
processing.