Skip to content

Commit

Permalink
override plugin links (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry authored Sep 1, 2023
1 parent fdd001a commit 4d84dd8
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lcviz/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions lcviz/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lcviz/plugins/export_plot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .export_plot import * # noqa
11 changes: 11 additions & 0 deletions lcviz/plugins/export_plot/export_plot.py
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion lcviz/plugins/frequency_analysis/frequency_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <frequency_ananlysis>` for more details.
Expand Down
1 change: 1 addition & 0 deletions lcviz/plugins/markers/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions lcviz/plugins/metadata_viewer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .metadata_viewer import * # noqa
11 changes: 11 additions & 0 deletions lcviz/plugins/metadata_viewer/metadata_viewer.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lcviz/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions lcviz/plugins/subset_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .subset_plugin import * # noqa
11 changes: 11 additions & 0 deletions lcviz/plugins/subset_plugin/subset_plugin.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 4d84dd8

Please sign in to comment.