From c7bf1e8672594c7096694a89e57860dd8a8e87d0 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 4 Dec 2024 12:00:59 -0500 Subject: [PATCH 1/5] pin jdaviz 4.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 68999f5..cd822f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "astropy>=5.2", # NOTE: if/when we stop pinning a minor version of jdaviz, add jdaviz # to devdeps in tox.ini - "jdaviz>=4.0,<4.1", + "jdaviz>=4.1,<4.2", "lightkurve>=2.5.0", # NOTE: glue-jupyter is also pinned by jdaviz. "glue-jupyter>=0.22.2", From 07b58d20f7e8f6aaf194f091c03cb8192f0bd51b Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 4 Dec 2024 12:01:10 -0500 Subject: [PATCH 2/5] rename Subset Plugin --- lcviz/helper.py | 2 +- lcviz/plugins/__init__.py | 2 +- lcviz/plugins/subset_plugin/__init__.py | 1 - lcviz/plugins/subset_tools/__init__.py | 1 + .../subset_plugin.py => subset_tools/subset_tools.py} | 8 ++++---- 5 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 lcviz/plugins/subset_plugin/__init__.py create mode 100644 lcviz/plugins/subset_tools/__init__.py rename lcviz/plugins/{subset_plugin/subset_plugin.py => subset_tools/subset_tools.py} (81%) diff --git a/lcviz/helper.py b/lcviz/helper.py index 9e41ca9..fd2b77c 100644 --- a/lcviz/helper.py +++ b/lcviz/helper.py @@ -104,7 +104,7 @@ class LCviz(ConfigHelper): 'context': {'notebook': {'max_height': '600px'}}}, 'toolbar': ['g-data-tools', 'g-subset-tools', 'g-viewer-creator', 'lcviz-coords-info'], 'tray': ['lcviz-metadata-viewer', 'flux-column', - 'lcviz-plot-options', 'lcviz-subset-plugin', + 'lcviz-plot-options', 'lcviz-subset-tools', 'lcviz-markers', 'time-selector', 'stitch', 'flatten', 'frequency-analysis', 'ephemeris', 'binning', 'lcviz-export'], diff --git a/lcviz/plugins/__init__.py b/lcviz/plugins/__init__.py index bdde8f1..85245d9 100644 --- a/lcviz/plugins/__init__.py +++ b/lcviz/plugins/__init__.py @@ -12,4 +12,4 @@ from .metadata_viewer.metadata_viewer import * # noqa from .plot_options.plot_options import * # noqa from .stitch.stitch import * # noqa -from .subset_plugin.subset_plugin import * # noqa +from .subset_tools.subset_tools import * # noqa diff --git a/lcviz/plugins/subset_plugin/__init__.py b/lcviz/plugins/subset_plugin/__init__.py deleted file mode 100644 index d65cc58..0000000 --- a/lcviz/plugins/subset_plugin/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .subset_plugin import * # noqa diff --git a/lcviz/plugins/subset_tools/__init__.py b/lcviz/plugins/subset_tools/__init__.py new file mode 100644 index 0000000..692dd50 --- /dev/null +++ b/lcviz/plugins/subset_tools/__init__.py @@ -0,0 +1 @@ +from .subset_tools import * # noqa diff --git a/lcviz/plugins/subset_plugin/subset_plugin.py b/lcviz/plugins/subset_tools/subset_tools.py similarity index 81% rename from lcviz/plugins/subset_plugin/subset_plugin.py rename to lcviz/plugins/subset_tools/subset_tools.py index c2c2a7e..887c587 100644 --- a/lcviz/plugins/subset_plugin/subset_plugin.py +++ b/lcviz/plugins/subset_tools/subset_tools.py @@ -1,13 +1,13 @@ from traitlets import observe -from jdaviz.configs.default.plugins import SubsetPlugin +from jdaviz.configs.default.plugins import SubsetTools from jdaviz.core.registries import tray_registry -__all__ = ['SubsetPlugin'] +__all__ = ['SubsetTools'] -@tray_registry('lcviz-subset-plugin', label="Subset Tools") -class SubsetPlugin(SubsetPlugin): +@tray_registry('lcviz-subset-tools', label="Subset Tools") +class SubsetTools(SubsetTools): """ See the :ref:`Subset Plugin Documentation ` for more details. From c59d994359010f20d2096d8631c76f8d983a842e Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 4 Dec 2024 12:13:03 -0500 Subject: [PATCH 3/5] populate plugin descriptions --- lcviz/plugins/binning/binning.py | 1 + lcviz/plugins/binning/binning.vue | 2 +- lcviz/plugins/ephemeris/ephemeris.py | 1 + lcviz/plugins/ephemeris/ephemeris.vue | 2 +- lcviz/plugins/flatten/flatten.py | 2 +- lcviz/plugins/flatten/flatten.vue | 2 +- lcviz/plugins/flux_column/flux_column.py | 3 +++ lcviz/plugins/flux_column/flux_column.vue | 2 +- lcviz/plugins/frequency_analysis/frequency_analysis.py | 2 +- lcviz/plugins/frequency_analysis/frequency_analysis.vue | 2 +- lcviz/plugins/subset_tools/subset_tools.py | 2 ++ lcviz/plugins/time_selector/time_selector.py | 1 + 12 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lcviz/plugins/binning/binning.py b/lcviz/plugins/binning/binning.py index afa1ee3..d869e3c 100644 --- a/lcviz/plugins/binning/binning.py +++ b/lcviz/plugins/binning/binning.py @@ -55,6 +55,7 @@ class Binning(PluginTemplateMixin, FluxColumnSelectMixin, DatasetSelectMixin, def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self._plugin_description = 'Bin input light curve.' self._set_results_viewer() diff --git a/lcviz/plugins/binning/binning.vue b/lcviz/plugins/binning/binning.vue index 3193526..e2e13a7 100644 --- a/lcviz/plugins/binning/binning.vue +++ b/lcviz/plugins/binning/binning.vue @@ -3,7 +3,7 @@ :config="config" plugin_key="Binning" :api_hints_enabled.sync="api_hints_enabled" - description='Bin in time or phase-space.' + :description="docs_description || 'Bin input light curve in time or phase-space.'" :link="'https://lcviz.readthedocs.io/en/'+vdocs+'/plugins.html#binning'" :uses_active_status="uses_active_status" @plugin-ping="plugin_ping($event)" diff --git a/lcviz/plugins/ephemeris/ephemeris.py b/lcviz/plugins/ephemeris/ephemeris.py index 69e4c9c..d4e735c 100644 --- a/lcviz/plugins/ephemeris/ephemeris.py +++ b/lcviz/plugins/ephemeris/ephemeris.py @@ -122,6 +122,7 @@ class Ephemeris(PluginTemplateMixin, DatasetSelectMixin): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self._plugin_description = 'Ephemerides for phase-folding.' self._default_initialized = False self._ignore_ephem_change = False diff --git a/lcviz/plugins/ephemeris/ephemeris.vue b/lcviz/plugins/ephemeris/ephemeris.vue index 83b22c8..a67d873 100644 --- a/lcviz/plugins/ephemeris/ephemeris.vue +++ b/lcviz/plugins/ephemeris/ephemeris.vue @@ -3,7 +3,7 @@ :config="config" plugin_key="Ephemeris" :api_hints_enabled.sync="api_hints_enabled" - description='Find and refine ephemerides for phase-folding.' + :description="docs_description || 'Find and refine ephemerides for phase-folding.'" :link="'https://lcviz.readthedocs.io/en/'+vdocs+'/plugins.html#ephemeris'" :popout_button="popout_button"> diff --git a/lcviz/plugins/flatten/flatten.py b/lcviz/plugins/flatten/flatten.py index a353bae..7a75b6c 100644 --- a/lcviz/plugins/flatten/flatten.py +++ b/lcviz/plugins/flatten/flatten.py @@ -71,7 +71,7 @@ class Flatten(PluginTemplateMixin, FluxColumnSelectMixin, DatasetSelectMixin): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - + self._plugin_description = 'Flatten input light curve.' self.flux_label = AutoTextField(self, 'flux_label_label', 'flux_label_default', 'flux_label_auto', 'flux_label_invalid_msg') diff --git a/lcviz/plugins/flatten/flatten.vue b/lcviz/plugins/flatten/flatten.vue index bb0788e..d8b2aa2 100644 --- a/lcviz/plugins/flatten/flatten.vue +++ b/lcviz/plugins/flatten/flatten.vue @@ -3,7 +3,7 @@ :config="config" plugin_key="Flatten" :api_hints_enabled.sync="api_hints_enabled" - description='Remove long-term trends.' + :description="docs_description || 'Flatten input light curve to remove long-term trends.'" :link="'https://lcviz.readthedocs.io/en/'+vdocs+'/plugins.html#flatten'" :uses_active_status="uses_active_status" @plugin-ping="plugin_ping($event)" diff --git a/lcviz/plugins/flux_column/flux_column.py b/lcviz/plugins/flux_column/flux_column.py index cd18b49..be01540 100644 --- a/lcviz/plugins/flux_column/flux_column.py +++ b/lcviz/plugins/flux_column/flux_column.py @@ -29,6 +29,9 @@ class FluxColumn(PluginTemplateMixin, FluxColumnSelectMixin, DatasetSelectMixin) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + # description displayed under plugin title in tray + self._plugin_description = 'Choose flux column.' + # NOTE: may eventually want to add support for choosing the column for TPFs self.dataset.add_filter(is_not_tpf) diff --git a/lcviz/plugins/flux_column/flux_column.vue b/lcviz/plugins/flux_column/flux_column.vue index 8a6347b..d8b1263 100644 --- a/lcviz/plugins/flux_column/flux_column.vue +++ b/lcviz/plugins/flux_column/flux_column.vue @@ -3,7 +3,7 @@ :config="config" plugin_key="Flux Column" :api_hints_enabled.sync="api_hints_enabled" - description='Choose which column to use as flux across lcviz.' + :description="docs_description || 'Choose which column to use as flux across lcviz.'" :link="'https://lcviz.readthedocs.io/en/'+vdocs+'/plugins.html#flux-column'" :uses_active_status="uses_active_status" @plugin-ping="plugin_ping($event)" diff --git a/lcviz/plugins/frequency_analysis/frequency_analysis.py b/lcviz/plugins/frequency_analysis/frequency_analysis.py index c90c814..b2603b4 100644 --- a/lcviz/plugins/frequency_analysis/frequency_analysis.py +++ b/lcviz/plugins/frequency_analysis/frequency_analysis.py @@ -57,7 +57,7 @@ class FrequencyAnalysis(PluginTemplateMixin, DatasetSelectMixin, PlotMixin): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - + self._plugin_description = 'Frequency/period analysis.' self._ignore_auto_update = False # do not support data only in phase-space diff --git a/lcviz/plugins/frequency_analysis/frequency_analysis.vue b/lcviz/plugins/frequency_analysis/frequency_analysis.vue index 0f812ab..f60e716 100644 --- a/lcviz/plugins/frequency_analysis/frequency_analysis.vue +++ b/lcviz/plugins/frequency_analysis/frequency_analysis.vue @@ -3,7 +3,7 @@ :config="config" plugin_key="Frequency Analysis" :api_hints_enabled.sync="api_hints_enabled" - description='Frequency/period analysis.' + :description="docs_description" :link="'https://lcviz.readthedocs.io/en/'+vdocs+'/plugins.html#frequency_analysis'" :popout_button="popout_button"> diff --git a/lcviz/plugins/subset_tools/subset_tools.py b/lcviz/plugins/subset_tools/subset_tools.py index 887c587..0b15fde 100644 --- a/lcviz/plugins/subset_tools/subset_tools.py +++ b/lcviz/plugins/subset_tools/subset_tools.py @@ -22,6 +22,8 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.can_freeze = True + self._plugin_description = 'Tools for selecting and interacting with subsets.' + @observe('vdocs') def _update_docs_link(self, *args): self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#subset-tools" # noqa diff --git a/lcviz/plugins/time_selector/time_selector.py b/lcviz/plugins/time_selector/time_selector.py index 2677155..05db752 100644 --- a/lcviz/plugins/time_selector/time_selector.py +++ b/lcviz/plugins/time_selector/time_selector.py @@ -40,6 +40,7 @@ def __init__(self, *args, **kwargs): """ super().__init__(*args, **kwargs) self.plugin_key = "Time Selector" + self._plugin_description = 'Select active time across all viewers.' self.docs_description = "Select time to sync across all viewers (as an indicator in all time/phase viewers or to select the active slice in any image/cube viewers). The slice can also be changed interactively in any time viewer by activating the slice tool." # noqa self.value_label = 'Time' self.value_unit = 'd' From a3f994a9d67f9247dd3ccd7d5ba55008f1488b73 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 4 Dec 2024 12:23:18 -0500 Subject: [PATCH 4/5] use plugin-select and support API hint styling --- lcviz/plugins/ephemeris/ephemeris.vue | 30 +++++++------ lcviz/plugins/flux_column/flux_column.vue | 20 ++++----- .../frequency_analysis/frequency_analysis.vue | 42 +++++++------------ 3 files changed, 41 insertions(+), 51 deletions(-) diff --git a/lcviz/plugins/ephemeris/ephemeris.vue b/lcviz/plugins/ephemeris/ephemeris.vue index a67d873..7069bfb 100644 --- a/lcviz/plugins/ephemeris/ephemeris.vue +++ b/lcviz/plugins/ephemeris/ephemeris.vue @@ -120,18 +120,14 @@ hint="Select the light curve as input." /> - - - +
@@ -267,13 +263,21 @@ > diff --git a/lcviz/plugins/frequency_analysis/frequency_analysis.vue b/lcviz/plugins/frequency_analysis/frequency_analysis.vue index f60e716..2bcf9d9 100644 --- a/lcviz/plugins/frequency_analysis/frequency_analysis.vue +++ b/lcviz/plugins/frequency_analysis/frequency_analysis.vue @@ -17,31 +17,23 @@ hint="Select the light curve as input." /> - - - + - - - +
-
- From fee39788e7ae67b3e03923e946a73bdd0e91cd8b Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 4 Dec 2024 12:25:34 -0500 Subject: [PATCH 5/5] changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 049821e..1fb83a7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,8 @@ 1.1.0 (unreleased) ------------------ +* Update jdaviz requirement to 4.1 to include upstream improvements, including plugin descriptions and redesigned data menu [#158] + 1.0.0 (12-02-2024) ------------------