docs: deduplicate louvain and leiden parameter docs#3986
docs: deduplicate louvain and leiden parameter docs#3986flying-sheep merged 10 commits intoscverse:mainfrom
Conversation
Extracts shared clustering parameter doc blocks into tools/_docs.py and injects them into tl.louvain and tl.leiden via _doc_params. Signed-off-by: LarytheLord <llawlietbagsum@gmail.com>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3986 +/- ##
==========================================
+ Coverage 77.94% 77.96% +0.01%
==========================================
Files 117 118 +1
Lines 12506 12517 +11
==========================================
+ Hits 9748 9759 +11
Misses 2758 2758
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
CI status note from my side:
I don’t have permissions to rerun repository workflows from my forked PR context, but I can push follow-up changes immediately if you want any adjustment on this patch itself. |
|
Pushed a follow-up CI fix in commit
This targets the error from failed jobs: I still can’t apply labels/milestones from this fork context, so the separate |
|
I just added the milestone, and I’m working on the hatch thing, so no worries about that one. |
|
Pushed follow-up commit
The RTD raw log for the failed build showed the same incompatibility seen earlier in CI: Re-checking CI/RTD on this commit now. |
|
Pushed another follow-up commit From the latest RTD raw log (
I updated the This is docs/rendering-only and should clear the current RTD blocker. |
|
One more follow-up commit pushed:
This keeps lint clean while still avoiding the RTD/docutils |
|
Quick note on the remaining failing I inspected the failed job log for run The benchmark setup cache step fails while fetching remote benchmark registry metadata from Figshare:
The same job then exits with status 2 ( Other previously failing gates on this PR ( |
|
You don’t need to worry about all that. In case you care: |
|
Thanks for the correction. I pushed I also ran |
|
these changes will all become merge conflicts once I fix this on the main branch: as said, I’ll fix things and in a few minutes this PR can stick to exclusively what its title says 😉 |
|
Good call, thanks for the heads-up. I pushed
So this PR is back to the louvain/leiden docs dedup change set (plus the release-note fragment required by your PR checks). |
|
Great! The fix is now on |
|
Thanks! |
…den parameter docs) (#4046) Co-authored-by: Abi <llawlietbagsum@gmail.com>
Summary
This PR addresses #570 by deduplicating shared parameter docs between
tl.louvainandtl.leiden.Changes
src/scanpy/tools/_docs.pywith shared clustering parameter doc blocks:adatarandom_staterestrict_toadjacencyneighbors_keyobspsrc/scanpy/tools/_louvain.pyto inject shared docs with_doc_params.src/scanpy/tools/_leiden.pyto inject the same shared docs with_doc_params.The function-specific documentation (e.g. flavor options and partition details) remains unchanged.
Validation
python3 -m compileall src/scanpy/tools/_docs.py src/scanpy/tools/_louvain.py src/scanpy/tools/_leiden.pypytestis not installed.Closes #570