NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
453 stars 102 forks source link

Support processing __all__? #220

Open zeelot opened 2 years ago

zeelot commented 2 years ago

Is your feature request related to a problem? Please describe.

I keep all of my class implementations in private modules (python files starting with _). I export a public API using the __init__.py file like this:

"""Core Engine Components"""
from ._game_object import (
    GameObject,
    GameObjectsCollection,
)

__all__ = [
    "GameObject",
    "GameObjectsCollection",
]

But it doesn't look like the generated docs followed the import properly and exposed the GameObject at the root of my package. Am I missing some options? Sorry, I'm struggling to understand exactly what's possible here!

Describe the solution you'd like

I would like my package documentation to include the classes I exposed using __all__ in __init__.py files. I tried updating the processor configs and I can get the class name to show up but it does not seem to have any of the documentation.

Describe alternatives you've considered

Not sure what alternatives I have now. I can do this with Sphinx but I really hate that Sphinx executes all of your code so this project seemed pretty great!

Additional context

Thanks for all the work!

NiklasRosenstein commented 2 years ago

Hey @Zeelot , I'm sure that technically it is possible as long as __all__ can be evaluated using ast.literal_eval(). :) I might look into that in a bit.