Closed lukelbd closed 4 years ago
Let me know if you guys have any interest in merging this (I can squash and force-push the messy history).
If so I could implement these features as configurable options so the changes are backwards compatible, e.g. an automodsumm_ignore_nodoc = True
to skip methods with __doc__ == None
, automodsumm_include_methods = ['__init__', '__call__', '__getitem__', ...]
to explicitly include certain private and hidden methods (the default would just be __init__
and __call__
), and automodsumm_method_stubs = True
to enable individual pages for method stubs. Would be relatively simple.
@lukelbd - thanks for the PR and sorry for not responding sooner! I think some of these options sound like they would be useful to some users although for example for astropy we wouldn't want one page per method/attribute since we we would end up with waaaay too many pages. This PR as-is also includes a lot of changes that are specific to the proplot fork, e.g. the changes to the readme and so on. So I was wondering if you could open a separate PR for each conceptually different addition, and indeed avoid changing the default behavior, but make these things configurable as mentioned in your latest comment? I think all three features could be merged in if they were configurable and defaulted to the current behavior.
@astrofrog Sounds good! I'll do that when I get the chance, maybe some weekend later this month. Will close this PR since it will be replaced by 3 others
Not sure if you guys will necessarily want to merge this as it changes some core behavior, but I forked this for use with my proplot project and added the following features:
__doc__
attributes. This prevents inheriting and displaying documentation from external projects, namely matplotlib.__getitem__
,__getattr__
,__setitem__
, and__setattr__
in the list of builtin methods that are not ignored by the documentation generator. I use these to document some dictionary/list subclasses.env.found_docs
and reordering the event hooks inautomodsumm.py
so thatsphinx_automodapi
is called beforeautosummary
. This wayautosummary
sees the new class pages and builds the appropriate stubs.Related:
102
103
104