Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@mvilanova
Copy link
Contributor

@mvilanova mvilanova commented Jul 25, 2025

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.

- 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.
@mvilanova mvilanova self-assigned this Jul 25, 2025
@mvilanova mvilanova added enhancement New feature or request dependencies Pull requests that update a dependency file techdebt chore labels Jul 25, 2025
@mvilanova mvilanova changed the title Migrates from pip to uv and adds dynamic versioning [WIP] Migrates from pip to uv and adds dynamic versioning Jul 25, 2025

This comment was marked as outdated.

@mvilanova mvilanova changed the title [WIP] Migrates from pip to uv and adds dynamic versioning Migrates from pip to uv and adds dynamic versioning Jul 28, 2025
@mvilanova mvilanova requested a review from Copilot July 29, 2025 18:07
Copy link
Contributor

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

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

@whitdog47 whitdog47 merged commit 956ddbc into main Jul 31, 2025
14 checks passed
@whitdog47 whitdog47 deleted the feature/migrate-pip-to-uv branch July 31, 2025 21:10
whitdog47 added a commit that referenced this pull request Aug 4, 2025
mvilanova pushed a commit that referenced this pull request Aug 4, 2025
@mvilanova mvilanova restored the feature/migrate-pip-to-uv branch August 4, 2025 17:51
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants