Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx puts class properties in odd places on the page #4660

Closed
pp-mo opened this issue Mar 24, 2022 · 3 comments
Closed

Sphinx puts class properties in odd places on the page #4660

pp-mo opened this issue Mar 24, 2022 · 3 comments

Comments

@pp-mo
Copy link
Member

pp-mo commented Mar 24, 2022

We seemed to have a problem with Sphinx putting multiple class parameters on one line, sometimes with really rather nasty effect ...
E.G https://scitools-iris.readthedocs.io/en/v3.2.1/generated/api/iris/common/mixin.html#iris.common.mixin.CFVariableMixin.attributes)
(which is really a bit of a car-crash)

This example is notable for re-appearing in all the inheriting classes, but the appearance varies,
E.G. https://scitools-iris.readthedocs.io/en/v3.2.1/generated/api/iris/coords.html#iris.coords.CellMeasure.standard_name

I don't really have any clue why this is or when it started, but possibly it came in with the Napoleon extension??

I did wonder if we could stop it by just ensuring blank lines between them, but it looks like we already have that.
https://github.com/SciTools/iris/blob/main/lib/iris/common/mixin.py#L148-L167

@pp-mo pp-mo changed the title API puts class properties in odd places on the page Sphinx puts class properties in odd places on the page Mar 24, 2022
@tkknight
Copy link
Contributor

The new pydata theme adoption appears to alleviate this for mixin but looks the same for coords.

I think the spacing in the comments varies across our codebase that can cause inconsistencies in how it is rendered. The custom API generation may not be helping too.

@pp-mo
Copy link
Member Author

pp-mo commented Apr 11, 2022

new pydata theme adoption appears to alleviate this for mixin but looks the same for coords.

For me, it seemed to have also fixed the problem I highlighted for CellMeasure, and maybe is entirely OK now ?
The pink highlighting makes individual items stand out much clearer, too. 👍

@tkknight
Copy link
Contributor

tkknight commented Apr 11, 2022

I suggest we can close this issue now @pp-mo ?

@pp-mo pp-mo closed this as completed Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants