Skip to content

build: migrate development workflow to uv - #800

Open
hasansezertasan wants to merge 1 commit into
python-escpos:masterfrom
hasansezertasan:chore/issue-704-migrate-to-uv
Open

hasansezertasan wants to merge 1 commit into
python-escpos:masterfrom
hasansezertasan:chore/issue-704-migrate-to-uv

Conversation

@hasansezertasan

@hasansezertasan hasansezertasan commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Moves the development workflow to uv. The build backend (setuptools + setuptools-scm) and the tox envs stay as they are.

Dependencies

  • Dependencies live in PEP 735 [dependency-groups] in pyproject.toml (test, docs, lint, typing, tox, and dev which includes them) and are pinned in uv.lock.
  • tox installs from those groups through tox-uv instead of per-env deps. The style env skips installing the package, since ruff doesn't need it.
  • requirements.txt, requirements.test.txt and doc/requirements.txt are removed.
  • Dependabot uses the uv ecosystem for the root, the /doc pip entry is dropped, and the dead docs link in its header is fixed.

CI

  • pythonpackage.yml, pythonpackage-windows.yml, style.yml and documentation.yml are merged into a single ci.yml. The test matrix runs on Ubuntu and Windows for Python 3.11 to 3.15, and lint and the docs build run once, on Ubuntu with Python 3.13.
  • CI sets up uv with astral-sh/setup-uv (pinned to a commit SHA) and runs tox via uv run --locked --only-group tox tox, so the tox versions come from uv.lock.
  • Read the Docs installs with its native uv support (python.install with method: uv, the docs group and the all extra).

Docs

CONTRIBUTING.rst gets a short development setup section.

Notes for reviewers

  • The job names change (checks (<os>, <python>)), and style and docs are no longer separate checks, so any required status checks in the branch protection settings need updating.
  • style and docs now run on pushes to master and on PRs only, not on every push.

Closes #704

Testing

Locally: tox -e style, tox -e mypy and tox -e 3.13. All checks pass in CI on the latest commit, including the Windows jobs, the docs build and the Read the Docs build.

@hasansezertasan
hasansezertasan force-pushed the chore/issue-704-migrate-to-uv branch 2 times, most recently from cfe3660 to e77459a Compare October 24, 2026 04:39
@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.33%. Comparing base (106e251) to head (779acb6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #800   +/-   ##
=======================================
  Coverage   79.33%   79.33%           
=======================================
  Files          21       21           
  Lines        1742     1742           
  Branches      241      241           
=======================================
  Hits         1382     1382           
  Misses        282      282           
  Partials       78       78           
Flag Coverage Δ
unittests 79.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hasansezertasan
hasansezertasan force-pushed the chore/issue-704-migrate-to-uv branch 6 times, most recently from e75734a to fa8b14b Compare October 24, 2026 05:15
@hasansezertasan

Copy link
Copy Markdown
Contributor Author

@patkan the required status checks build (3.11) and docs need to be replaced before this can merge. The workflows are now merged into a single ci.yml, so those names no longer report.

The new checks are checks (ubuntu-latest, 3.11) to checks (ubuntu-latest, 3.15) and checks (windows-latest, 3.11) to checks (windows-latest, 3.15). The docs build runs as a step inside checks (ubuntu-latest, 3.13). Could you update branch protection when you get a chance? 🙏

@patkan

patkan commented Oct 25, 2026

Copy link
Copy Markdown
Member

Yes, I will update the branch protection, this looks overall good to me an uv would be a good enhancement, i just wanted to try it out locally if I see any handling issues.
Once I got to this, I'll see that I will get it merged.

Declare test, docs, lint and typing dependency groups (PEP 735) in
pyproject.toml, commit uv.lock, and drop the requirements files. tox
now installs from the groups through tox-uv, CI uses setup-uv, and
dependabot tracks the lockfile through its uv ecosystem.

Closes python-escpos#704
@hasansezertasan
hasansezertasan force-pushed the chore/issue-704-migrate-to-uv branch from fa8b14b to 779acb6 Compare October 27, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to uv

2 participants