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

Moving color cycler to JdavizViewerMixin #1866

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

bmorris3
Copy link
Contributor

Description

In #1674 I introduced a color cycler so that each new data added to an instance of the Application would have a distinct color (up to N colors). While testing #1864, @kecnry pointed out that (1) the cycler was accidentally broken by #1742, and (2) the color cycler should cycle on the viewer level rather than the app level. I implement that here.

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.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@bmorris3 bmorris3 added bug Something isn't working trivial Only needs one approval instead of two 💤backport-v3.1.x on-merge: backport to v3.1.x labels Nov 22, 2022
@bmorris3 bmorris3 added this to the 3.1.1 milestone Nov 22, 2022
Copy link
Member

@kecnry kecnry left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix (and sorry for breaking it in the first place)!

@kecnry
Copy link
Member

kecnry commented Nov 22, 2022

I think test failures are unrelated? But probably something we will want to have fixed for release - @pllim?

@rosteen
Copy link
Collaborator

rosteen commented Nov 22, 2022

I think test failures are unrelated? But probably something we will want to have fixed for release - @pllim?

I just restarted test jobs on main to see if it happens there as well.

@rosteen
Copy link
Collaborator

rosteen commented Nov 22, 2022

The test seems to be passing on main...

@bmorris3
Copy link
Contributor Author

I can't track down why this error occurs, but this note from a comment in the traceback is a bit haunting.

@kecnry
Copy link
Member

kecnry commented Nov 22, 2022

I think they somewhat randomly fail on the cube play button. @bmorris3 - might be worth just restarting tests and if they eventually pass we can open a follow-up issue to write more robust tests?

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Base: 88.37% // Head: 88.37% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (d769ca2) compared to base (0b9d469).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1866   +/-   ##
=======================================
  Coverage   88.37%   88.37%           
=======================================
  Files          95       95           
  Lines       10455    10456    +1     
=======================================
+ Hits         9240     9241    +1     
  Misses       1215     1215           
Impacted Files Coverage Δ
jdaviz/app.py 94.15% <100.00%> (-0.01%) ⬇️
jdaviz/configs/default/plugins/viewers.py 96.77% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bmorris3
Copy link
Contributor Author

The failure is indeed intermittent. I can't reproduce it locally, and rerunning the Actions succeeded. 🤷🏻‍♂️

Thanks for your help!

@bmorris3 bmorris3 merged commit db0bc76 into spacetelescope:main Nov 23, 2022
meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Nov 23, 2022
rosteen added a commit that referenced this pull request Nov 23, 2022
…6-on-v3.1.x

Backport PR #1866 on branch v3.1.x (Moving color cycler to JdavizViewerMixin)
@pllim
Copy link
Contributor

pllim commented Nov 28, 2022

Tsk tsk... Why would goto_first not go to first slice? Did you say you see this a lot across all the PRs? Is it always the OSX or doesn't matter? If you see it again, please open issue. I thought you saw it while the play button was active but by the time goto_first happens, it should have stopped... unless join doesn't wait for the thread to terminate first before Python runs the next command? 🤯

self._player.join(timeout=0)

        # NOTE: Hard to check sl.slice here because it is non-deterministic.
    
        sl.vue_goto_first()
>       assert sl.slice == 0
E       AssertionError: assert 1 == 0

@bmorris3 bmorris3 mentioned this pull request Dec 7, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working trivial Only needs one approval instead of two 💤backport-v3.1.x on-merge: backport to v3.1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants