Skip to content

class/function summary tables only show first line of docstrings - #231

Merged
eteq merged 2 commits into
astropy:masterfrom
eteq:docs/summary-table-sentence
Jun 12, 2012
Merged

eteq merged 2 commits into
astropy:masterfrom
eteq:docs/summary-table-sentence

Conversation

@eteq

@eteq eteq commented Jun 7, 2012

Copy link
Copy Markdown
Member

As discussed in #219, the tables generated by autosummary and automodapi only take the first line of the docstrings, rather than the first sentence or paragraph as is expected from the numpydoc standard.

@astrofrog

Copy link
Copy Markdown
Member

I put this question on stackoverflow, and it looks like there is an answer that could be useful: http://stackoverflow.com/questions/10718846/use-first-paragraph-instead-of-first-line-in-sphinx-autosummary

However, this might require that we bundle a modified autosummary (or we can submit it as a patch to sphinx).

@eteq

eteq commented Jun 7, 2012

Copy link
Copy Markdown
Member Author

It turned out to be possible to just copy over the relevant part of Autosummary to Automodsumm and fix it there. So these commits now fix the problem (using the suggestion in the response to the question @astrofrog asked on stackoverflow).

@taldcroft - note that I also had to slightly adjust some of the astropy.io.ascii classes because they were doing weird things in the summary tables. Let me know if any of these (small) changes should be altered.

@eteq

eteq commented Jun 8, 2012

Copy link
Copy Markdown
Member Author

And see https://bitbucket.org/birkenfeld/sphinx/issue/943/autosummary-doesnt-always-get-first - that fixes the issue in sphinx, so if it is adopted we could alter Automodsumm to only include this stuff if the sphinx version is too old.

@taldcroft

Copy link
Copy Markdown
Member

@eteq - No problem with the io.ascii doc changes.

@eteq

eteq commented Jun 12, 2012

Copy link
Copy Markdown
Member Author

I'll go ahead and merge this, and issue a second PR that address the issue I was waiting on fixing.

eteq added a commit that referenced this pull request Jun 12, 2012
fixes autosummary tables only showing first line of docstring
@eteq
eteq merged commit bdd8239 into astropy:master Jun 12, 2012
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
fixes autosummary tables only showing first line of docstring
@eteq
eteq deleted the docs/summary-table-sentence branch May 3, 2015 17:17
astrofrog pushed a commit to astropy/sphinx-automodapi that referenced this pull request Jan 27, 2018
…entence

fixes autosummary tables only showing first line of docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants