Skip to content

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

Merged
merged 41 commits into from
Jul 14, 2025
Merged

Ai 1186 simplify config models #198

merged 41 commits into from
Jul 14, 2025

Conversation

ncapek
Copy link
Contributor

@ncapek ncapek commented Jul 6, 2025

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 containing ConfigurationRootSummary + ConfigurationRowSummary.
Introduced factory method pattern (Component.from_api_response()) replacing direct model_validate() calls
Added computed ComponentCapabilities derived from API flags field, providing cleaner access to is_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

@ncapek ncapek marked this pull request as draft July 6, 2025 20:33
@ncapek ncapek marked this pull request as ready for review July 9, 2025 08:53
@ncapek
Copy link
Contributor Author

ncapek commented Jul 9, 2025

@mariankrotil Please pay special attention to reviewing changes that may be relevant to the update_sql_transormation tool. I've been getting consistent validation errors during manual testing.

@ncapek ncapek requested a review from radcliffkey July 9, 2025 10:18
@ncapek ncapek requested a review from mariankrotil July 11, 2025 08:17
@mariankrotil
Copy link
Contributor

Please pay special attention to reviewing changes that may be relevant to the update_sql_transormation tool. I've been getting consistent validation errors during manual testing.

Seems ok to me. What exact error have you been getting?

Copy link
Contributor

@vita-stejskal vita-stejskal left a 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.

@ncapek ncapek merged commit f2be3c7 into main Jul 14, 2025
19 checks passed
@ncapek ncapek deleted the AI-1186-simplify-config-models branch July 14, 2025 14:17
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.

4 participants