From 7364fa1eca0bcfaa159a0ca4aeb1230f2985b6b3 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 16 Jul 2024 09:11:37 -0400 Subject: [PATCH 1/3] plugin vdocs to reuse app.vdos rather than repeating logic --- jdaviz/core/template_mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/core/template_mixin.py b/jdaviz/core/template_mixin.py index 07dae242d8..2ee5cc1b99 100644 --- a/jdaviz/core/template_mixin.py +++ b/jdaviz/core/template_mixin.py @@ -218,7 +218,7 @@ def __new__(cls, *args, **kwargs): obj.config = app.state.settings.get("configuration", "default") # give the vue templates access to jdaviz version - obj.vdocs = 'latest' if 'dev' in __version__ else 'v'+__version__ + obj.vdocs = app.vdocs # store references to all bqplot widgets that need to handle resizing obj.bqplot_figs_resize = [] From 242975c26e801a0a6c91771b1bd7697ad015b2fe Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 16 Jul 2024 11:31:45 -0400 Subject: [PATCH 2/3] default docs button to point to versioned docs (only applies when no config is detected) --- jdaviz/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index a03b197b6e..3c846eb7be 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -2601,7 +2601,7 @@ def load_configuration(self, path=None, config=None): if self.config in ALL_JDAVIZ_CONFIGS: self.docs_link = f'https://jdaviz.readthedocs.io/en/{self.vdocs}/{self.config}/index.html' # noqa else: - self.docs_link = 'https://jdaviz.readthedocs.io' + self.docs_link = f'https://jdaviz.readthedocs.io/en/{self.vdocs}' self.state.settings.update(config.get('settings')) From 8475a9ca3c0d3c728b74e2043259047c83858089 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 17 Jul 2024 08:43:57 -0400 Subject: [PATCH 3/3] remove unused import --- jdaviz/core/template_mixin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/jdaviz/core/template_mixin.py b/jdaviz/core/template_mixin.py index 2ee5cc1b99..afe0f7790d 100644 --- a/jdaviz/core/template_mixin.py +++ b/jdaviz/core/template_mixin.py @@ -39,7 +39,6 @@ from ipywidgets import widget_serialization from ipypopout import PopoutButton -from jdaviz import __version__ from jdaviz.components.toolbar_nested import NestedJupyterToolbar from jdaviz.core.custom_traitlets import FloatHandleEmpty from jdaviz.core.events import (AddDataMessage, RemoveDataMessage,