kevinjqliu commented on code in PR #4587:
URL: https://github.com/apache/iceberg-python/pull/4587#discussion_r4764848562


##########
Makefile:
##########
@@ -131,32 +133,32 @@ test-integration-rebuild: ## Rebuild integration Docker 
services from scratch
        docker compose -f dev/docker-compose-integration.yml rm -f
        docker compose -f dev/docker-compose-integration.yml build --no-cache
 
-test-s3: ## Run tests marked with @pytest.mark.s3
+test-s3: ## Run tests in tests/io/ marked with @pytest.mark.s3
        sh ./dev/run-s3.sh
-       $(TEST_RUNNER) pytest tests/ -m s3 $(PYTEST_ARGS)
+       uv run $(PYTHON_ARG) --extra s3fs --extra pyarrow $(TEST_CMD) pytest 
tests/io/ -m s3 $(PYTEST_ARGS)

Review Comment:
   using `tests/io/` instead of `tests/` cuts collection from ~15s to ~0.5s.



##########
.github/workflows/python-integration.yml:
##########
@@ -45,10 +45,6 @@ jobs:
       uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # 
v10.2.0
       with:
         enable-cache: true
-    - name: Install system dependencies
-      run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for 
kerberos
-    - name: Install
-      run: make install

Review Comment:
   move dependency pre-req to the `make` commands themselves. 
   
   so this one now lives in `make test-integration`



##########
Makefile:
##########
@@ -111,14 +112,15 @@ test: ## Run all unit tests (excluding integration)
 
 test-integration: test-integration-setup test-integration-exec 
test-integration-cleanup ## Run integration tests
 
-test-integration-setup: install ## Start Docker services for integration tests
+test-integration-setup: ## Start Docker services for integration tests
+       uv sync $(PYTHON_ARG) --inexact --all-extras --no-extra hive-kerberos

Review Comment:
   By default, `uv sync` removes any package in `.venv` that isn't in the 
requested sync set. `--inexact` tells `uv sync` to only install missing 
packages and leave existing ones (like `hive-kerberos`, `docs`, or `notebook` 
packages from a prior `make install`) untouched.



##########
Makefile:
##########
@@ -111,14 +112,15 @@ test: ## Run all unit tests (excluding integration)
 
 test-integration: test-integration-setup test-integration-exec 
test-integration-cleanup ## Run integration tests
 
-test-integration-setup: install ## Start Docker services for integration tests
+test-integration-setup: ## Start Docker services for integration tests
+       uv sync $(PYTHON_ARG) --inexact --all-extras --no-extra hive-kerberos
        docker compose -f dev/docker-compose-integration.yml kill
        docker compose -f dev/docker-compose-integration.yml rm -f
        docker compose -f dev/docker-compose-integration.yml up -d --build 
--wait
-       uv run $(PYTHON_ARG) python dev/provision.py
+       uv run $(PYTHON_ARG) --all-extras --no-extra hive-kerberos python 
dev/provision.py

Review Comment:
   i dont particularly like adding `--no-extra hive-kerberos` in all these 
places, but it shaves 10s off the integration test run so might be worth it 🤷 



##########
.github/workflows/python-integration.yml:
##########
@@ -45,10 +45,6 @@ jobs:
       uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # 
v10.2.0
       with:
         enable-cache: true
-    - name: Install system dependencies
-      run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for 
kerberos

Review Comment:
   integration tests dont need `libkrb5-dev`. 
   
   `libkrb5-dev` is only needed to compile the `kerberos` C extension in the 
`hive-kerberos` extra, which is only exercised by mocked unit tests in 
`tests/catalog/test_hive.py`



-- 
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