Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate from poetry to uv #594

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9f204f1
chore: migrate from poetry to uv
devin-ai-integration[bot] Jan 28, 2025
8d5cf61
fix: correct urls syntax in pyproject.toml
devin-ai-integration[bot] Jan 28, 2025
02d1d53
fix: convert dependencies to sequence format for uv compatibility
devin-ai-integration[bot] Jan 28, 2025
4c60a56
fix: correct dynamic versioning configuration and dependencies format
devin-ai-integration[bot] Jan 28, 2025
3cdc0af
fix: correct dynamic versioning configuration
devin-ai-integration[bot] Jan 28, 2025
d478b3a
fix: update build system to use uv-dynamic-versioning and add missing…
devin-ai-integration[bot] Jan 28, 2025
df25f1c
fix: convert urls table keys to lowercase for TOML compatibility
devin-ai-integration[bot] Jan 28, 2025
0bbf1aa
fix: correct TOML structure and dependencies placement
devin-ai-integration[bot] Jan 28, 2025
0416c86
fix: move project.urls section after dependencies
devin-ai-integration[bot] Jan 28, 2025
95191bb
fix: add uv as build requirement
devin-ai-integration[bot] Jan 28, 2025
0fd5b4c
chore: switch to setuptools-scm for dynamic versioning
devin-ai-integration[bot] Jan 28, 2025
48c97fa
fix: add setuptools dynamic version configuration
devin-ai-integration[bot] Jan 28, 2025
36d0c2b
fix: move packages configuration to tool.setuptools.packages.find
devin-ai-integration[bot] Jan 28, 2025
d756794
chore: update lint workflow to use uv
devin-ai-integration[bot] Jan 28, 2025
fd90bc4
fix: update setuptools dynamic configuration
devin-ai-integration[bot] Jan 28, 2025
a030324
fix: add virtual environment setup for uv in CI workflows
devin-ai-integration[bot] Jan 28, 2025
be66c35
chore: replace manual uv installation with setup-uv action
devin-ai-integration[bot] Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 33 additions & 24 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,24 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "2.0.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specifc step(s):
- name: Format code
run: poetry run ruff check .
run: |
source .venv/bin/activate
uv run ruff check .

ruff-format-check:
name: Ruff Format Check
Expand All @@ -40,21 +43,24 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specifc step(s):
- name: Check code format
run: poetry run ruff format --check .
run: |
source .venv/bin/activate
uv run ruff format --check .

mypy-check:
name: MyPy Check
Expand All @@ -63,18 +69,21 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specifc step(s):
- name: Check MyPy typing
run: poetry run mypy .
run: |
source .venv/bin/activate
uv run mypy .
112 changes: 62 additions & 50 deletions .github/workflows/python_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,51 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "2.0.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

- name: Run Pytest with Coverage (Fast Tests Only)
timeout-minutes: 60
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
run: >
poetry run coverage run -m pytest
--durations=5 --exitfirst
-m "not slow and not requires_creds and not linting and not flaky"
run: |
source .venv/bin/activate
uv run coverage run -m pytest \
--durations=5 --exitfirst \
-m "not slow and not requires_creds and not linting and not flaky"

- name: Run Pytest with Coverage (Flaky Tests Only)
timeout-minutes: 60
continue-on-error: true
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
run: >
poetry run coverage run -m pytest
uv run coverage run -m pytest
--durations=5 --exitfirst
-m "flaky and not slow and not requires_creds"

- name: Print Coverage Report
if: always()
run: poetry run coverage report
run: |
source .venv/bin/activate
uv run coverage report

- name: Create Coverage Artifacts
if: always()
run: |
poetry run coverage html -d htmlcov
poetry run coverage xml -o htmlcov/coverage.xml
source .venv/bin/activate
uv run coverage html -d htmlcov
uv run coverage xml -o htmlcov/coverage.xml

- name: Upload coverage to GitHub Artifacts
if: always()
Expand All @@ -82,38 +87,40 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specific step(s):
- name: Run Pytest (No-Creds)
timeout-minutes: 60
env:
# Force this to a blank value.
GCP_GSM_CREDENTIALS: ""
run: >
poetry run coverage run -m pytest
--durations=5 --exitfirst
-m "not requires_creds and not linting and not super_slow and not flaky"
run: |
source .venv/bin/activate
uv run coverage run -m pytest \
--durations=5 --exitfirst \
-m "not requires_creds and not linting and not super_slow and not flaky"

- name: Print Coverage Report
if: always()
run: poetry run coverage report
run: uv run coverage report

- name: Create Coverage Artifacts
if: always()
run: |
poetry run coverage html -d htmlcov
poetry run coverage xml -o htmlcov/coverage.xml
uv run coverage html -d htmlcov
uv run coverage xml -o htmlcov/coverage.xml

- name: Upload coverage to GitHub Artifacts
if: always()
Expand Down Expand Up @@ -149,37 +156,39 @@ jobs:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specific step(s):
- name: Run Pytest
timeout-minutes: 60
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
run: >
poetry run coverage run -m pytest
--verbose
-m "not linting and not super_slow and not flaky"
run: |
source .venv/bin/activate
uv run coverage run -m pytest \
--verbose \
-m "not linting and not super_slow and not flaky"

- name: Print Coverage Report
if: always()
run: poetry run coverage report
run: uv run coverage report

- name: Create Coverage Artifacts
if: always()
run: |
poetry run coverage html -d htmlcov
poetry run coverage xml -o htmlcov/coverage.xml
uv run coverage html -d htmlcov
uv run coverage xml -o htmlcov/coverage.xml

- name: Upload coverage to GitHub Artifacts
if: always()
Expand All @@ -198,14 +207,17 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.7.1"
- name: Install dependencies
run: poetry install
cache: 'pip'
- name: Set up uv
uses: astral-sh/setup-uv@v1
- name: Setup environment and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

# Job-specific step(s):
- name: Run Deptry
run: |
poetry run deptry .
source .venv/bin/activate
uv run deptry .
Loading
Loading