labthings / labthings/labthings-fastapi

Cannot have a DataSchema as a thing property

Open
#154 1 comment 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

Describe the bug
If we want to describe "this internal object (which isn't a thing) has setting in this form" and pass it to the UI it makes sense to do this as a dataschema, this is not something we can do with a thing description as the object may change. Such as for background detect on the microscope when we change to a different background detector with different settings.

If a Thing Property tries to return a DataSchema then this causes a recursion loop.

To Reproduce
Create a thing property that returns a DataSchema.

Expected behaviour
No recursion

System:

  • OS: OpenFlexure Raspian (v3-alpha1)
  • Python version 3.11
  • Version: 0.0.11

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 by reproducing the issue with a thing property that returns a DataSchema, as described in the report, then trace where the recursion occurs. Done means the DataSchema can be returned as a thing property without a recursion loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.