-
Notifications
You must be signed in to change notification settings - Fork 25
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
[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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.Measurement
This 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_collection
Analysis
At the first level we have hand-written
.rst
like this:We keystroke out
At the next level, we're letting autogen recurse for us and create
.rst
files. The.rst
files that are auto-generated are missing this line:I spent the morning debugging, experimenting with
sphinx-autogen
andsphinx-apidoc
, copy/pasting examples out of the Sphinx docs, playing with the:recursive:
tag, doingpip install -U
of every Sphinx package on my system, etc. -- and I came to the following conclusions::toctree: dirnamegoeshere
line on the.rst
files it generates.:toctree: dirnamegoeshere
lines, 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
.rst
files #3283