ENH: Add :only: option for code cells#629
ENH: Add :only: option for code cells#629tuncbkose wants to merge 6 commits intoexecutablebooks:mainfrom
:only: option for code cells#629Conversation
|
I'm not sure yet if this will be widely used for notebooks, but cannot hurt the addition. Pending that tests and documentation will be added to this PR. |
|
While adding the test, I added a |
|
There are two errors, 1 is a typo I made and the other is about that Tex file naming issue as far as I can tell. Will take a closer look later. |
|
I haven't had a long think about this PR, but my initial sense is one of reluctance to merge it. The I wonder here whether a post-process tool would be better suited, e.g. https://github.com/agoose77/sphinx-builder-classes. This extension allows you to add classes to your directives that are ignored for particular builders. |
|
I understand if there may be good reasons not to merge this, but as far as I understand About the link, post-processing doesn't always help when you need the code outputs to be dependent on the builder. I appreciate that this is not a straightforward thing to implement in the best way, but maybe something flagged as experimental may be ok, following |
:only: option for code cells:only: option for code cells
I made this primarily for myself but thought should make a PR if there would be any interest in merging. I'm happy to add tests/documentation, but I'd like to get an OK that the implementation is fine first.
Also, as far as I can tell,
NbParserConfig.builder_nameisn't used by anything, so I just co-opted it.