feat: Allow additional tools for sphinx_docs#1831
feat: Allow additional tools for sphinx_docs#1831rickeylev merged 1 commit intobazel-contrib:mainfrom
Conversation
|
Since sphinx is enabled in the next release Ithink this does not need an extrachngalog entry, but the docstring for the tools could include a short example with a particular plugin. Why the opts need expansion is still a little unclear to me. Is it that some plugins may expect the tools to be found in the PATH and that case would not be covered. To be honest, I am not super familiar with sphinx and these questions could be just my ignorance. |
Sure, something like this? |
rickeylev
left a comment
There was a problem hiding this comment.
Mostly lgtm, just need the extra_opts doc updated (I couldn't suggest an edit since it wasn't a modified line)
07fbcc9 to
a76a05c
Compare
Thanks, applied requested changes. |
When using some sphinx plugins they require that other (not necessarily Python) tools are available. One example is the plugin https://github.com/basejumpa/sphinxcontrib-umlet which requires that UMLet is somehow within the sandbox. My understanding is that the right way todo so is the following: 1st: Provide a way how additional tools can be passed to the action -> Done in this commit via the exposed tools attribute 2nd: Allow a way to configure the path to the tool -> Done with this commit via the ctx.expand_location for additional attributes Both changes should be backward compatible and enable a wider usage of the Sphinx rules.
Some Sphinx plugins require that other (not necessarily Python) tools are available.
One example is the plugin https://github.com/basejumpa/sphinxcontrib-umlet, which requires that UMLet is somehow within the sandbox.
toolsarg tosphinx_docsto allow passing in arbitrary toolsthat are made available at runtime
extra_opts, which allows passing thelocation of the tools onto sphinx.