Skip to content

Update SDK to 2026-01-23#5

Open
damaz91 wants to merge 7 commits intomainfrom
update-2026-01-23
Open

Update SDK to 2026-01-23#5
damaz91 wants to merge 7 commits intomainfrom
update-2026-01-23

Conversation

@damaz91
Copy link
Contributor

@damaz91 damaz91 commented Feb 6, 2026

This pull request introduces major improvements to the model generation workflow, schema preprocessing, and project structure for the UCP Python SDK. The most significant changes include the addition of a schema preprocessing script to resolve compatibility issues, updates to the model generation script to use preprocessed schemas, a refactor of capability and discovery profile models for clarity and separation, and enhanced formatting and linting for generated code.

Schema Preprocessing and Model Generation:

  • Added a new preprocess_schemas.py script to preprocess JSON schemas, resolving internal references and removing problematic definitions to ensure compatibility with datamodel-code-generator. The generate_models.sh script is updated to invoke this preprocessing step and to format/lint generated models using Ruff. [1] [2] [3] [4]

Model and Schema Refactoring:

  • Refactored capability and discovery profile models for better separation and clarity. The new structure introduces clear distinctions between platform, business, and response schemas for both capabilities and payment handlers, and updates discovery profile models to use these new schema types. [1] [2] [3] [4]

Formatting and Linting Improvements:

  • Removed Ruff configuration from pyproject.toml and now generate a dedicated ruff.toml in the models directory for more lenient linting of auto-generated code. The model generation script now applies formatting and lint fixes automatically. [1] [2] [3] [4]

Documentation and Setup Updates:

  • Updated the README.md to clarify repository cloning instructions and document the need to clone the main UCP repository for schema regeneration. [1] [2]

Cleanup and Deprecation:

  • Removed the legacy _internal.py models file, as its functionality has been replaced by the new schema-based model structure.

@damaz91 damaz91 requested a review from a team February 6, 2026 10:18
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