Seeking path forward for sharing custom extensions (e.g. sharing LaTeXLabel custom model)
See original GitHub issueWith the added support for external resources, we’ve added a route to generate LaTeX through the KaTeX library. Currently there’s a custom model example here.
We’re not likely to add LaTeX support (via KaTeX) to the core library because it would require adding 175kb (153kb JS + 22kb CSS) of resources and increase the minified library about ~20%, for a feature that only a subset of users need. This situation of wanting features that require external resources that make it unlikely to be merged into the core library is increasingly common in Bokeh (another example is adding Ion slider support).
So we need to find a solution to simplify finding/creating/sharing custom extensions.
I can imagine a sister repository of custom extensions that is downloaded programmatically (similar to how sample data is downloaded) to a bokeh.ext
directory. Then users would be able to import from there via from bokeh.ext import LaTeX
or similar.
In terms of doing the above, what would need to be included in the sister repo? A module containing:
- the custom extension implementation
- a README
- an example file whose output could also be placed in a gallery page somewhere for discoverability?
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (13 by maintainers)
Top GitHub Comments
The position we’ve wound up taking with both IPython and Jupyter is that reinventing package management is not worth any apparent benefits. It looks like you’re building something simpler at first, but if it actually gets any significant use, pretty soon you’ve wound up reinventing package management badly. Unfortunately I don’t have time to read and process all of the specific arguments in this thread, but from the outside it doesn’t seem like Bokeh is so unusual as to be an exception.
Specific points I saw:
As it stands anyone can create a pip (or conda) package to define a bokeh custom extension, including pinning to Bokeh version if appropriate. I had grander visions of a searchable plugin system ala VSCode, Sublime, or Atom, but realistically, that’s probably not going to happen.