BlueapiClient devices do not know about child devices until after user uses them
Maintainer antworten meist innerhalb von 1 Tag
@ZohebShaikh arbeitet bereits daran.
Seit 08.10.2026.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- api, cli, developer-experience
Rechercherichtung
Beginne mit dem im Issue beschriebenen BlueapiClient-Pfad zum Laden und Cachen von Geräten und verfolge dann, wie DeviceManager Geräte und untergeordnete Geräte bereitstellt. Kläre, ob der Umfang einen Gerätebaum oder repr und reservierte Attribute umfasst. Als erledigt sollte gelten, dass untergeordnete Geräte unmittelbar nach dem Laden für die Autovervollständigung verfügbar sind, ohne vorherige Suche.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
BlueapiClient asks blueapi server for all available devices and then caches them. This makes it so autocomplete now works on the terminal making it very handy when composing plans on command line. However, blueapi cannot handle child devices.
Very often, a device will hold a group of other devices / signals and need to be accessed to run plans. For example Motor stages will have x, y, z motor components. pgm devices have child signals/motors for energy.
So a very basic example would be
plans.set_absolute(pgm.energy, 500)
plans.set_absolute(stage.x, 10)
plans.set_absolute(stage.y, 20)
BlueapiClient has no idea these child devices of energy, x, and y exist so the user has to guess what is available.
How it works is if it doesn't exist from the cache, the device is requested from the server and then if it exists, it is then added to cache and then autocomplete now works. However, when loading devices, BlueapiClient should be aware of all devices on the server, including all child devices of a Device, so that automcomplete will work straight away rather than guessing first for all devices.
This is related to https://github.com/DiamondLightSource/dodal/issues/2208 because DeviceManager only provides the higher level devices to blueapi and not the device children so it has no concept of the child devices unless asked explicitly to check for it.
This would vastly improve the user experience using the client if you could print the device tree or the device __repr__ to show it (similiar to a plan __repr__ displays the plan signature) to know what is available to work with and that auto complete for child devices works from the start.
As we are going to have name clashes with device attributes and what blueapi needs, we should probably reserve in dodal device attributes so that they never have a model signal / sub device. Similar to how ophyd-async reserves bluesky key words. This could be done inside DeviceManager. When it loads in a device, it checks there are no signals / child devices with model as an attribute.
- Vorherrschende Sprache
- Python
- Sterne
- 14
- Forks
- 14
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 27
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/blueapi
-
support: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DiamondLightSource/blueapi#1772 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
deployment dev-environment
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
DiamondLightSource/blueapi#1623 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Cannot Install SoftiocOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DiamondLightSource/blueapi#1605 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
DiamondLightSource/blueapi#1494 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
DiamondLightSource/blueapi#1788 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in DiamondLightSource/blueapi
Ähnliche Issues
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
jxxghp/MoviePilot#7576 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
jbaruch/software-factory#266 ·
Maintainer antworten meist innerhalb von 1 Tag
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag