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

Fix some sphinx issues #1279

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Fix some sphinx issues #1279

merged 2 commits into from
Feb 16, 2024

Conversation

pgunn
Copy link
Member

@pgunn pgunn commented Feb 16, 2024

This PR is an attempt to fix some of the sphinx rendering issues - namely the issues with the core functions having sections but no functions/methods showing up.

It does NOT fix all the issues we're aware of, particularly the ReadTheDocs broken links for non-function-reference stuff, but those will take some thought and a redesign.

At least with the local rendering, things look good. This can be reproduced with a source tree by:

  1. activating whatever environment is used (I use caibuild for my compiled caiman environment)
  2. doing mamba install -c conda-forge sphinx numpydoc
  3. cd docs
  4. sphinx-build -M html source html
  5. Point your browser at the docs generated under html/html

For iterating over errors while changing and fixing things, I replace step 4 with:

pushd .. ; pip install . ; popd ; rm -rf html ; clear ; sphinx-build -M html source html 2>&1 | less

and look for the word ERROR (and at any warnings you see, if you like).

The bulk of this is fixing fiddly comment formatting; sphinx has very particular expectations on how docstrings must be formatted for functions for them to be turned into docs, and I only somewhat understand the rules, but this gets rid of all errors I see when running locally and the functions turn up locally too.

@pgunn pgunn changed the base branch from main to dev February 16, 2024 20:27
@pgunn
Copy link
Member Author

pgunn commented Feb 16, 2024

This diff changes no real functional code, so the chances of breaking something are pretty much nil. It's also what I suspect is both unobjectionable and uninteresting to anybody; will probably land this later today or tomorrow unless anyone objects; if it looks good on RTD we may do a release just to get this into the main branch there (will be a very uninteresting release, but that's okay).

@pgunn pgunn merged commit 30aafba into dev Feb 16, 2024
3 checks passed
@pgunn
Copy link
Member Author

pgunn commented Feb 16, 2024

We'll want to verify by seeing what RTD does with this, but this should solve #997

@pgunn pgunn mentioned this pull request Feb 16, 2024
@pgunn pgunn deleted the dev-fix_sphinx branch March 5, 2024 20:57
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

Successfully merging this pull request may close these issues.

1 participant