MRG, ENH: Provide sub-extension sphinx_gallery.load_style#601
MRG, ENH: Provide sub-extension sphinx_gallery.load_style#601larsoner merged 5 commits intosphinx-gallery:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #601 +/- ##
==========================================
- Coverage 97.64% 97.43% -0.21%
==========================================
Files 29 31 +2
Lines 3097 3120 +23
==========================================
+ Hits 3024 3040 +16
- Misses 73 80 +7
Continue to review full report at Codecov.
|
|
In case somebody is interested in a concrete use case: spatialaudio/nbsphinx#392. |
|
Looks reasonable to me. It would be nice not to take a coverage hit, though. Can you add a test? If it's not clear how to do it with the |
|
@larsoner Thanks! If you already know how a test could be added and if you have a bit of time to spare, it would be great if you could create a test. If not, I guess I could start experimenting with creating a test file similar to |
larsoner
left a comment
There was a problem hiding this comment.
Test added, LGTM +1 for merge
|
Thanks a lot @larsoner for writing the test! |
|
@lucyleeow feel free to merge if you're happy |
|
Or @choldgraf do you want to look? |
There was a problem hiding this comment.
LGTM, just the one nitpick (which isn't from this PR but while we are amending, might as well change it). It might be worthwhile to add a note to the documentation too - maybe in advanced.rst or utils.rst (not sure which is more appropriate).
Sorry for the delay - had other work keeping me occupied.
Co-Authored-By: Lucy Liu <jliu176@gmail.com>
|
Thanks @mgeier ! |
|
Thanks for merging! |
As discussed in #599 (comment), this enables following usage in
conf.py:... which only loads the CSS style and sets the corresponding static directory. Nothing else.
For now, this provides a minimal solution without any configuration options.
@larsoner suggested in #599 (comment) to add configurability:
I think we don't need that yet, because for now there aren't even multiple styles, there's only one.
I think configurability can be added later (when needed), an example for a possible implementation is in 2d65445.
In case anyone is wondering what's the use case for this, here's some explanations: #317 (comment).
The "normal" use of SG should not be affected by this in any way.