Sync uv.lock on release to prevent CI failures #24

Merged
brian merged 2 commits from cursor/sync-uv-lock-on-release into main 2026-07-05 20:27:30 +02:00
Owner

Summary

  • Run uv lock in bump-version.sh after updating pyproject.toml, so the editable package version in the lockfile stays in sync
  • Update the release workflow to install Python/uv and commit uv.lock alongside pyproject.toml on release
  • Document the lockfile sync in the README Releases section

Context

Release commits previously only bumped pyproject.toml, leaving a stale python-repositories version in uv.lock. The next code-quality run would run uv sync, dirty the lockfile, and fail at the pyupgrade step's git diff --exit-code check.

Test plan

  • Merge a versioned PR and confirm the release commit includes both pyproject.toml and uv.lock with matching versions
  • Verify code-quality passes on the commit after release (no dirty tree from uv sync)
## Summary - Run `uv lock` in `bump-version.sh` after updating `pyproject.toml`, so the editable package version in the lockfile stays in sync - Update the release workflow to install Python/uv and commit `uv.lock` alongside `pyproject.toml` on release - Document the lockfile sync in the README Releases section ## Context Release commits previously only bumped `pyproject.toml`, leaving a stale `python-repositories` version in `uv.lock`. The next code-quality run would run `uv sync`, dirty the lockfile, and fail at the pyupgrade step's `git diff --exit-code` check. ## Test plan - [ ] Merge a versioned PR and confirm the release commit includes both `pyproject.toml` and `uv.lock` with matching versions - [ ] Verify code-quality passes on the commit after release (no dirty tree from `uv sync`)
brian added 1 commit 2026-07-05 20:14:44 +02:00
Sync uv.lock on release to keep CI clean.
Code Quality Pipeline / code-quality (pull_request) Failing after 49s
PR Title Check / check-title (pull_request) Successful in 6s
Test Python Package / test (pull_request) Successful in 1m9s
ac487d91f8
Run uv lock during version bumps and commit the lockfile in the release workflow.

Co-authored-by: Cursor <[email protected]>
Member

Test Coverage Report:

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0
rootdir: /workspace/brian/python-repositories
configfile: pyproject.toml
testpaths: tests
plugins: cov-7.1.0, anyio-4.14.1
collected 86 items

tests/integration/connection_aware_interface_test.py ...                 [  3%]
tests/integration/context_aware_interface_test.py ..                     [  5%]
tests/integration/examples_test.py ...                                   [  9%]
tests/integration/json_repository_interface_test.py ....                 [ 13%]
tests/integration/minio_adapter_test.py ............................     [ 46%]
tests/integration/object_repository_interface_test.py ....               [ 51%]
tests/integration/redis_adapter_test.py ......................           [ 76%]
tests/unit/connection_health_test.py .............                       [ 91%]
tests/unit/optional_dependencies_test.py .......                         [100%]

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.3-final-0 ________________

Name                                                            Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    11      1    91%   39
python_repositories/adapters/__init__.py                           13      2    85%   37, 42
python_repositories/adapters/connection_aware_adapter.py           45      0   100%
python_repositories/adapters/minio_adapter.py                     104      1    99%   55
python_repositories/adapters/redis_adapter.py                      81      3    96%   44-46
python_repositories/examples/__init__.py                            0      0   100%
python_repositories/examples/artifact_object_repository.py          9      0   100%
python_repositories/examples/user_json_repository.py               10      0   100%
python_repositories/interfaces/__init__.py                          5      0   100%
python_repositories/interfaces/connection_aware_interface.py        8      0   100%
python_repositories/interfaces/context_aware_interface.py           8      0   100%
python_repositories/interfaces/json_repository_interface.py        10      0   100%
python_repositories/interfaces/object_repository_interface.py      11      0   100%
---------------------------------------------------------------------------------------------
TOTAL                                                             315      7    98%
============================= 86 passed in 29.51s ==============================

**Test Coverage Report:** ``` ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0 rootdir: /workspace/brian/python-repositories configfile: pyproject.toml testpaths: tests plugins: cov-7.1.0, anyio-4.14.1 collected 86 items tests/integration/connection_aware_interface_test.py ... [ 3%] tests/integration/context_aware_interface_test.py .. [ 5%] tests/integration/examples_test.py ... [ 9%] tests/integration/json_repository_interface_test.py .... [ 13%] tests/integration/minio_adapter_test.py ............................ [ 46%] tests/integration/object_repository_interface_test.py .... [ 51%] tests/integration/redis_adapter_test.py ...................... [ 76%] tests/unit/connection_health_test.py ............. [ 91%] tests/unit/optional_dependencies_test.py ....... [100%] ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.12.3-final-0 ________________ Name Stmts Miss Cover Missing --------------------------------------------------------------------------------------------- python_repositories/__init__.py 11 1 91% 39 python_repositories/adapters/__init__.py 13 2 85% 37, 42 python_repositories/adapters/connection_aware_adapter.py 45 0 100% python_repositories/adapters/minio_adapter.py 104 1 99% 55 python_repositories/adapters/redis_adapter.py 81 3 96% 44-46 python_repositories/examples/__init__.py 0 0 100% python_repositories/examples/artifact_object_repository.py 9 0 100% python_repositories/examples/user_json_repository.py 10 0 100% python_repositories/interfaces/__init__.py 5 0 100% python_repositories/interfaces/connection_aware_interface.py 8 0 100% python_repositories/interfaces/context_aware_interface.py 8 0 100% python_repositories/interfaces/json_repository_interface.py 10 0 100% python_repositories/interfaces/object_repository_interface.py 11 0 100% --------------------------------------------------------------------------------------------- TOTAL 315 7 98% ============================= 86 passed in 29.51s ============================== ```
brian added 1 commit 2026-07-05 20:19:41 +02:00
manually updated package version
PR Title Check / check-title (pull_request) Successful in 5s
Test Python Package / test (pull_request) Successful in 1m12s
Code Quality Pipeline / code-quality (pull_request) Successful in 47s
3236f27610
Member

