Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/preswald types #123

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fnbellomo
Copy link

Related Issue
No direct issue - This is a proactive improvement to the component system

Description of Changes
This PR refactors the component system to use dataclasses and improve type safety. Key changes include:

  • Migrated components from dictionary-based to dataclass-based implementation
  • Added comprehensive type hints and validation
  • Introduced unit tests for components and layout
  • Added support for uv package manager

Technical improvements:

  • Created BaseComponent dataclass as foundation
  • Each component is now properly typed with validation
  • Improved error handling and logging
  • Better IDE support with type hints
  • Fixed multiple type-related linter errors

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • New example
  • Test improvement

Testing
Added comprehensive test suite covering:

  • Component creation and validation
  • Layout management
  • Error handling
  • State management
  • Mock service interactions

Test files:

  • tests/interfaces/test_components.py
  • tests/engine/managers/layout_test.py

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (TODO: uv installation docs)
  • My changes generate no new warnings
  • I have run my code against examples and ensured no errors
  • Any dependent changes have been merged and published in downstream modules

Notes
This is my first open-source PR. I'm particularly interested in feedback on code organization, test coverage, and type safety approach.

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