Create basic gallery class that finds Things that want to show data

This commit is contained in:
Julian Stirling 2026-05-06 10:05:34 +01:00
parent 964a907edc
commit 93d7d75b0d
9 changed files with 97 additions and 35 deletions

View file

@ -15,6 +15,13 @@ class OFMThing(lt.Thing):
_data_dir: Optional[str] = None
_show_in_gallery: bool = False
@property
def show_in_gallery(self) -> bool:
"""Whether to show in the Gallery."""
return self._show_in_gallery
def __enter__(self) -> Self:
"""Set the data directory when the Thing is entered."""
# Note that the `application_config` was already validated when the