Skip to content

Enforce MAJOR.MINOR.PATCH for all SDK releases - #58

Merged
glenn-jocher merged 4 commits into
mainfrom
fix/pep440-publish
Sep 7, 2026
Merged

Enforce MAJOR.MINOR.PATCH for all SDK releases#58
glenn-jocher merged 4 commits into
mainfrom
fix/pep440-publish

Conversation

@glenn-jocher

@glenn-jocher glenn-jocher commented Sep 7, 2026

Copy link
Copy Markdown
Member

Ultralytics publishes only three-number MAJOR.MINOR.PATCH versions. Remove the post-release scheme introduced in #56: SDK-only output changes now increment the patch number, while newer API contract versions are adopted without downgrading or reusing an existing SDK version. Reject non-three-part contract and package versions during synchronization.

Preserve the existing publishing helper and its version guard. Add an explicit format rejection before manual-recovery handling so that manual dispatch cannot publish a non-three-part version either. The previously proposed PEP 440 publisher replacement has been removed from this PR. No non-three-part SDK version was published to PyPI; the skipped 0.1.31.post1 attempt was followed by the normal 0.1.32 release.

Record the organization-wide PyPI release standard in SDK AGENTS.md and correct the synchronization documentation. The general OpenAPI converter remains independent of this Ultralytics-specific publishing policy.

Validation: executed the actual synchronization workflow steps with the current generator in an isolated repository. Verified SDK-only patch increments, API/SDK version collisions, repeated no-op runs, older-contract handling, newer-contract adoption, suffix rejection, and preservation of the consumer auth provider. Executed the actual publishing decision step with the installed Actions helper and live PyPI metadata: ordinary patch releases and manual recovery retain their behavior; suffixed and incomplete versions fail before publishing outputs, including with manual recovery enabled. All published SDK versions use three numeric components. Python 3.11 and 3.14 CI checks pass.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Updated SDK synchronization and publishing to enforce three-part MAJOR.MINOR.PATCH versions, increment patches for SDK-only changes, and adopt only newer API contract versions.

📊 Key Changes

  • CI now rejects contract or package versions that are not three numeric components.
  • SDK-only generated changes increment the patch number instead of creating .post releases.
  • Synchronization selects the higher of the contract and existing SDK versions, preventing downgrades or reuse of an existing version.
  • Publishing rejects invalid local versions before generating publish outputs, including during manual recovery.
  • Updated AGENTS.md and README.md to document the PyPI versioning and synchronization rules.

🎯 Purpose & Impact

  • API contract updates can advance the SDK to a newer contract version, while generator-only changes produce the next patch release.
  • Non-three-part versions cannot proceed through synchronization or publishing.
  • Existing publishing checks and manual recovery behavior remain in place for valid three-part releases.

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working dependencies Dependency-related topics fixed Bug has been resolved labels Sep 7, 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

Reviewed the publishing workflow and SDK metadata path, including PEP 440 comparisons, missing-project handling, registry error propagation, manual recovery, first-release behavior, and release-tag outputs. The change correctly supports post-release ordering without introducing a concrete regression. LGTM.

@glenn-jocher
glenn-jocher marked this pull request as draft September 7, 2026 16:55
@glenn-jocher glenn-jocher changed the title Publish SDK post-releases using PEP 440 version ordering Enforce MAJOR.MINOR.PATCH for all SDK releases Sep 7, 2026

@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 2

Made with ❤️ by Ultralytics Actions

Since review 1, the post-release scheme has been replaced with patch increments, synchronization now rejects non-three-part contract and package versions, and manual publishing is also format-guarded. The existing publishing helper and version guard remain intact. I found no concrete regressions in the workflow or documentation changes. LGTM.

@glenn-jocher
glenn-jocher marked this pull request as ready for review September 7, 2026 17:27
@UltralyticsAssistant
UltralyticsAssistant dismissed their stale review September 7, 2026 17:28

Superseded by new review

@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 3

Made with ❤️ by Ultralytics Actions

Since review 2, the three-part version enforcement, patch-increment synchronization, manual-dispatch guard, and documentation updates remain consistent. I found no new behavioral regressions or unresolved concrete issues. LGTM.

@glenn-jocher
glenn-jocher merged commit cc6ec3b into main Sep 7, 2026
6 checks passed
@glenn-jocher
glenn-jocher deleted the fix/pep440-publish branch September 7, 2026 17:30
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 PR #58 has been merged—thank you, @glenn-jocher, for strengthening SDK synchronization and publishing!

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

This PR puts that principle into practice by enforcing three-part versions, incrementing patches for SDK-only changes, adopting only newer API contracts, and validating versions before publishing.

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

Labels

bug Something isn't working dependencies Dependency-related topics fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants