From 163b4189a078d0f06f8263e96c44dd9a46b1087d Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 1 Sep 2023 10:12:44 -0400 Subject: [PATCH] override plugin links * to point to lcviz docs instead of jdaviz --- lcviz/helper.py | 6 +++--- lcviz/plugins/__init__.py | 3 +++ lcviz/plugins/export_plot/__init__.py | 1 + lcviz/plugins/export_plot/export_plot.py | 11 +++++++++++ .../plugins/frequency_analysis/frequency_analysis.py | 2 +- lcviz/plugins/markers/markers.py | 1 + lcviz/plugins/metadata_viewer/__init__.py | 1 + lcviz/plugins/metadata_viewer/metadata_viewer.py | 11 +++++++++++ lcviz/plugins/plot_options/plot_options.py | 1 + lcviz/plugins/subset_plugin/__init__.py | 1 + lcviz/plugins/subset_plugin/subset_plugin.py | 11 +++++++++++ 11 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 lcviz/plugins/export_plot/__init__.py create mode 100644 lcviz/plugins/export_plot/export_plot.py create mode 100644 lcviz/plugins/metadata_viewer/__init__.py create mode 100644 lcviz/plugins/metadata_viewer/metadata_viewer.py create mode 100644 lcviz/plugins/subset_plugin/__init__.py create mode 100644 lcviz/plugins/subset_plugin/subset_plugin.py diff --git a/lcviz/helper.py b/lcviz/helper.py index a82d8817..59fc5c66 100644 --- a/lcviz/helper.py +++ b/lcviz/helper.py @@ -110,9 +110,9 @@ class LCviz(ConfigHelper): 'dense_toolbar': False, 'context': {'notebook': {'max_height': '600px'}}}, 'toolbar': ['g-data-tools', 'g-subset-tools', 'lcviz-coords-info'], - 'tray': ['g-metadata-viewer', 'lcviz-plot-options', 'g-subset-plugin', - 'lcviz-markers', 'flatten', 'frequency analysis', 'ephemeris', - 'g-export-plot'], + 'tray': ['lcviz-metadata-viewer', 'lcviz-plot-options', 'lcviz-subset-plugin', + 'lcviz-markers', 'flatten', 'frequency-analysis', 'ephemeris', + 'lcviz-export-plot'], 'viewer_area': [{'container': 'col', 'children': [{'container': 'row', 'viewers': [{'name': 'flux-vs-time', diff --git a/lcviz/plugins/__init__.py b/lcviz/plugins/__init__.py index 33815021..c9180ba3 100644 --- a/lcviz/plugins/__init__.py +++ b/lcviz/plugins/__init__.py @@ -1,6 +1,9 @@ from .coords_info.coords_info import * # noqa from .ephemeris.ephemeris import * # noqa +from .export_plot.export_plot import * # noqa from .flatten.flatten import * # noqa from .frequency_analysis.frequency_analysis import * # noqa from .markers.markers import * # noqa +from .metadata_viewer.metadata_viewer import * # noqa from .plot_options.plot_options import * # noqa +from .subset_plugin.subset_plugin import * # noqa diff --git a/lcviz/plugins/export_plot/__init__.py b/lcviz/plugins/export_plot/__init__.py new file mode 100644 index 00000000..dbcfe9b4 --- /dev/null +++ b/lcviz/plugins/export_plot/__init__.py @@ -0,0 +1 @@ +from .export_plot import * # noqa diff --git a/lcviz/plugins/export_plot/export_plot.py b/lcviz/plugins/export_plot/export_plot.py new file mode 100644 index 00000000..e4a010fb --- /dev/null +++ b/lcviz/plugins/export_plot/export_plot.py @@ -0,0 +1,11 @@ +from jdaviz.configs.default.plugins import ExportViewer +from jdaviz.core.registries import tray_registry + +__all__ = ['ExportViewer'] + + +@tray_registry('lcviz-export-plot', label="Export Plot") +class ExportViewer(ExportViewer): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#export-plot" diff --git a/lcviz/plugins/frequency_analysis/frequency_analysis.py b/lcviz/plugins/frequency_analysis/frequency_analysis.py index 2d31c320..d08a5b7e 100644 --- a/lcviz/plugins/frequency_analysis/frequency_analysis.py +++ b/lcviz/plugins/frequency_analysis/frequency_analysis.py @@ -13,7 +13,7 @@ __all__ = ['FrequencyAnalysis'] -@tray_registry('frequency analysis', label="Frequency Analysis") +@tray_registry('frequency-analysis', label="Frequency Analysis") class FrequencyAnalysis(PluginTemplateMixin, DatasetSelectMixin, PlotMixin): """ See the :ref:`Frequency Analysis Plugin Documentation ` for more details. diff --git a/lcviz/plugins/markers/markers.py b/lcviz/plugins/markers/markers.py index c7b74589..e94da024 100644 --- a/lcviz/plugins/markers/markers.py +++ b/lcviz/plugins/markers/markers.py @@ -16,6 +16,7 @@ class Markers(Markers): def __init__(self, *args, **kwargs): kwargs['headers'] = ['time', 'phase', 'ephemeris', 'flux', 'viewer'] super().__init__(*args, **kwargs) + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#markers" @property def coords_info(self): diff --git a/lcviz/plugins/metadata_viewer/__init__.py b/lcviz/plugins/metadata_viewer/__init__.py new file mode 100644 index 00000000..c257943f --- /dev/null +++ b/lcviz/plugins/metadata_viewer/__init__.py @@ -0,0 +1 @@ +from .metadata_viewer import * # noqa diff --git a/lcviz/plugins/metadata_viewer/metadata_viewer.py b/lcviz/plugins/metadata_viewer/metadata_viewer.py new file mode 100644 index 00000000..0d35f704 --- /dev/null +++ b/lcviz/plugins/metadata_viewer/metadata_viewer.py @@ -0,0 +1,11 @@ +from jdaviz.configs.default.plugins import MetadataViewer +from jdaviz.core.registries import tray_registry + +__all__ = ['MetadataViewer'] + + +@tray_registry('lcviz-metadata-viewer', label="Metadata") +class MetadataViewer(MetadataViewer): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#metadata-viewer" # noqa diff --git a/lcviz/plugins/plot_options/plot_options.py b/lcviz/plugins/plot_options/plot_options.py index 8f437f5a..775b36ee 100644 --- a/lcviz/plugins/plot_options/plot_options.py +++ b/lcviz/plugins/plot_options/plot_options.py @@ -8,6 +8,7 @@ class PlotOptions(PlotOptions): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#plot-options" @property def user_api(self): diff --git a/lcviz/plugins/subset_plugin/__init__.py b/lcviz/plugins/subset_plugin/__init__.py new file mode 100644 index 00000000..d65cc587 --- /dev/null +++ b/lcviz/plugins/subset_plugin/__init__.py @@ -0,0 +1 @@ +from .subset_plugin import * # noqa diff --git a/lcviz/plugins/subset_plugin/subset_plugin.py b/lcviz/plugins/subset_plugin/subset_plugin.py new file mode 100644 index 00000000..72e4a7a9 --- /dev/null +++ b/lcviz/plugins/subset_plugin/subset_plugin.py @@ -0,0 +1,11 @@ +from jdaviz.configs.default.plugins import SubsetPlugin +from jdaviz.core.registries import tray_registry + +__all__ = ['SubsetPlugin'] + + +@tray_registry('lcviz-subset-plugin', label="Subset Tools") +class SubsetPlugin(SubsetPlugin): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#subset-tools"