kylebarron commented on code in PR #994:
URL: https://github.com/apache/datafusion-python/pull/994#discussion_r1913413498


##########
.github/workflows/build.yml:
##########
@@ -31,11 +31,13 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
       - name: Install dependencies
         run: |
-          python -m pip install --upgrade pip
-          pip install ruff
+          python -m pip install uv

Review Comment:
   Nit: I'd suggest https://github.com/astral-sh/setup-uv for getting `uv` onto 
the actions runners.



##########
.github/workflows/build.yml:
##########
@@ -31,11 +31,13 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
       - name: Install dependencies
         run: |
-          python -m pip install --upgrade pip
-          pip install ruff
+          python -m pip install uv
+          uv venv
+          source .venv/bin/activate

Review Comment:
   ```suggestion
   ```
   You don't need to manually create a virtualenv. uv does that automatically 
for you.



##########
.github/workflows/build.yml:
##########
@@ -31,11 +31,13 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
       - name: Install dependencies
         run: |
-          python -m pip install --upgrade pip
-          pip install ruff
+          python -m pip install uv
+          uv venv
+          source .venv/bin/activate
+          uv sync
       # Update output format to enable automatic inline annotations.
       - name: Run Ruff
         run: |

Review Comment:
   And e.g. also for the Python license file, use `uv run python 
./dev/create_license.py` if that script requires any uv-provided dependencies.



##########
.github/workflows/build.yml:
##########
@@ -31,11 +31,13 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
       - name: Install dependencies
         run: |
-          python -m pip install --upgrade pip
-          pip install ruff
+          python -m pip install uv
+          uv venv
+          source .venv/bin/activate
+          uv sync
       # Update output format to enable automatic inline annotations.
       - name: Run Ruff
         run: |

Review Comment:
   Below, I'd suggest `uv run ruff ...` to ensure that the ruff installed from 
within the uv virtualenv is being used.



##########
.github/workflows/build.yml:
##########
@@ -97,6 +93,13 @@ jobs:
           version: "27.4"
           repo-token: ${{ secrets.GITHUB_TOKEN }}
 
+      - name: Install dependencies and build
+        run:  |
+          python -m pip install uv
+          uv venv
+          source .venv/bin/activate
+          uv sync
+
       - name: Build Python package
         run: maturin build --release --strip --features substrait

Review Comment:
   I'd suggest `uv run maturin build ...`



##########
.github/workflows/build.yml:
##########
@@ -31,11 +31,13 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
       - name: Install dependencies
         run: |
-          python -m pip install --upgrade pip
-          pip install ruff
+          python -m pip install uv
+          uv venv
+          source .venv/bin/activate
+          uv sync

Review Comment:
   You can keep this in if you want, but it will also run automatically 
whenever you use a `uv` command.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to