Skip to content

add a Sphinx extension - #37

Merged
ilia-kats merged 20 commits into
mainfrom
sphinx_plugin
Jun 17, 2026
Merged

ilia-kats merged 20 commits into
mainfrom
sphinx_plugin

Conversation

@ilia-kats

@ilia-kats ilia-kats commented May 29, 2026 •

Copy link
Copy Markdown
Collaborator

As discussed in #12 and #25, this adds a Sphinx extension to do all the docstring processing that we're currently doing at import time. Docstrings are no longer modified or created at import time at all. The upside is that arguments like docstring_style or exported_object_name are now obsolete, since docstring_style can be read from the Sphinx config and exported_object_name is passed by autodoc. I kept the arguments as no-ops for backwards compatibility, but would like to remove them soon.

Rendered

@ilia-kats
ilia-kats requested a review from flying-sheep May 29, 2026 12:09
@codecov

codecov Bot commented May 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.15736% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.53%. Comparing base (e76f111) to head (0a6044d).
⚠️ Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
src/scverse_misc/sphinx_ext/__init__.py 65.07% 44 Missing ⚠️
src/scverse_misc/_utils.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #37       +/-   ##
===========================================
- Coverage   98.08%   85.53%   -12.55%     
===========================================
  Files           5        6        +1     
  Lines         313      401       +88     
===========================================
+ Hits          307      343       +36     
- Misses          6       58       +52     
Files with missing lines Coverage Δ
src/scverse_misc/_deprecated.py 100.00% <100.00%> (ø)
src/scverse_misc/_extensions.py 85.71% <100.00%> (-10.44%) ⬇️
src/scverse_misc/_settings.py 97.75% <100.00%> (-0.51%) ⬇️
src/scverse_misc/_utils.py 97.67% <93.75%> (+1.00%) ⬆️
src/scverse_misc/sphinx_ext/__init__.py 65.07% <65.07%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ilia-kats ilia-kats linked an issue May 29, 2026 that may be closed by this pull request

@flying-sheep flying-sheep left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m still a tired from flying, so I didn’t go into depth, but I think I caught a few important parts already.

Comment thread docs/sphinx_ext_examples/package.py Resolved
Comment thread docs/sphinx_ext.md Resolved
Comment thread src/scverse_misc/_settings.py Resolved
Comment thread pyproject.toml Resolved
Comment thread src/scverse_misc/sphinx_ext/__init__.py Resolved
Comment thread src/scverse_misc/_extensions.py Resolved
Comment thread src/scverse_misc/_deprecated.py Resolved
Comment thread src/scverse_misc/sphinx_ext/__init__.py Resolved
Comment thread src/scverse_misc/sphinx_ext/__init__.py Resolved
Comment thread src/scverse_misc/_extensions.py Resolved
ilia-kats and others added 5 commits June 17, 2026 10:08
this makes the module name in the rendered docs show up as 'package'
instead of 'settings'
__scverse_misc_canonical_instance_name__

and simplify pydocstring-rs code
@ilia-kats
ilia-kats requested a review from flying-sheep June 17, 2026 08:27
@ilia-kats
ilia-kats merged commit 234a419 into main Jun 17, 2026
8 checks passed
@ilia-kats
ilia-kats deleted the sphinx_plugin branch June 17, 2026 12:11
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.

Docs showcase

2 participants