Skip to content

Commit 031a978

Browse files
fix: Run uv commands from root to use pyproject.toml
Update Makefile to run uv commands from the repository root where the pyproject.toml is located, rather than from sdk/python. This ensures uv can properly find project dependencies and configuration. Changes: - Run ruff/mypy with paths from root (sdk/python/feast/, sdk/python/tests/) - Run pytest with paths from root for consistency - Remove --no-project flag as root pyproject.toml is now used This fixes CI failures where uv couldn't find the project configuration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e7c9113 commit 031a978

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ protos: compile-protos-python compile-protos-docs ## Compile protobufs for Pytho
5555
build: protos build-docker ## Build protobufs and Docker images
5656

5757
format-python: ## Format Python code
58-
cd ${ROOT_DIR}/sdk/python && uv run ruff check --fix feast/ tests/
59-
cd ${ROOT_DIR}/sdk/python && uv run ruff format feast/ tests/
58+
uv run ruff check --fix sdk/python/feast/ sdk/python/tests/
59+
uv run ruff format sdk/python/feast/ sdk/python/tests/
6060

6161
lint-python: ## Lint Python code
62-
cd ${ROOT_DIR}/sdk/python && uv run ruff check feast/ tests/
63-
cd ${ROOT_DIR}/sdk/python && uv run mypy feast
62+
uv run ruff check sdk/python/feast/ sdk/python/tests/
63+
cd ${ROOT_DIR}/sdk/python; uv run mypy feast
6464

6565
# New combined target
6666
precommit-check: format-python lint-python ## Run all precommit checks
@@ -74,7 +74,7 @@ install-precommit: ## Install precommit hooks (runs on commit, not push)
7474

7575
# Manual full type check
7676
mypy-full: ## Full MyPy type checking with all files
77-
cd ${ROOT_DIR}/sdk/python && uv run mypy feast tests
77+
cd ${ROOT_DIR}/sdk/python; uv run mypy feast tests
7878

7979
# Run precommit on all files
8080
precommit-all: ## Run all precommit hooks on all files
@@ -172,33 +172,33 @@ benchmark-python-local: ## Run integration + benchmark tests for Python (local d
172172
##@ Tests
173173

174174
test-python-unit: ## Run Python unit tests (use pattern=<pattern> to filter tests, e.g., pattern=milvus, pattern=test_online_retrieval.py, pattern=test_online_retrieval.py::test_get_online_features_milvus)
175-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest -n 8 --color=yes $(if $(pattern),-k "$(pattern)") tests
175+
uv run python -m pytest -n 8 --color=yes $(if $(pattern),-k "$(pattern)") sdk/python/tests
176176

177177
# Fast unit tests only
178178
test-python-unit-fast: ## Run fast unit tests only (no external dependencies)
179-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest tests/unit -n auto -x --tb=short
179+
uv run python -m pytest sdk/python/tests/unit -n auto -x --tb=short
180180

181181
# Changed files only (requires pytest-testmon)
182182
test-python-changed: ## Run tests for changed files only
183-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest --testmon -n 8 --tb=short
183+
uv run python -m pytest --testmon -n 8 --tb=short sdk/python/tests
184184

185185
# Quick smoke test for PRs
186186
test-python-smoke: ## Quick smoke test for development
187-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest \
188-
tests/unit/test_feature_store.py \
189-
tests/unit/test_repo_operations.py \
187+
uv run python -m pytest \
188+
sdk/python/tests/unit/test_feature_store.py \
189+
sdk/python/tests/unit/test_repo_operations.py \
190190
-n 4 --tb=short
191191

192192
test-python-integration: ## Run Python integration tests (CI)
193-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest --tb=short -v -n 8 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
193+
uv run python -m pytest --tb=short -v -n 8 --integration --color=yes --durations=10 --timeout=1200 --timeout_method=thread --dist loadgroup \
194194
-k "(not snowflake or not test_historical_features_main)" \
195195
-m "not rbac_remote_integration_test" \
196196
--log-cli-level=INFO -s \
197-
tests
197+
sdk/python/tests
198198

199199
# Integration tests with better parallelization
200200
test-python-integration-parallel: ## Run integration tests with enhanced parallelization
201-
cd ${ROOT_DIR}/sdk/python && uv run python -m pytest tests/integration \
201+
uv run python -m pytest sdk/python/tests/integration \
202202
-n auto --dist loadscope \
203203
--timeout=300 --tb=short -v \
204204
--integration --color=yes --durations=20

0 commit comments

Comments
 (0)