sphinx incorrectly render cache decorated results

Bug #498024 reported by Skipper Seabold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
statsmodels
In Progress
Undecided
Unassigned

Bug Description

All of the results properties do not correctly render in the docs now that all of the results are cached. See for example GLMResults. Not sure yet if just adding docstrings to the properties would fix this.

Revision history for this message
Skipper Seabold (jsseabold) wrote :

They didn't have a "hack committed" status... There has to be a cleaner way around this, but I got it so that the cached attributes at least show up in the docstrings in Revision 1975. I just changed GLMResults to not auto generate. Copied the GLMResults.rst from generated to source and added explicit autoattribute for the cached attributes. Had to repeat the docstrings in the properties/methods, which seems stupid. Looking for another solution...

Changed in statsmodels:
status: New → In Progress
Revision history for this message
Skipper Seabold (jsseabold) wrote :

This approach isn't going to work. I might need to write an extension for the decorators, but I need to get my head around sphinx and numpydoc better first. I created a repo with a sphinx example and a module that's similar to our cache. ~/sphinx-ex/ or whatever needs to be added to PYTHONPATH and then "make clean html" in the docs directory should get there (untested on Windows). Don't understand why the __init__ shows up as a method (but not in statsmodels). Still not sure how to go about using autosummary with the decorated attributes-cum-methods. Probably have to explicitly handle this, but I need to play around more before I really understand it.

repo here: https://code.launchpad.net/sphinx-ex

Revision history for this message
Skipper Seabold (jsseabold) wrote :

Also, might be easier just to write explicit documentation for the results, though this might get annoying as the package matures.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.