BlueapiClient devices do not know about child devices until after user uses them
Les mainteneurs répondent en général sous 1 jour
@ZohebShaikh y travaille déjà.
Depuis le 8/10/2026.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- python
- Domaine
- api, cli, developer-experience
Piste de recherche
Commencez par le chemin de chargement et de mise en cache des appareils de BlueapiClient décrit dans l’issue, puis suivez la manière dont DeviceManager fournit les appareils et les appareils enfants. Clarifiez si le périmètre inclut une arborescence d’appareils ou repr et les attributs réservés. Le travail doit être considéré comme terminé lorsque les appareils enfants sont disponibles pour l’autocomplétion immédiatement après le chargement, sans recherche préalable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 14
- Forks
- 14
- Merge moyen
- 2 j 23 h
- PR mergées (30 j)
- 27
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de DiamondLightSource/blueapi
-
support: low
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
DiamondLightSource/blueapi#1772 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
deployment dev-environment
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
DiamondLightSource/blueapi#1623 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Cannot Install SoftiocOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
DiamondLightSource/blueapi#1605 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
DiamondLightSource/blueapi#1494 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
DiamondLightSource/blueapi#1788 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de DiamondLightSource/blueapi
Issues similaires
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
jxxghp/MoviePilot#7576 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
jbaruch/software-factory#266 ·
Les mainteneurs répondent en général sous 1 jour
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour