labthings / labthings/labthings-fastapi
Ordered Initialisation of Thing Slots
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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