Skip to content

Conversation

@kieran-ryan
Copy link
Contributor

@kieran-ryan kieran-ryan commented Jan 1, 2026

Context

Establish type annotations on common data models towards #878.

  • Corrected TestResult usage to initialise with required UUID
  • Updated ParameterMode to a string-based enum of (str, Enum) from Enum
    • Updated ParameterMode.DEFAULT to a "default" string from None - matching allure2
  • Updated ALLURE_UNIQUE_LABELS to use LabelType values

This enables static type checking and rich language services through language servers. The ty Visual Studio Code extension will only recognise attrs attributes once type annotations are provided for instance - see attrs documentation on type annotations.

Withholding removing None from required fields - being a breaking change for any improper initialisation - reserving for more fundamental model updates. Similarly withholding standardising all types to string-based enums.

Screenshots

present_types image image image
Without annotations
missing_types image

@kieran-ryan kieran-ryan force-pushed the commons-models-types branch 4 times, most recently from 8e48ad2 to b162be9 Compare January 1, 2026 20:03
@kieran-ryan kieran-ryan changed the title Data model type hints Data models type hints Jan 1, 2026
@kieran-ryan kieran-ryan force-pushed the commons-models-types branch 5 times, most recently from 9f10548 to 9fd83bd Compare January 1, 2026 22:17
@kieran-ryan kieran-ryan changed the title Data models type hints feat(commons): data models type hints Jan 4, 2026
@kieran-ryan kieran-ryan force-pushed the commons-models-types branch 3 times, most recently from 401fdd9 to 0790eb6 Compare January 4, 2026 17:40
@kieran-ryan kieran-ryan changed the title feat(commons): data models type hints feat(commons): data models type annotations Jan 4, 2026
@kieran-ryan kieran-ryan changed the title feat(commons): data models type annotations feat(commons): data model type annotations Jan 4, 2026
@kieran-ryan kieran-ryan marked this pull request as ready for review January 4, 2026 18:11
@kieran-ryan kieran-ryan force-pushed the commons-models-types branch 2 times, most recently from 2ab2ed8 to 456b412 Compare January 5, 2026 20:50
- Corrected `TestResult` to initialise with required UUID
- Updated `ParameterMode.DEFAULT` from `None` to `"default"`
- Updated `ALLURE_UNIQUE_LABELS` to use `LabelType` values
@kieran-ryan kieran-ryan force-pushed the commons-models-types branch from 456b412 to 00e6f4f Compare January 5, 2026 20:53
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