Test Coverage Report:

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0
rootdir: /workspace/brian/python-repositories
configfile: pyproject.toml
testpaths: tests
plugins: cov-7.1.0, anyio-4.14.1
collected 86 items

tests/integration/connection_aware_interface_test.py ...                 [  3%]
tests/integration/context_aware_interface_test.py ..                     [  5%]
tests/integration/examples_test.py ...                                   [  9%]
tests/integration/json_repository_interface_test.py ....                 [ 13%]
tests/integration/minio_adapter_test.py ............................     [ 46%]
tests/integration/object_repository_interface_test.py ....               [ 51%]
tests/integration/redis_adapter_test.py ......................           [ 76%]
tests/unit/connection_health_test.py .............                       [ 91%]
tests/unit/optional_dependencies_test.py .......                         [100%]

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.3-final-0 ________________

Name                                                            Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    11      1    91%   39
python_repositories/adapters/__init__.py                           13      2    85%   37, 42
python_repositories/adapters/connection_aware_adapter.py           45      0   100%
python_repositories/adapters/minio_adapter.py                     104      1    99%   55
python_repositories/adapters/redis_adapter.py                      81      3    96%   44-46
python_repositories/examples/__init__.py                            0      0   100%
python_repositories/examples/artifact_object_repository.py          9      0   100%
python_repositories/examples/user_json_repository.py               10      0   100%
python_repositories/interfaces/__init__.py                          5      0   100%
python_repositories/interfaces/connection_aware_interface.py        8      0   100%
python_repositories/interfaces/context_aware_interface.py           8      0   100%
python_repositories/interfaces/json_repository_interface.py        10      0   100%
python_repositories/interfaces/object_repository_interface.py      11      0   100%
---------------------------------------------------------------------------------------------
TOTAL                                                             315      7    98%
============================= 86 passed in 34.54s ==============================

**Test Coverage Report:** ``` ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0 rootdir: /workspace/brian/python-repositories configfile: pyproject.toml testpaths: tests plugins: cov-7.1.0, anyio-4.14.1 collected 86 items tests/integration/connection_aware_interface_test.py ... [ 3%] tests/integration/context_aware_interface_test.py .. [ 5%] tests/integration/examples_test.py ... [ 9%] tests/integration/json_repository_interface_test.py .... [ 13%] tests/integration/minio_adapter_test.py ............................ [ 46%] tests/integration/object_repository_interface_test.py .... [ 51%] tests/integration/redis_adapter_test.py ...................... [ 76%] tests/unit/connection_health_test.py ............. [ 91%] tests/unit/optional_dependencies_test.py ....... [100%] ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.12.3-final-0 ________________ Name Stmts Miss Cover Missing --------------------------------------------------------------------------------------------- python_repositories/__init__.py 11 1 91% 39 python_repositories/adapters/__init__.py 13 2 85% 37, 42 python_repositories/adapters/connection_aware_adapter.py 45 0 100% python_repositories/adapters/minio_adapter.py 104 1 99% 55 python_repositories/adapters/redis_adapter.py 81 3 96% 44-46 python_repositories/examples/__init__.py 0 0 100% python_repositories/examples/artifact_object_repository.py 9 0 100% python_repositories/examples/user_json_repository.py 10 0 100% python_repositories/interfaces/__init__.py 5 0 100% python_repositories/interfaces/connection_aware_interface.py 8 0 100% python_repositories/interfaces/context_aware_interface.py 8 0 100% python_repositories/interfaces/json_repository_interface.py 10 0 100% python_repositories/interfaces/object_repository_interface.py 11 0 100% --------------------------------------------------------------------------------------------- TOTAL 315 7 98% ============================= 86 passed in 34.54s ============================== ```
brian merged commit 7ed1b34233 into main 2026-07-05 20:27:30 +02:00
brian deleted branch cursor/sync-uv-lock-on-release 2026-07-05 20:27:31 +02:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lille-vemmelund/python-repositories#24