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

[bug] Incorrect order for object added to the toctree #308

Closed
ain-soph opened this issue Oct 16, 2021 · 3 comments
Closed

[bug] Incorrect order for object added to the toctree #308

ain-soph opened this issue Oct 16, 2021 · 3 comments

Comments

@ain-soph
Copy link

ain-soph commented Oct 16, 2021

Potential Bug:

Not quite sure if it's related to #283

RST file:

https://github.com/ain-soph/alpsplot/blob/main/docs/source/figure.rst

autoclass:: alpsplot.figure.Figure introduces a class Figure with many methods.
automodule:: alpsplot.figure involves 2 headings (Linestyles and Markers) with some texts.

.. _alpsplot.figure:

alpsplot.figure
==================================

.. currentmodule:: alpsplot.figure

.. autoclass:: alpsplot.figure.Figure
    :members:

.. automodule:: alpsplot.figure
   :no-members:
   :no-inherited-members:

Deployment:

https://ain-soph.github.io/alpsplot/figure.html#alpsplot.figure.Figure
image

Expected Order:

  • Figure
  • Linestyles
  • Markers

Actual Order:

  • Linestyles
  • Markers
  • Figure

Additional Material

My conf.py if you think might be helpful.
https://github.com/ain-soph/alpsplot/blob/main/docs/source/conf.py

Extension settings at
https://github.com/ain-soph/alpsplot/blob/ae99a09f5af0d1b1044a71ce87b0c06cbdd17428/docs/source/conf.py#L52-L63

and autodoc, autoapi settings at
https://github.com/ain-soph/alpsplot/blob/ae99a09f5af0d1b1044a71ce87b0c06cbdd17428/docs/source/conf.py#L97-L104

@ain-soph
Copy link
Author

I'm not sure if this bug is a feature of sphinx, which is related to an optional argument:

https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html#cmdoption-sphinx-apidoc-M

@ain-soph
Copy link
Author

ain-soph commented Oct 16, 2021

My guess is that method add_domain_to_toctree always inserts the object node as the last elements.

def add_domain_to_toctree(app, doctree, docname):

@AWhetter
Copy link
Collaborator

This does seem to be that same problem as #283 so I'm going to close this in favour of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants