Skip to content

chore: Swith to uv - #432

Merged
martin-majlis merged 11 commits into
masterfrom
trivial-switch-to-uv
Mar 5, 2026
Merged

martin-majlis merged 11 commits into
masterfrom
trivial-switch-to-uv

Conversation

@martin-majlis

@martin-majlis martin-majlis commented Mar 4, 2026 •

Copy link
Copy Markdown
Owner

Pull Request: Switch to uv package manager

Summary

This PR migrates the Wikipedia-API project from traditional pip/requirements.txt to the modern uv package manager, providing faster dependency resolution and installation while maintaining full compatibility with existing workflows.

Key Changes

🚀 Package Management Migration

  • Added pyproject.toml with modern dependency groups (dev, doc, build, testing)
  • Replaced requirements*.txt files with uv-managed dependency groups
  • Added uv.lock for reproducible dependency resolution
  • Removed deprecated setup.py in favor of pyproject.toml build configuration

🔧 Build System Updates

  • Updated all GitHub Actions workflows to use uv run commands
  • Modified Makefile targets to prefix with uv run for consistent execution
  • Updated pre-commit hooks to work with uv environment
  • Fixed Windows compatibility in CI/CD pipelines

📚 Documentation Updates

  • Updated AGENTS.md with new uv-based installation and development instructions
  • Revised CONTRIBUTING.rst to reflect modern development workflow
  • Updated ReadTheDocs configuration for uv compatibility

🧪 Testing & CI Improvements

  • All test commands now use uv run for consistent environment
  • Fixed tox integration with uv
  • Updated CLI test workflows for cross-platform compatibility
  • Improved error handling in test scripts

Benefits

  • ⚡ 10-100x faster dependency installation and resolution
  • 🔄 Reproducible builds with lock file
  • 🛠️ Simplified development setup - single uv command handles everything
  • 📦 Modern Python packaging following PEP 621 standards
  • 🔒 Better dependency isolation and conflict resolution

Breaking Changes

  • Developers now need uv installed (instead of just pip)
  • Installation instructions updated to use uv commands
  • Some Makefile targets now require uv run prefix

Testing

  • All existing tests pass ✅
  • CI/CD pipelines updated and tested ✅
  • Cross-platform compatibility verified ✅
  • Documentation generation works correctly ✅

Migration Guide for Contributors

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install all dependencies
make requirements-all

# Run tests
make run-tests

This change modernizes our development infrastructure while maintaining full backward compatibility for end users of the package.

@martin-majlis
martin-majlis force-pushed the trivial-switch-to-uv branch from 3c4dca5 to 1243cd7 Compare March 4, 2026 20:44
@martin-majlis
martin-majlis force-pushed the trivial-switch-to-uv branch from 1243cd7 to 27e5eb8 Compare March 4, 2026 20:49
@codecov

codecov Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.68%. Comparing base (3930df9) to head (bece196).
⚠️ Report is 156 commits behind head on master.

Files with missing lines Patch % Lines
wikipediaapi/cli.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #432   +/-   ##
=======================================
  Coverage   71.68%   71.68%           
=======================================
  Files           9        9           
  Lines         738      738           
=======================================
  Hits          529      529           
  Misses        209      209           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@martin-majlis
martin-majlis merged commit 8ab02af into master Mar 5, 2026
38 of 39 checks passed
@martin-majlis
martin-majlis deleted the trivial-switch-to-uv branch March 5, 2026 19:42
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.

1 participant