Ivadomed: Unpleasing display of docstring's attributes in RTD

Created on 23 Jun 2020  路  4Comments  路  Source: ivadomed/ivadomed

Attributes appear with the same font and size as methods which is not aesthetic (See images in the comment: https://github.com/ivadomed/ivadomed/pull/313#pullrequestreview-435850180).

Adding a custom css should solve this problem.

documentation

Most helpful comment

the author also mentions "Instead, we may patch it at runtime to achieve the desired behavior. Adding the following code in doc.py will achieve this", would that be a better alternative?

:tada:
image

All 4 comments

This is a known "issue" https://github.com/sphinx-doc/sphinx/issues/2115. One way to improve the display is to add the line napoleon_use_ivar = True in the conf.py file. The header is Variables instead of Attributes :
image

It is still much better than the previous display. Someone commented this to resolve the Variable to Attibrutes issue: https://michaelgoerz.net/notes/extending-sphinx-napoleon-docstring-sections.html

But this requires forking the Napoleon extension code.

But this requires forking the Napoleon extension code.

the author also mentions "Instead, we may patch it at runtime to achieve the desired behavior. Adding the following code in doc.py will achieve this", would that be a better alternative?

the author also mentions "Instead, we may patch it at runtime to achieve the desired behavior. Adding the following code in doc.py will achieve this", would that be a better alternative?

:tada:
image

Check with @andreanne-lemay, apparently this has been fixed a while back already. Everything looks pretty on IvadoMed.org anyway. 馃嵃

Was this page helpful?
0 / 5 - 0 ratings