Skip to content

Update SDK to 2026-01-23#5

Merged
damaz91 merged 24 commits intomainfrom
update-2026-01-23
Mar 2, 2026
Merged

Update SDK to 2026-01-23#5
damaz91 merged 24 commits intomainfrom
update-2026-01-23

Conversation

@damaz91
Copy link
Contributor

@damaz91 damaz91 commented Feb 6, 2026

This pull request introduces several significant improvements and refactorings to the Python SDK for the Universal Commerce Protocol (UCP). The changes focus on automating schema preprocessing and model generation, updating project metadata, refactoring the discovery profile models, and cleaning up unused code. The most important changes are grouped below:

Automated Model Generation & Schema Preprocessing

  • Added the new preprocess_schemas.py script to preprocess UCP JSON schemas, generate operation-specific variants, and handle reference propagation for accurate model generation. This script is now called by generate_models.sh before running codegen.
  • Updated generate_models.sh to accept a UCP spec version, clone the correct branch, run schema preprocessing, and improve formatting of generated models. Formatting is now separated from code generation for clarity. [1] [2] [3]
  • Updated documentation in README.md to reflect the new model generation workflow, including version selection and schema preprocessing details. [1] [2]

Discovery Profile Model Refactor

  • Refactored src/ucp_sdk/models/discovery/profile_schema.py to support both platform and business discovery profiles, using new base schemas and type-safe root models. This change aligns the SDK with the latest UCP spec and improves clarity and extensibility. [1] [2]

Project Metadata and Licensing

  • Updated pyproject.toml to reflect the new versioning scheme, add additional authors, and include license files for improved compliance and attribution.

Codebase Cleanup

  • Removed unused legacy code from src/ucp_sdk/__init__.py and src/ucp_sdk/models/_internal.py, streamlining the SDK and reducing maintenance overhead. [1] [2]

Miscellaneous

  • Added newlines to several __init__.py files to ensure proper formatting and future extensibility.
  • Minor import and formatting adjustments for consistency in model files.

Let me know if you have questions about any of these changes or want to dive deeper into the schema preprocessing or discovery profile refactor!

@damaz91 damaz91 requested a review from a team February 6, 2026 10:18
@nearlyforget
Copy link
Contributor

Hi @damaz91, Could you please incorporate the suggestions? Thank you.

@nearlyforget nearlyforget requested a review from a team February 28, 2026 13:08
damaz91 added 2 commits March 2, 2026 15:08
Change-Id: I7400c7bd870e3505d5b8c9a9e179d305c65bb3dc
Change-Id: I4583f94619b072eb7aff0fc28f040d0b2fd30de3
@damaz91 damaz91 requested a review from 0x8000-0000 March 2, 2026 14:13
@damaz91
Copy link
Contributor Author

damaz91 commented Mar 2, 2026

Hi @damaz91, Could you please incorporate the suggestions? Thank you.

All suggestions have been addressed

@damaz91 damaz91 requested a review from samali0996 March 2, 2026 14:23
damaz91 added 6 commits March 2, 2026 15:30
Change-Id: Ib7d74192095677f98a79906f5ed2d69dc16e1520
Change-Id: I2e70bdaf468ef7663b6c8e7542f2acf822d9df06
Change-Id: Id33ccc029b86af2486c82dc85d8bb12b3c55c680
Change-Id: Ia518ec52de6906da7262f7a76704a676a6318c40
Change-Id: I113bf00366152f552140a0f6410f738813c44007
Change-Id: I8413a4ad2e3886df6684ff7f654faa2ed2a95043
)
id: str
"""
model_config = ConfigDict(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these formatting changes necessary? Will they be applied to all other Python projects under UCP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rolled back

Copy link

@MitkoDeyanovMitev MitkoDeyanovMitev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, if possible you can add the request and response classes

damaz91 added 2 commits March 2, 2026 16:22
Change-Id: I63be54dcfc253861c05a9143483fd73a98f2c232
Change-Id: If59a9d92e40d71bc9d69d171b7020310ee9e26a1
Copy link

@MitkoDeyanovMitev MitkoDeyanovMitev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

damaz91 added 2 commits March 2, 2026 16:44
Change-Id: I79bccca52f3a1d9d721c6a6f10d128f544411840
Change-Id: I0ac8995f2d15caa97ce57e9a1be574f012d5b9f2
@damaz91 damaz91 merged commit 9a1a921 into main Mar 2, 2026
2 checks passed
@damaz91 damaz91 deleted the update-2026-01-23 branch March 2, 2026 16:54
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.

6 participants