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

Cleaner left-hand table-of-contents for API reference #499

Open
delucchi-cmu opened this issue Nov 14, 2024 · 3 comments
Open

Cleaner left-hand table-of-contents for API reference #499

delucchi-cmu opened this issue Nov 14, 2024 · 3 comments

Comments

@delucchi-cmu
Copy link
Contributor

Looking at the HATS RTD, the menu options in the left-hand-side for the API reference have a lot of unnecessary duplication:

API reference
└── hats
    ├── hats.catalog
    ├── hats.inspection
    └── ...

I would really love if we could have it be simpler:

hats API reference
├── catalog
├── inspection
└── ... 

this includes the package name in the top-level, and omits the package name from the submodule names.

I don't even know if sphinx/autoapi supports this, but I can dream, right?

@OliviaLynn
Copy link
Member

Initial search shows: https://stackoverflow.com/questions/20864406/remove-package-and-module-name-from-sphinx-function but am in the meeting so can't follow up rn

@OliviaLynn
Copy link
Member

OliviaLynn commented Jan 27, 2025

A quick follow up—adding add_module_names = False to conf.py then running make html is not resulting in any change to the sidebar.

Looks like we may need to be a slightly more involved approach for hats—though the second answer in the stack overflow I posted above seems to be a promising strategy. (However, I'm not sure this would abstract very well if we tried to implement it in the PPT.)

As this is now in backlog, I'm holding off on further exploration.

@delucchi-cmu
Copy link
Contributor Author

Those warnings show up now, even without any changes you're talking about (e.g. this docs build). I think it comes from some convenience aliasing of commonly-used classes. I'm getting really good at visually ignoring them when I build docs =D

If you're able to get the nicer table-of-contents, but you see these warnings, that sounds awesome!

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