Skip to content

Migrate to uv for dependency management#138

Merged
ggoranov-smar merged 2 commits into
mainlinefrom
feature/migrate-to-uv
May 20, 2026
Merged

Migrate to uv for dependency management#138
ggoranov-smar merged 2 commits into
mainlinefrom
feature/migrate-to-uv

Conversation

@ggoranov-smar
Copy link
Copy Markdown
Contributor

Summary

Migrates the project from pip to uv for all dependency management, builds, and publishing.

Changes

  • Build system: Replaced setuptools with hatchling + hatch-vcs
  • Lockfile: Added uv.lock for reproducible builds with conservative pinning (146 packages)
  • CI: Updated all workflows to use uv (hybrid Python 3.7 support with pip for compatibility)
  • Publishing: Replaced twine with uv publish
  • Documentation: Updated CONTRIBUTING.md and ADVANCED.md with uv instructions
  • Cleanup: Removed both Makefiles (root and docs-source) in favor of uv commands
  • Gitignore: Added generated documentation artifacts to .gitignore

Breaking Changes for Contributors

  • Development now requires uv (install: pip install uv)
  • Makefiles removed - use uv commands instead (see CONTRIBUTING.md)
  • Development requires Python 3.8+ (package still supports 3.7+)

End User Impact

None - package remains fully pip-installable from PyPI.

Testing

  • Local tests pass with uv run pytest - All 260 tests passing
  • Local build succeeds with uv build
  • Package installable from built wheel
  • Pylint score: 10.00/10
  • CI passes (all Python versions 3.10-3.14)
  • Build artifacts verified in CI

Related

  • Design spec: docs/superpowers/specs/2026-05-20-uv-migration-design.md
  • Implementation plan: docs/superpowers/plans/2026-05-20-uv-migration.md

ggoranov-smar and others added 2 commits May 20, 2026 13:01
Breaking changes for contributors (not end users):
- Require uv for development (Python 3.8+)
- Remove Makefiles in favor of uv commands
- Add uv.lock for reproducible builds

Changes:
- Replace setuptools with hatchling + hatch-vcs
- Generate uv.lock with conservative pinning (146 packages)
- Update all CI workflows to use uv
- Hybrid Python 3.7 testing (pip) + 3.8-3.14 (uv)
- Replace twine with uv publish
- Update contributor documentation
- Remove root and docs-source Makefiles
- Add generated docs artifacts to .gitignore

End users unaffected - package remains pip-installable.

Validation:
- All 260 tests passing
- Pylint score: 10.00/10
- Package builds and installs successfully

See docs/superpowers/specs/2026-05-20-uv-migration-design.md

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
- Add blank line before list in ADVANCED.md
- Add blank lines around code fences in CONTRIBUTING.md
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 26155601823

Warning

No base build found for commit 5367982 on mainline.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 74.613%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 10923
Covered Lines: 8150
Line Coverage: 74.61%
Coverage Strength: 6.72 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@smar-kaloyan-gangov smar-kaloyan-gangov left a comment

Choose a reason for hiding this comment

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

LGTM

@ggoranov-smar ggoranov-smar merged commit e6702a8 into mainline May 20, 2026
20 of 25 checks passed
@ggoranov-smar ggoranov-smar deleted the feature/migrate-to-uv branch May 20, 2026 10:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the repository’s packaging, development workflows, and CI/publishing pipeline from a pip/setuptools-centric setup to uv, using hatchling + hatch-vcs for builds and VCS-based versioning.

Changes:

  • Switched build backend from setuptools/setuptools_scm to hatchling with hatch-vcs version generation.
  • Replaced Makefile-driven dev/docs commands and CI install/build steps with uv sync, uv run, uv build, and uv publish.
  • Updated contributor and advanced documentation to reflect uv-based workflows and removed legacy Makefiles.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Moves build system to hatchling/hatch-vcs and removes twine/setuptools_scm config.
Makefile Removed legacy developer task runner in favor of uv commands.
docs-source/Makefile Removed Sphinx Makefile; docs are built via direct sphinx-* commands under uv run.
CONTRIBUTING.md Adds uv-based development setup and replaces Makefile-based instructions.
ADVANCED.md Updates manual install guidance and separates end-user vs contributor paths.
.gitignore Ignores .venv and generated Sphinx/docs artifacts.
.github/workflows/test-build.yaml Updates CI to use uv for sync/run/build and hybrid handling for legacy Python.
.github/workflows/publish-documentation.yaml Switches docs build steps to uv and runs Sphinx commands via uv run.
.github/workflows/publish-distribution.yaml Switches packaging workflow to uv sync, uv build, and uv publish.
Comments suppressed due to low confidence (1)

.github/workflows/test-build.yaml:117

  • The documentation build outputs HTML to docs-source/_build/html (per the sphinx-build command), but the artifact upload path is set to docs/build/html/, which will likely upload nothing. Update the upload path to match the actual output directory.
        uses: actions/upload-artifact@v4
        with:
          name: html-docs
          path: docs/build/html/
          retention-days: 5

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines 1 to +3
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm>=7.0.1"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
Comment thread CONTRIBUTING.md
Comment on lines +9 to +13
## Development Setup

### Prerequisites

- Python 3.8+ (required for development tooling)
Comment on lines +41 to +50
- name: Install Python dependencies (Python 3.7 only)
if: matrix.python-version == '3.7'
run: |
python -m pip install --upgrade pip
pip install build
- name: Install test dependencies
run: |
pip install .[test]
- name: Install dependencies (Python 3.8+)
if: matrix.python-version != '3.7'
run: |
pip install uv
uv sync --extra test
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.

4 participants