Skip to content

Conversation

tharropoulos
Copy link
Contributor

TLDR

Migrate CI from pip to uv, replace multiple linting tools with Ruff, and remove EOL Python 3.8 support.

Change Summary

CI/CD Modernization:

  1. In .github/workflows/test-and-lint.yml:

    • Replace actions/setup-python with astral-sh/setup-uv@v5 for faster dependency management
    • Switch from pip install to uv sync --locked --all-extras --dev for reproducible builds
    • Update all test/lint commands to use uv run prefix
    • Remove Python 3.8 from test matrix (now supports Python 3.9-3.12)
  2. In .github/workflows/release.yml:

    • Update release workflow to use Python 3.9 instead of 3.8

Code Quality Tool Consolidation:

  1. In pyproject.toml:

    • Add Ruff as the primary linting and formatting tool
    • Remove legacy tools: wemake-python-styleguide, flake8, black
    • Add isort for import sorting compatibility
  2. New Configuration in ruff.toml:

    • Configure Ruff with Python 3.9+ target
    • Enable essential error checking (E4, E7, E9, F, B rules)
    • Set line length to 88 characters matching Black's default
    • Enable docstring code formatting

Bug Fixes:

  1. In src/typesense/stemming_dictionaries.py:
    • Fix exception chaining by adding from err to preserve original exception context

Dependency Management:

  1. Updated lock files:
    • uv.lock: Removed 50+ legacy linting dependencies, added Ruff and isort
    • Significantly reduced dependency tree complexity

Context

This modernization improves CI performance by leveraging uv's faster dependency resolution and installation. Dropping Python 3.8 support aligns with its EOL status and allows use of modern tooling.

@kishorenc kishorenc merged commit f33c6a3 into typesense:master May 27, 2025
4 checks passed
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.

2 participants