DiamondLightSource / dodal

Ophyd devices and other utils that could be used across DLS beamlines
Apache License 2.0
2 stars 8 forks source link

Make useful scripts into a dodal utility #732

Open stan-dot opened 2 months ago

stan-dot commented 2 months ago
          Tagging @stan-dot as this is general good info. So to look up the type of a PV I do the following:

So, we have some choices:

  1. Talk to controls and ask them to provide named states for the PV, or change the PV to a type that is more appropriate
  2. Use an int - This will work but is a bit of a shame as it's not super clear that writing 1 to the erase is what you want to do
  3. Use an IntEnum e.g.
    class EraseEnum(int, Enum):
    ERASE = 1
    DONE = 0

    But are you saying that didn't work? In which case we should probably open a discussion up about if this is a bug in ophyd_async

I prefer option 1 but it will be the most work. I can live with option 2 for now in the interests of just getting things done, maybe we can then put in a ticket with controls to improve it at a later date

_Originally posted by @DominicOram in https://github.com/DiamondLightSource/dodal/pull/524#discussion_r1621993932_

stan-dot commented 6 days ago

@DominicOram what do you think?

DominicOram commented 6 days ago

I think it needs wider discussion with controls about what they see the future of PV discover-ability being. find-pv has a number of issues currently that a future script would probably want to fix:

I think trying to put it in dodal as is is wasted effort which we should instead put into a full solution. However, I suspect that full solution will require some effort and is not yet a prioirity

stan-dot commented 6 days ago

@marcelldls , @coretl what do you think? since we already have device detection in dodal with dodal-conenct, the channel-specific logic sounds like could live quite near it.

OTOH maybe this is a non-issue, obsolesced by argocd?

still argocd only is set to go to 3 beamlines by the dark period, so there would be a stream of value from having the support for the existing non-containerized IOCs too

coretl commented 10 hours ago

I see no reason to touch find-pv at the moment, it will soon become obsolete when we have containerised all the IOCs. This will be solved in the future by https://channelfinder.github.io/ but I'm not sure as yet where or how it will run. @MJGaughran may have more ideas.

stan-dot commented 10 hours ago

will soon become obsolete when we have containerised all the IOCs

if I remember right, last time I spoke with @gilesknap this was years away, that at the moment we're less than 1/3rd through

coretl commented 9 hours ago

will soon become obsolete when we have containerised all the IOCs

if I remember right, last time I spoke with @gilesknap this was years away, that at the moment we're less than 1/3rd through

Yes, and we have find-pv for the interim...