[docs] Fix Sphinx issue with linkless summaries#3284
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3284 +/- ##
==========================================
+ Coverage 85.29% 85.40% +0.10%
==========================================
Files 52 52
Lines 5517 5517
==========================================
+ Hits 4706 4712 +6
+ Misses 811 805 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
I will try to take a closer look later in the week and see if I can remember how to get autogenerated class docs working. But in the meantime, I noticed that the CSS for the class listing seems to be off in the demo build: https://tiledbsoma.readthedocs.io/en/kerl-fix-sphinx-linkless-summaries/python-tiledbsoma.html#classes
|
|
Thanks @ivirshup ! Can you please be more specific about
? I don't know what to try to fix ... |
8a99f68 to
00839da
Compare
ryan-williams
left a comment
There was a problem hiding this comment.
Approving to unblock, will try to figure out how to get Sphinx to auto-generate the things we want it to, async…
This is great, thanks @ryan-williams !! Also recall as I noted above, I don't entirely dislike having to spell more things out -- it lets us put methods in more intuitive order. And honestly, the more I think about it, maybe I don't even really want fully autogenerated docs as much I had (very recently!) thought I did ... having an environment where manual curation is allowed and encouraged, I feel like this will improve the quality of the docs ...... |

Issue and/or context: Ongoing work as part of #3282. Also fixes #3227.
Problem
What's right
tiledbsoma.MeasurementThis is a link; click it and you get here: https://tiledbsoma.readthedocs.io/en/stable/_autosummary/tiledbsoma.Measurement.html#tiledbsoma.Measurement
Docstrings are present for the class -- full docstrings and not just the first summary sentence
What's wrong
add_new_collectionAnalysis
At the first level we have hand-written
.rstlike this:We keystroke out
At the next level, we're letting autogen recurse for us and create
.rstfiles. The.rstfiles that are auto-generated are missing this line:I spent the morning debugging, experimenting with
sphinx-autogenandsphinx-apidoc, copy/pasting examples out of the Sphinx docs, playing with the:recursive:tag, doingpip install -Uof every Sphinx package on my system, etc. -- and I came to the following conclusions::toctree: dirnamegoeshereline on the.rstfiles it generates.:toctree: dirnamegoesherelines, and am adding them to source control.Changes:
As above.
Notes for Reviewer:
This means more manual editng when we create new classes/methods. However, there is already a non-zero amount of manual edits necessary: #3283 is a case in point. I would love to have fully automated/hands-off code -> doc generation but we simply do not have that at present. I will take a method with one more manual step, that produces correct and useful documentation, over a method one with one fewer manual step that produces incomplete and misleading documentation.
To view the docs: please compare
Note this second link is on what readthedocs calls a "hidden branch" which I created as a manual one-off for this PR review.
PR stacking as of today:
main.rstfiles #3283