This repository was archived by the owner on Sep 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 640
Migrates from pip to uv and adds dynamic versioning #6156
Merged
Merged
Conversation
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
- Updated pyproject.toml with project metadata and dependencies - Modified CI/CD workflows to use uv instead of pip - Updated Dockerfile to install and use uv - Updated all documentation to use uv commands - Added MIGRATION_TO_UV.md guide - Created compile-requirements.sh script for uv - Updated .gitignore to exclude uv.lock This migration provides significant performance improvements while maintaining backward compatibility with existing requirements files.
- Simplified pyproject.toml to avoid conflicts with setup.py - Maintained hybrid approach for complex build system compatibility - Verified full installation and functionality with uv - Added verification script for testing uv setup - Updated migration guide with working configuration All tests pass: ✅ uv pip install -e ".[dev]" works correctly ✅ dispatch CLI command functional ✅ All 28 plugins discovered properly ✅ ~10x faster than pip installation
- spacy==3.8.5 was yanked due to incorrect Python 3.13 support - Updated to spacy==3.8.7 which is the latest stable version - Recompiled requirements-base.txt with uv
🚀 BREAKING CHANGE: Fully migrated from setup.py to pyproject.toml ## What's New ✅ Full modern uv support: uv add, uv remove, uv sync, uv lock ✅ Complete pyproject.toml configuration with all dependencies ✅ Lock file generation with uv.lock for reproducible builds ✅ All 28 plugins and entry points migrated ✅ Faster dependency management (~10x speedup) ## Migration Details - Moved setup.py → setup.py.bak (deprecated) - Added complete [project] table to pyproject.toml - All dependencies now in pyproject.toml instead of requirements files - Plugin entry points fully migrated - Updated verification script for modern workflow ## New Commands Available - uv sync --dev # Install all dependencies - uv add package-name # Add new dependency - uv remove package-name # Remove dependency - uv lock --upgrade # Update lock file ## Backward Compatibility - Legacy 'uv pip install -e .[dev]' still works - All existing functionality preserved - CI/CD workflows updated but compatible This completes the full modernization of Dispatch's Python packaging.
🧹 Major Cleanup: Complete transition to pyproject.toml ## Files Removed ❌ setup.cfg - moved configurations to pyproject.toml ❌ requirements-*.in/txt - dependencies now in pyproject.toml ❌ scripts/compile-requirements.sh - replaced by uv lock ❌ package.json/package-lock.json - accidentally committed files ## Configurations Migrated ✅ Moved pytest config from setup.cfg to pyproject.toml ✅ Moved coverage config from setup.cfg to pyproject.toml ✅ Black config already in pyproject.toml ## Modern Workflow - Dependencies: pyproject.toml (declarative) - Lock file: uv.lock (generated) - Testing: pytest with pyproject.toml config - Coverage: coverage with pyproject.toml config ## Benefits - 🗂️ Single source of truth: pyproject.toml - 🔒 Reproducible builds: uv.lock - 🧹 Cleaner repository: fewer config files - 📈 Modern standard: PEP 518/621 compliant This completes the full migration to modern Python packaging standards.
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates Dispatch from pip-based dependency management to uv, implements dynamic versioning, and updates CI/CD workflows. The changes modernize the build system by replacing the custom setup.py with a standard pyproject.toml configuration and leveraging uv for faster dependency resolution and installation.
- Replaces pip with uv for dependency management across all workflows and documentation
- Implements dynamic versioning using versioningit instead of hardcoded version strings
- Consolidates configuration into pyproject.toml while removing legacy setup.py and requirements files
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/dispatch/init.py | Updates version detection to use importlib.metadata instead of pkg_resources |
| setup.py | Completely removes legacy setuptools configuration (439 lines deleted) |
| pyproject.toml | Adds comprehensive project configuration with build system, dependencies, and tooling |
| scripts/verify-uv-setup.sh | Adds verification script for uv setup validation |
| docker/Dockerfile | Updates Docker build process to use uv instead of pip |
| .github/workflows/*.yml | Updates CI workflows to use uv for dependency installation |
| docs/**/*.mdx | Updates documentation to reference uv commands instead of pip |
mvilanova
pushed a commit
that referenced
this pull request
Aug 4, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
chore
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
techdebt
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.
This PR migrates from pip to uv for python dependency installation and management, adds support for dynamic versioning, and updates the playwright and docker Github workflows.