-
-
Notifications
You must be signed in to change notification settings - Fork 43
Method summary table in HTML docs is empty #172
Conversation
Sorry, at first I thought you meant the attribute summary (since some of the attributes appear to be missing docstrings). But now I see what you mean. |
If I can figure this out quickly it would be good to have fixed for v1.1. |
So on the referenced Table docs (for example) the page source contains:
So it should be showing the autosummary for those methods. It's strange also that it's working for the attributes summary but now for the methods summary. The docs are being built with Sphinx 1.3.1 on RTD, so it should just be using the original autosummary from Sphinx (as opposed to the old Astropy wrapper around it). So this could be a bug in Sphinx? Not sure though... |
@embray @cdeil - I took a look at this, and I don't think this is a sphinx problem: at least in
That is, sphinx is just reading the docstring for those attributes and finding no docstring: that's because they are all properties without any docstring defined. So the "fix" is instead to go and document the property in astropy core. Or are there other examples where there's actually a docstring but the table isn't printing them? If not, I think this issue can be closed without change (but certainly a new column issue could be made to document these properties) |
@eteq I think you misread the problem. The problem is with the "Methods Summary", not the "Attributes Summary". |
I confirmed that the Methods Summary is generated just fine when building with Sphinx 1.2, but breaks on Sphinx 1.3, so definitely something changed in Sphinx to make this stop working. |
Ah, I see--this is related to the comment I made way back in March here: sphinx-doc/sphinx#1061 (comment) There have been many other issues related to this. I'll dig around to see if there's an existing solution... |
Okay, this was fixed in sphinx-doc/sphinx#1892. I'll see if I can come up with a workaround... (should be easy enough with a small monkey-patch to Autosummary I think...) |
D'oh--this is actually the same problem that 27f2924 was meant to work around. I'm sure the workaround used to work, so I'm not sure why it's stopped working...? |
I see now. I fixed this for the Automodsumm extension that we wrote (which is based on Autosummary). However, this is a case of the same bug affecting the plain Autosummary extension. Ironically we used to ship our own version of Autosummary (which added some features missing from the original version), but I deprecated it since we didn't need it for Sphinx 1.2. However Sphinx 1.3 contains a new bug so I guess we need to override the base Autosummary again.... :( |
…inx. Because the bug is present in Sphinx 1.3.1, but is fixed in its master branch, we presume the next release of Sphinx will include the fix and this patch won't be needed.
The attached patch fixes it. Since this is just a workaround to an upstream bug I haven't attached a test, but I have confirmed manually that this fixes it. |
@embray - oops, yeah, you're right, I was confused about the actual problem here. Curiously enough, I independently fixed the exact same problem just yesterday in a much hackier way (astropy/halotools#245). This is definitely a better solution! Looks good to me assuming the tests pass. |
Oops--too bad about the wasted duplicate effort. |
Method summary table in HTML docs is empty
This was merged to master before 1.1.0 no matter what the release scripts say (was part of a nested master merge, thus not picked up). |
Method summary table in HTML docs is empty
Method summary table in HTML docs is empty
The method summary table in the HTML docs is empty:
Example: http://astropy.readthedocs.org/en/latest/api/astropy.table.Table.html

I think this affects all Astropy classes and affiliated packages (at least it does in Gammapy).
@eteq @embray Any idea how to fix that?