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

Remove Attributes + classes show no description #443

Open
Gabriel-p opened this issue May 7, 2024 · 3 comments
Open

Remove Attributes + classes show no description #443

Gabriel-p opened this issue May 7, 2024 · 3 comments
Labels

Comments

@Gabriel-p
Copy link

My documentation can be found here https://asteca.readthedocs.io/en/latest/autoapi/asteca/index.html

I have two issues:

  1. I'd like to remove the 'Attributes' section entirely as it is just duplicated info from 'Submodules'
  2. Classes descriptions randomly do not show (some builds it will, some it won't)

Can this be done? Thank you!

Captura de pantalla de 2024-05-07 17 22 27

@AWhetter
Copy link
Collaborator

AWhetter commented May 8, 2024

For (1), this page outlines how you can customise what gets documented: https://sphinx-autoapi.readthedocs.io/en/latest/how_to.html#how-to-customise-what-gets-documented
So you could either set an __all__ or filter out __version__ using a function connected to the autoapi-skip-member event.

For (2), it'll require some more investigation. It looks to be something going wrong in the autosummary directive because the class itself has the docstring. Maybe the fact that it's a dataclass is what's triggering the bug. Thanks for providing a way to reproduce the issue.

@AWhetter AWhetter added the Bug label May 8, 2024
@Gabriel-p
Copy link
Author

Thank you @AWhetter. I explained myself poorly, what I want is for the listing of classes at the bottom of that page to not be there.

Not only because it is repeated information, but also because it seems to introduce warnings such as:

/home/gabriel/Github/ASteCA/ASteCA/asteca/docs/autoapi/asteca/index.rst:199: WARNING: duplicate object description of asteca.cluster, other instance in autoapi/asteca/cluster/index, use :no-index: for one of them
/home/gabriel/Github/ASteCA/ASteCA/asteca/docs/autoapi/asteca/isochrones/index.rst:6: WARNING: duplicate object description of asteca.isochrones, other instance in autoapi/asteca/index, use :no-index: for one of them
/home/gabriel/Github/ASteCA/ASteCA/asteca/docs/autoapi/asteca/likelihood/index.rst:6: WARNING: duplicate object description of asteca.likelihood, other instance in autoapi/asteca/index, use :no-index: for one of them
/home/gabriel/Github/ASteCA/ASteCA/asteca/docs/autoapi/asteca/synthetic/index.rst:6: WARNING: duplicate object description of asteca.synthetic, other instance in autoapi/asteca/index, use :no-index: for one of them

that I don't know how to get rid of.

Also, it confuses the links. For example, if you go to https://asteca.readthedocs.io/en/latest/autoapi/asteca/synthetic/index.html# and click on asteca.cluster as shown below, it will take you here https://asteca.readthedocs.io/en/latest/autoapi/asteca/index.html#asteca.cluster instead of https://asteca.readthedocs.io/en/latest/autoapi/asteca/cluster/index.html

Captura de pantalla de 2024-05-08 09 08 21

@Gabriel-p
Copy link
Author

I see now that I can create my own API page and put whatever contents I want there, for example:

:py:mod:`asteca`
================


Package Contents
----------------

.. toctree::
   :titlesonly:
   :maxdepth: 2

   /../autoapi/asteca/cluster/index.rst
   /../autoapi/asteca/isochrones/index.rst
   /../autoapi/asteca/synthetic/index.rst
   /../autoapi/asteca/likelihood/index.rst

This solves the issue of Attributes being displayed but I still can not get rid of the autoapi/asteca/index.rst file which is causing the issues with the warnings and bad links that I described above.

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

No branches or pull requests

2 participants