Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
preprocess_schemas.pyscript to preprocess JSON schemas, resolving internal references and removing problematic definitions to ensure compatibility withdatamodel-code-generator. Thegenerate_models.shscript is updated to invoke this preprocessing step and to format/lint generated models using Ruff. [1] [2] [3] [4]Model and Schema Refactoring:
Formatting and Linting Improvements:
pyproject.tomland now generate a dedicatedruff.tomlin 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:
README.mdto clarify repository cloning instructions and document the need to clone the main UCP repository for schema regeneration. [1] [2]Cleanup and Deprecation:
_internal.pymodels file, as its functionality has been replaced by the new schema-based model structure.