-
Notifications
You must be signed in to change notification settings - Fork 75
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
bugfix for viewer rename when viewer ID is different from reference name #2479
Conversation
ef68fb1
to
9614aa0
Compare
The test failure in this PR is identical to the one that #2478 is intended to fix. |
@@ -1655,11 +1655,11 @@ def _update_viewer_reference_name( | |||
viewer_item['name'] = new_reference | |||
|
|||
# optionally update the viewer IDs: | |||
if update_id and viewer_item['id'] == old_reference: | |||
# update the id as well | |||
if update_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you added this logic back in #2338 . Why was the ==
check necessary back then but not anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original implementation in lcviz had just the ==
logic without the update_id
switch, so I think it just came with that accidentally without thinking about if we still needed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't necessary then or now, hence the bugfix.
9614aa0
to
a666c43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks like code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works locally with spacetelescope/lcviz#35, thanks!!
@bmorris3 - I think this should pass CI once its rebased 🤞 |
a666c43
to
8f93311
Compare
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
This comment was marked as resolved.
This comment was marked as resolved.
Ooof, you will need to manually backport or change the milestone. |
… ID is different from reference name
… ID is different from reference name
… ID is different from reference name
…nt from reference name (#2483)
#2338 implemented viewer reference name updates, with an option to update viewer IDs as well. That feature is intended for internal use in lcviz.
Subsequent development in lcviz exposed a bug in the jdaviz method when
update_id=True
(spacetelescope/lcviz#35). Each viewer's entry in the viewer store has a hidden attr_reference_id
which should matchviewer_item['id']
, but #2338 did not update that attr.Also, the ID is only updated if
update_id=True
andviewer_item['id'] == old_reference
, but the latter condition is satisfied if the ID matches the reference name (which is not required elsewhere).This PR adds the missing update to the hidden reference_id attr, and removes the unnecessary second condition for updating the ID.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.