-
Notifications
You must be signed in to change notification settings - Fork 14
Ai 1186 simplify config models #198
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
Conversation
@mariankrotil Please pay special attention to reviewing changes that may be relevant to the |
Seems ok to me. What exact error have you been getting? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for a nice refactoring.
Component tools System Refactoring
This PR introduces a major architectural change to the Keboola MCP server's component management system, focusing on cleaner model design, cleaner separation of concerns, and improved maintainability.
Key Changes
Model Architecture Overhaul
Replaced
ComponentConfigurationMetadata
with structured models:ConfigurationSummary
containingConfigurationRootSummary
+ConfigurationRowSummary
.Introduced factory method pattern (
Component.from_api_response()
) replacing directmodel_validate()
callsAdded computed
ComponentCapabilities
derived from API flags field, providing cleaner access tois_row_based
,has_ui
, etc.Completely removed inheritance in pydantic models for easier navigation
API Response Consistency
Established cleaner data flow: Raw API → APIComponentResponse → Component/Configuration domain models
Separated API models (
api_models.py
) from business domain models (model.py
)Code Organization
Added comprehensive module documentation explaining model usage patterns
Organized code into logical sections with clear headers and improved docstrings
Legacy models
Maintained legacy models as some of them are still used in Flow tools