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

ENH: use AlarmCircle, if available #91

Merged
merged 5 commits into from
Jul 8, 2021

Conversation

klauer
Copy link
Contributor

@klauer klauer commented Jun 28, 2021

Description

I couldn't help but wonder how the new alarm functionality looked in typhos with pcdshub/typhos#441

The answer is that it looks great! See the following view of RIX from psbuild in the grid:

image

image

which is an accurate reflection of the alarm state:
image

image

is similarly correctly determined:

image

And the tooltips are fantastic.

Context

Closes #86 (and steals a bit of Zach's thunder)
Supersedes #89

Notes

Back-compat with the previous implementation may be unnecessary. If you feel strongly one way or another, I'd happily modify this PR.

If we decide to remove backward-compatibility of typhos, I'll adjust the version pin once the relevant PR is in and typhos is tagged. Otherwise, LUCID can be tagged/released independently.

if TyphosAlarmCircle is not None:
def indicator_for_device(device):
"""Create a QWidget to indicate the alarm state of a QWidget"""
circle = TyphosAlarmCircle()
Copy link
Member

@ZLLentz ZLLentz Jul 6, 2021

Choose a reason for hiding this comment

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

The only other thing I was considering was seeing how it looked/performed with:

Suggested change
circle = TyphosAlarmCircle()
circle = TyphosAlarmCircle()
circle.kindLevel = circle.KindLevel.NORMAL

Hypotheses:

  • hinted, the default, might not catch all the issues with some devices
  • normal might slow down the load
  • the mouseover might get silly in some cases if there are too many signals included

But I'm really not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was surprised at just how fast it loaded the sample hutches I tried with normal, to be honest.

That said, I agree that hinted may be sufficient enough and will almost certainly lead to even faster loading. Perhaps we leave it as-is and try it out a bit more, falling back to hinted if necessary?

Copy link
Member

Choose a reason for hiding this comment

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

I opened all the lucids with hinted and with normal, hinted seems more friendly to me (smaller tooltips) and normal didn't reveal any new erroring devices. So let's leave it as-is I think

lucid/utils.py Show resolved Hide resolved
lucid/utils.py Outdated Show resolved Hide resolved
@ZLLentz
Copy link
Member

ZLLentz commented Jul 8, 2021

This looks really good with the tooltip expansion you suggested in the typhos PR, it adds functionality to the grid where you can figure out which circle is which at all times

@ZLLentz
Copy link
Member

ZLLentz commented Jul 8, 2021

Immediate karma on the ci updates- I'll push a fix

@ZLLentz
Copy link
Member

ZLLentz commented Jul 8, 2021

There's a deprecation/removal in python 3.9 that causes an issue with networkx < 2.5, and we have this gem in the travis output:
https://app.travis-ci.com/github/pcdshub/lucid/jobs/522941507#L2381-L2383

Rather than muck with the conda recipe or travis builds here to make it pass I'm just going to mark 3.9 as an allowed failure for now

@ZLLentz ZLLentz merged commit 2382705 into pcdshub:master Jul 8, 2021
@klauer klauer deleted the enh_use_alarmcircle branch July 8, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Alarm-aware Device Widgets in Grid (once existing)
2 participants