Docuementation for using `inject` is not sufficient

Aperta Adatta ai principianti
#2,284 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Inizia dalla docstring esistente di inject e dalla pagina di riferimento collegata nell’issue, poi individua la documentazione del progetto su come scrivere piani e test. Documenta un esempio completo di utilizzo di inject in un piano e di come testarlo, spiegando perché è l’approccio standard. Il lavoro è completato quando la documentazione illustra questa procedura; l’issue non specifica file o criteri di accettazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Docsathon documentation standarisation

Currently, to use blueapi with a plan which will always use the same device, you can use inject. However, there isn't any sufficient documentation within dodal on how it is actually used. Only the doc string which briefly outlines it https://diamondlightsource.github.io/dodal/main/reference/generated/dodal.common.html#dodal.common.inject but this isn't sufficient.

We need to outline in the docs a complete walk through of inject used in plans to show this is the standard way, including on how to write a test for it. Otherwise, other non standard ways will be used in plans e.g I have come across importing the device directly from beamline module and then using ophyd-async ensure_connected plan stub to connect the device within the plan, making the device object of the same thing in two places, once for the life time of the plan (and is reconnected every time in the plan) and second connected and held by blueapi. This has also caused issues with path provider because blueapi will replace the path provider fixture with its own where as with the above way this will not happen if you circumvent blueapi and use the beamline module directly.

Acceptance Criteria

  • Documentation outlines exactly why, what, and how to use inject along with how to test your plan that inject works
Lingua principale
Python
Stelle
5
Fork
13
Merge medio
1g 9h
PR unite (30g)
18

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DiamondLightSource/dodal

Tutte le issue di DiamondLightSource/dodal

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.