ci(version-check): require uv.lock sync alongside pyproject changes#82
Merged
Merged
Conversation
Resolves CE-202. Mirrors the workflow + script changes from socket-python-cli#204 so the SDK catches lockfile drift the same way the CLI now does: - workflow: trigger paths drop unused setup.py, add uv.lock; new step fails CI if pyproject.toml is modified without uv.lock. - sync_version.py: new run_uv_lock() helper runs 'uv lock' and signals whether the lockfile changed. Wired into all three exit paths (--dev auto-bump, normal auto-bump, already-bumped) so the hook either updates uv.lock for you or tells you to commit it.
|
🚀 Preview package published! Install with: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.1.0.dev5 |
Mirrors socket-python-cli's fix at 0462b77 (in PR #199). The workflow previously only compared the PR version against main, which missed the case where the same or newer version had already been published to PyPI — that would slip through CI and either collide on publish or leave PyPI ahead of the repo. - workflow: hits pypi.org/pypi/socketdev/json, filters to stable (non-prerelease, non-devrelease), requires PR > max(main, PyPI). - sync_version.py: splits PYPI_PROD_API vs PYPI_TEST_API. Stable auto-bumps now use prod PyPI as the floor via find_next_stable_patch_version(). The .devN flow keeps using TestPyPI. New 'already bumped but ≤ PyPI' path auto-corrects the version when somebody bumps to a stale number.
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.
Summary
Resolves CE-202. Mirrors the workflow + script changes from
socket-python-cli#204
so the SDK catches
uv.lockdrift the same way the CLI now does.Changes
.github/workflows/version-check.yml— trigger paths drop the unusedsetup.pyentry, adduv.lock. New CI step fails ifpyproject.tomlwas modified without a matching
uv.lockupdate..hooks/sync_version.py— newrun_uv_lock()helper runsuv lockand detects whether the lockfile changed. Wired into all three exit paths (--devauto-bump, normal auto-bump, already-bumped) so the hook either updatesuv.lockfor you or tells you to commit it.No
pyproject.tomlorsocketdev/**changes in this PR, so the version-check workflow won't fire on its own merge (no version bump needed).Test plan
Manual smoke: ran
.hooks/sync_version.pyin three local states.uv lock, exited 1 with "Please git add and uv.lock + commit".uv lock, no changes, exited 0.uv lock-changed branch covered above — single helper drives all three exits.ref: CE-202