Skip to content

Commit

Permalink
"Imviz Line Profiles (XY)" renamed to "Image Profiles (XY)" (#3121)
Browse files Browse the repository at this point in the history
* remove "Imviz" from "Line Profiles XY" plugin name with deprecation

* changelog entry
  • Loading branch information
kecnry authored Jul 30, 2024
1 parent 682e302 commit 1a210d1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Imviz

- Added a table with catalog search results. [#2915, #3101]

- "Imviz Line Profiles (XY)" plugin is renamed to "Image Profiles (XY)". [#3121]

Mosviz
^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__all__ = ['LineProfileXY']


@tray_registry('imviz-line-profile-xy', label="Imviz Line Profiles (XY)")
@tray_registry('imviz-line-profile-xy', label="Image Profiles (XY)")
class LineProfileXY(PluginTemplateMixin, ViewerSelectMixin):
template_file = __file__, "line_profile_xy.vue"
uses_active_status = Bool(True).tag(sync=True)
Expand Down
4 changes: 2 additions & 2 deletions jdaviz/configs/imviz/tests/test_line_profile_xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class TestLineProfileXY(BaseImviz_WCS_NoWCS):
def test_plugin_linked_by_pixel(self):
"""Go through plugin logic but does not check plot contents."""
lp_plugin = self.imviz.plugins['Imviz Line Profiles (XY)']._obj
lp_plugin = self.imviz.plugins['Image Profiles (XY)']._obj
lp_plugin.plugin_opened = True

assert lp_plugin.viewer.labels == ['imviz-0']
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_line_profile_with_nan(imviz_helper):
arr[5, 5] = np.nan
imviz_helper.load_data(arr)

lp_plugin = imviz_helper.plugins['Imviz Line Profiles (XY)']._obj
lp_plugin = imviz_helper.plugins['Image Profiles (XY)']._obj
lp_plugin.plugin_opened = True
lp_plugin.selected_x = 5
lp_plugin.selected_y = 5
Expand Down
7 changes: 7 additions & 0 deletions jdaviz/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,20 @@ def plugins(self):

# handle renamed plugins during deprecation
if 'Orientation' in plugins:
# renamed in 3.9
plugins['Links Control'] = plugins['Orientation']._obj.user_api
plugins['Links Control']._deprecation_msg = 'in the future, the formerly named \"Links Control\" plugin will only be available by its new name: \"Orientation\".' # noqa
if 'Canvas Rotation' in plugins:
# removed in 3.9
plugins['Canvas Rotation']._deprecation_msg = 'this functionality will be removed in favor of the implementation for rotation in the \"Orientation\" plugin.' # noqa
if 'Export' in plugins:
# renamed in 3.9
plugins['Export Plot'] = plugins['Export']._obj.user_api
plugins['Export Plot']._deprecation_msg = 'in the future, the formerly named \"Export Plot\" plugin will only be available by its new name: \"Export\".' # noqa
if 'Image Profiles (XY)' in plugins:
# renamed in 4.0
plugins['Imviz Line Profiles (XY)'] = plugins['Image Profiles (XY)']._obj.user_api
plugins['Imviz Line Profiles (XY)']._deprecation_msg = 'in the future, the formerly named \"Imviz Line Profiles (XY)\" plugin will only be available by its new name: \"Image Profiles (XY)\".' # noqa

return plugins

Expand Down
2 changes: 1 addition & 1 deletion notebooks/concepts/imviz_line_profiles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "a4549fa2",
"metadata": {},
"source": [
"This concept notebook is set up mainly to showcase Imviz Line Profiles (XY) plugin. Imviz will display two different small arrays of the same size but with different 2D Gaussian objects for ease of illustration."
"This concept notebook is set up mainly to showcase Image Profiles (XY) plugin. Imviz will display two different small arrays of the same size but with different 2D Gaussian objects for ease of illustration."
]
},
{
Expand Down

0 comments on commit 1a210d1

Please # to comment.