Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Imviz Line Profiles (XY)" renamed to "Image Profiles (XY)" #3121

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -11,7 +11,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
Comment on lines 139 to 149
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these have now been more than 2 releases, so maybe we can remove for 4.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I don't think that belongs in scope here, so I made a note in the 4.0 release ticket)

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