Skip to content

Conversation

@GDYendell
Copy link
Contributor

@GDYendell GDYendell commented Nov 14, 2025

Breaking Changes

  • Attempting to overwrite an Attribute now raises a RuntimeError, even if the type and access mode match. To statically type hint an Attribute to be introspected during initialisation, only specify the type hint on the class - do not create a default instance, e.g. attr: AttrRW[int], not attr = AttrRW(Int()).
  • Controller.attributes is now a read-only view. Use Controller.add_attribute to create Attributes, which will perform validation.

Sorry the diff is a bit horrible because I moved methods around, but I think it has made it easier to read through the code.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 98.80952% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.35%. Comparing base (d750b61) to head (29c990a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/fastcs/controller.py 98.79% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   89.33%   89.35%   +0.01%     
==========================================
  Files          45       45              
  Lines        2269     2273       +4     
==========================================
+ Hits         2027     2031       +4     
  Misses        242      242              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GDYendell GDYendell force-pushed the hinted-attribute-validation branch from 284b2e5 to 41049a1 Compare November 14, 2025 14:50
Check datatype and access mode in add_attribute, check for
unintrospected type hints after initialise
@GDYendell GDYendell force-pushed the hinted-attribute-validation branch from 41049a1 to c02a3e1 Compare November 14, 2025 17:32
@GDYendell GDYendell force-pushed the hinted-attribute-validation branch from c02a3e1 to 29c990a Compare November 17, 2025 16:25
@GDYendell GDYendell merged commit 2d72f41 into main Nov 18, 2025
11 checks passed
@GDYendell GDYendell deleted the hinted-attribute-validation branch November 18, 2025 08:32
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.

3 participants