astropy / astropy/sphinx-automodapi
No member information generated for exceptions
- Dominant language
- Python
- Stars
- 67
- Forks
- 48
- Avg merge
- 11h 52m
- Merged PRs (30d)
- 1
Description
I'm working on a code base that often defines methods (both class and instance) on exceptions. The class methods are used to construct the exception from other data (often other underlying exceptions), and the instance methods are used to format the exceptions for reporting to external systems.
It looks like sphinx-automodapi doesn't generate method information for exceptions, and I didn't see any documented way to enable this. For example, an exception class with a `to_slack` instance method and a `from_exception` class method generates only:
```rst
SlackWebException
=================
.. currentmodule:: safir.slack.blockkit
.. autoexception:: SlackWebException
```
I was hoping there would be some way to enable the normal sort of class documentation, such as:
```rst
SlackWebException
=================
.. currentmodule:: safir.slack.blockkit
.. autoexception:: SlackWebException
.. rubric:: Methods Summary
.. autosummary::
~SlackWebException.from_exception
~SlackWebException.to_slack
.. rubric:: Methods Documentation
.. automethod:: from_exception
.. automethod:: to_slack
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the generated SlackWebException example in issue #162 and reproduce the output for an exception with from_exception and to_slack methods. Trace the documentation generation path used by autoexception; done means the generated page includes the requested Methods Summary and Methods Documentation entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100