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

update rotation_angle when _add_orientation is called #2838

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gibsongreen
Copy link
Contributor

@gibsongreen gibsongreen commented May 1, 2024

Description

This pull request is to address updating the orientation plugin's rotation_angle when _add_orientation() is called via API.

Screen.Recording.2024-04-30.at.10.39.27.PM.mov
Screen.Recording.2024-04-30.at.10.38.06.PM.mov

Fixes #

Change log entry

  • Is a change log needed? If yes, is it added to 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, maintainer
    should 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.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@github-actions github-actions bot added imviz plugin Label for plugins common to multiple configurations labels May 1, 2024
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.96%. Comparing base (95cf7f2) to head (1653e16).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2838      +/-   ##
==========================================
+ Coverage   88.94%   88.96%   +0.01%     
==========================================
  Files         111      111              
  Lines       17101    17104       +3     
==========================================
+ Hits        15211    15217       +6     
+ Misses       1890     1887       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gibsongreen gibsongreen added this to the 3.9.2 milestone May 1, 2024
@gibsongreen gibsongreen added bug Something isn't working api API change labels May 1, 2024
@gibsongreen gibsongreen changed the title update traitlet when _add_orientation is called update rotation_angle when _add_orientation is called May 1, 2024
@kecnry kecnry added the 💤 backport-v3.9.x on-merge: backport to v3.9.x label May 1, 2024
Comment on lines +339 to +340
if rotation_angle is not None:
self.rotation_angle = rotation_angle
Copy link
Member

@kecnry kecnry May 1, 2024

Choose a reason for hiding this comment

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

The rotation_angle traitlet isn't necessarily the currently set rotation, but rather the rotation that will be used if creating a new entry from the UI, right? (Side note: maybe we need a separate ticket to clarify this in the API docs?). I'm not sure I'd expect a kwarg to add_orientation from the API to change that value then (and if it does, we probably should do the same for east_left and label?).

Can you please remind me what buggy behavior this is aiming to fix? I am wondering if maybe the fix needs to be in footprints instead? EDIT: ah, it was with the automatic labeling not respecting the passed angle.

Maybe we can just refactor the labeling logic to act on the overrides instead of the traitlets? Although the API docs do say: "If None, the value will follow self.new_layer_label." which is exactly what happens before this PR 🤔

@gibsongreen gibsongreen marked this pull request as draft May 1, 2024 13:29
@bmorris3 bmorris3 modified the milestones: 3.9.2, 3.10.1 May 3, 2024
@bmorris3 bmorris3 removed the 💤 backport-v3.9.x on-merge: backport to v3.9.x label May 3, 2024
@rosteen rosteen modified the milestones: 3.10.1, 3.10.2 May 14, 2024
@bmorris3 bmorris3 modified the milestones: 3.10.2, 4.0 Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API change bug Something isn't working imviz plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants