labthings / labthings/labthings-fastapi

Ordered Initialisation of Thing Slots

Open
#388 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

  • In a Thing's enter() method, it is not currently possible to specify that a Thing slot should be initialised before another Thing. As an example of what's currently not possible, on the OpenFlexure Microscope, the camera needs to talk to the sangaboard in enter() to set the duration of the LED's flash in synced illumination mode.

Describe the solution you'd like

  • The ability to specify that a Thing should be initialised before or after another Thing.

Describe alternatives you've considered

  • Delaying the function to run until after initialisation by putting a thread to sleep for 1 second.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Thing.enter() lifecycle and trace how Thing slots are initialized. Compare the camera and sangaboard interaction described for the OpenFlexure Microscope, then determine how an explicit before/after ordering should be represented and verified; done means dependent slots initialize in the requested order without relying on a sleep.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.