Skip to content

Computed properties - #406

Draft
rwb27 wants to merge 2 commits into
mainfrom
computed-properties
Draft

rwb27 wants to merge 2 commits into
mainfrom
computed-properties

Conversation

@rwb27

@rwb27 rwb27 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

This is the start of computed properties. Computed properties are like functional properties, but they keep track of attribute access. This should then allow us to update them whenever their inputs change.

Currently, an error is thrown if anything other than an observable property is accessed.

Once this is better-tested, we need logic to:

  • Call the computed property at the right time, to initialise its dependencies.
  • Automatically recompute it when those dependencies change.

This is the start of computed properties.
Computed properties are like functional properties, but they
keep track of attribute access.
This should then allow us to update them whenever their inputs change.

Currently, an error is thrown if anything other than an observable property is accessed.
@rwb27 rwb27 changed the title Functional properties that track attribute access Computed properties Sep 14, 2026
@barecheck

barecheck Bot commented Sep 14, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 97.42%

Your code coverage diff: -0.01% ▾

Uncovered files and lines
FileLines
src/labthings_fastapi/computed_properties.py53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant