fix(ci): fix build with uv by rhamzeh · Pull Request #225 · openfga/python-sdk
Important
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Walkthrough
The GitHub Actions workflow in .github/workflows/main.yaml was migrated from a pip/setuptools-based process to uv. Steps now use astral-sh/setup-uv, uv sync, uv run pytest, and uv build. Linting via ruff is gated to a specific matrix entry. Codecov upload remains. The publish job mirrors uv setup and build.
Changes
| Cohort / File(s) | Change summary |
|---|---|
CI workflow migration to uv\.github/workflows/main.yaml |
Replaced actions/setup-python with astral-sh/setup-uv (version/checksum, cache inputs). Dependencies installed via uv sync; urllib3 pinned via matrix with uv pip. Added conditional ruff step for Python 3.10/urllib3 1.26.19. Tests run via uv run pytest with coverage. Publish job uses uv sync and uv build. Removed prior pip/setuptools steps and old caching inputs. |
Sequence Diagram(s)
sequenceDiagram
autonumber
actor Dev as GitHub Actions Runner
participant UVSetup as setup-uv Action
participant UV as uv Tooling
participant Pytest as pytest
participant Ruff as ruff
participant Codecov as Codecov Uploader
Dev->>UVSetup: Set up uv and Python (matrix)
Dev->>UV: uv sync
Dev->>UV: uv pip install urllib3==${{ matrix.urllib3-version }}
alt Lint gated (py==3.10 && urllib3==1.26.19)
Dev->>UV: uv run ruff check
UV->>Ruff: Execute lint
end
Dev->>UV: uv run pytest --cov-fail-under 60 --cov openfga_sdk
UV->>Pytest: Execute tests
opt On main/coverage conditions
Dev->>Codecov: Upload coverage
end
sequenceDiagram
autonumber
actor Dev as GitHub Actions Runner (Publish)
participant UVSetup as setup-uv Action
participant UV as uv Tooling
Dev->>UVSetup: Set up uv and Python (3.10)
Dev->>UV: uv sync
Dev->>UV: uv build
note right of UV: Build artifacts (sdist/wheel)
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Pre-merge checks
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
| Title Check | ✅ Passed | The title "fix(ci): fix build with uv" is concise, uses a conventional commit prefix, and accurately describes the primary change in the PR—updating the CI to use uv (setup-uv, uv sync, uv build/run). It clearly signals the intent to fix the CI build and is specific enough for a reviewer scanning history to understand the main purpose. |