Apply suggestions from code review of branch camera-and-bg-detect-setting-customisation
This commit is contained in:
parent
d994119b36
commit
7231e1cf5b
2 changed files with 9 additions and 4 deletions
|
|
@ -33,13 +33,18 @@ class BackgroundDetectorStatus(BaseModel):
|
||||||
need different initialisation.
|
need different initialisation.
|
||||||
"""
|
"""
|
||||||
settings: dict[str, Any]
|
settings: dict[str, Any]
|
||||||
"""The settings for this this background detect Algorithm. These are a dictionary
|
"""The settings for the current background detect Algorithm. These are a dictionary
|
||||||
dumped from the base model."""
|
dumped from the base model."""
|
||||||
|
|
||||||
# Setting schema is a dict until LabThings FastAPI issue #154 is fixed and
|
# Setting schema is a dict until LabThings FastAPI issue #154 is fixed and
|
||||||
# DataSchema can be used directly. For now `model_dump()` must be used to dump schema
|
# DataSchema can be used directly. For now `model_dump()` must be used to dump schema
|
||||||
# to a dict.
|
# to a dict.
|
||||||
settings_schema: dict[str, Any]
|
settings_schema: dict[str, Any]
|
||||||
|
"""The schema for the settings for the current background detect Algorithm.
|
||||||
|
|
||||||
|
This is reported so that the UI can dynamically create a UI for any background detector
|
||||||
|
algorithm.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class BackgroundDetectAlgorithm:
|
class BackgroundDetectAlgorithm:
|
||||||
|
|
|
||||||
|
|
@ -74,12 +74,12 @@ def _get_clean_camera_description(camera_thing):
|
||||||
|
|
||||||
|
|
||||||
def test_thing_description_equivalence(mock_picam_thing):
|
def test_thing_description_equivalence(mock_picam_thing):
|
||||||
"""Ensure extra actions and properties are not added to camera Things without explicit approval.
|
"""Ensure the built-in camera Thing subclasses retain consistent core functionality.
|
||||||
|
|
||||||
This test verifies that extra actions are not unintentionally introduced to
|
This test verifies that extra actions are not unintentionally introduced to
|
||||||
camera child classes. Any addition of actions must be accompanied by an update
|
camera child classes. Any addition of actions must be accompanied by an update
|
||||||
to this test, prompting review and justification for why the action does not
|
to this test, prompting discussion of whether the action belongs in the subclass
|
||||||
belong to the general base class.
|
or the base camera class.
|
||||||
"""
|
"""
|
||||||
base_td = BaseCamera().thing_description()
|
base_td = BaseCamera().thing_description()
|
||||||
base_actions = set(base_td.actions.keys())
|
base_actions = set(base_td.actions.keys())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue