Skip to content

Take the SDK version from the contract - #26

Merged
glenn-jocher merged 3 commits into
mainfrom
version-from-contract
Aug 15, 2026
Merged

Take the SDK version from the contract#26
glenn-jocher merged 3 commits into
mainfrom
version-from-contract

Conversation

@glenn-jocher

@glenn-jocher glenn-jocher commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

Removes the hard-coded python.version from openapi.config.json: with ultralytics/openapi#43 the generator defaults the package version to the contract's info.version, so the API version is the single source of truth and a contract bump reaching main publishes the SDK. README wording updated.

Also re-pins the live contract snapshot (now info.version 0.1.5 via ultralytics/portal#3620, plus the authored examples from ultralytics/portal#3619) and regenerates: only docstring example text in five resource modules changes; the package version stays 0.1.5, so no publish is triggered.

Depends on ultralytics/openapi#43 (CI regenerates from openapi main).

Verification

sha256sum --check, ruff check, pytest tests (4 passed); regenerated pyproject.toml reports version = "0.1.5" from the contract.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

The SDK now derives its package version from the OpenAPI contract’s info.version, with the contract snapshot updated to 0.1.5 and related generated documentation refreshed.

📊 Key Changes

  • Removed the hard-coded version from openapi.config.json, making openapi.json’s info.version the package-version source.
  • Updated CI instructions and English and Chinese README text to reflect contract-driven versioning and publishing behavior.
  • Re-pinned openapi.json to contract version 0.1.5 and updated its checksum.
  • Regenerated SDK docstrings in dataset, deployment, lifecycle, project, and upload resources with clearer parameter descriptions.
  • Refreshed contract examples and schema metadata, including examples for resource IDs, names, API keys, and upload sessions.

🎯 Purpose & Impact

  • Future contract version bumps reaching main determine the generated package version and publishing trigger.
  • The current generated package remains version 0.1.5; no publish-triggering version change is introduced by this PR.
  • SDK request behavior and available operations are unchanged; generated documentation and contract examples are more descriptive.

@UltralyticsAssistant UltralyticsAssistant added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 15, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/sdk 🚀 PR! This automated message confirms your contribution was received, and an Ultralytics engineer will assist with the review. To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/sdk main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

The version override removal and README updates are behaviorally consistent with taking the package version from the contract. One stale CI-generated instruction remains and should be corrected before merge.

💬 Posted 1 inline comment
  • 📝 LOW openapi.config.json:38 Removing the override without updating .github/workflows/ci.yml leaves the automated contract-update PR body telling maintainers to “bump openapi.config.json python.version”. On the next contract sync, following that instruction would reintroduce the obsolete configuration and contradict the new info.version source-of-truth behavior. Update that workflow message in this PR to direct reviewers to assess the contract version instead.

Comment thread openapi.config.json
"project": "ultralytics-platform",
"readme": "README.python.md",
"requiresPython": ">=3.11",
"version": "0.1.5"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

📝 LOW: Removing the override without updating .github/workflows/ci.yml leaves the automated contract-update PR body telling maintainers to “bump openapi.config.json python.version”. On the next contract sync, following that instruction would reintroduce the obsolete configuration and contradict the new info.version source-of-truth behavior. Update that workflow message in this PR to direct reviewers to assess the contract version instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated the contract-update PR body: reviewers now confirm the upstream contract info.version bump instead of editing openapi.config.json.

@glenn-jocher
glenn-jocher merged commit 94e5084 into main Aug 15, 2026
5 checks passed
@glenn-jocher
glenn-jocher deleted the version-from-contract branch August 15, 2026 18:55
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 This PR has been successfully merged—thank you, @glenn-jocher!

“Great things are done by a series of small things brought together.” — Vincent van Gogh

This update brings contract-driven package versioning, refreshed OpenAPI metadata, and clearer generated documentation to the SDK while preserving existing request behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants