Skip to content

Commit

Permalink
use setup-python
Browse files Browse the repository at this point in the history
Signed-off-by: chahatsagarmain <[email protected]>
  • Loading branch information
chahatsagarmain committed Jan 23, 2025
1 parent d59900b commit 61b9f04
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ SHELL := /bin/bash

include ./Makefile.setup.mk

.PHONY: setup-python
setup-python:
python3 -m venv .venv && \
source .venv/bin/activate

.PHONY: test-go-unittest
test-go-unittest:
go test -v -cover ./backend/...

.PHONY: test-backend-test
test-backend-test:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-flip-coin.sh" ./.github/resources/scripts/e2e-test.sh && \
TEST_SCRIPT="test-static-loop.sh" ./.github/resources/scripts/e2e-test.sh && \
TEST_SCRIPT="test-dynamic-loop.sh" ./.github/resources/scripts/e2e-test.sh && \
Expand All @@ -17,27 +22,27 @@ test-backend-test:

.PHONY: test-backend-test-flip-coin
test-backend-test-flip-coin:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-flip-coin.sh" ./.github/resources/scripts/e2e-test.sh

.PHONY: test-backend-test-static-loop
test-backend-test-static-loop:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-static-loop.sh" ./.github/resources/scripts/e2e-test.sh

.PHONY: test-backend-test-dynamic-loop
test-backend-test-dynamic-loop:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-dynamic-loop.sh" ./.github/resources/scripts/e2e-test.sh

.PHONY: test-backend-test-env
test-backend-test-env:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-env.sh" ./.github/resources/scripts/e2e-test.sh

.PHONY: test-backend-test-volume
test-backend-test-volume:
source .venv/bin/activate && \
$(MAKE) setup-python && \
TEST_SCRIPT="test-volume.sh" ./.github/resources/scripts/e2e-test.sh

.PHONY: test-backend-visualization-test
Expand Down Expand Up @@ -78,7 +83,7 @@ test-e2e-frontend-integration-test:

.PHONY: test-e2e-basic-sample-tests
test-e2e-basic-sample-tests:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 && \
pip3 install -r ./test/sample-test/requirements.txt && \
python3 ./test/sample-test/sample_test_launcher.py sample_test run_test --namespace kubeflow --test-name sequential --results-gcs-dir output && \
Expand All @@ -88,16 +93,16 @@ test-e2e-basic-sample-tests:
test-frontend:
npm cache clean --force && \
cd ./frontend && npm ci && \
cd ./frontend && npm run test:ci
npm run test:ci

.PHONY: test-grpc-modules
test-grpc-modules:
source .venv/bin/activate && \
$(MAKE) setup-python && \
pytest ./test/gcpc-tests/run_all_gcpc_modules.py

.PHONY: test-kfp-kubernetes-execution-tests
test-kfp-kubernetes-execution-tests:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 && \
export KFP_ENDPOINT="http://localhost:8888" && \
export TIMEOUT_SECONDS=2700 && \
Expand All @@ -109,18 +114,18 @@ test-kfp-kubernetes-library-test:

.PHONY: test-kfp-samples
test-kfp-samples:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 && \
./backend/src/v2/test/sample-test.sh

.PHONY: test-kfp-sdk-runtime-tests
test-kfp-sdk-runtime-tests:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-test-kfp-runtime-code.sh

.PHONY: test-kfp-sdk-tests
test-kfp-sdk-tests:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-tests-sdk.sh

.PHONY: test-kubeflow-pipelines-manifests
Expand All @@ -129,7 +134,7 @@ test-kubeflow-pipelines-manifests:

.PHONY: test-periodic-test
test-periodic-test:
source .venv/bin/activate && \
$(MAKE) setup-python && \
nohup kubectl port-forward --namespace kubeflow svc/ml-pipeline 8888:8888 > kubectl-port-forward.log 2>&1 & \
log_dir=$$(mktemp -d) && \
./test/kfp-functional-test/kfp-functional-test.sh > $$log_dir/periodic_tests.txt
Expand All @@ -140,33 +145,33 @@ test-presubmit-backend:

.PHONY: test-sdk-component-yaml
test-sdk-component-yaml:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-component-yaml.sh

.PHONY: test-sdk-docformatter
test-sdk-docformatter:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-docformatter-sdk.sh

.PHONY: test-sdk-execution
test-sdk-execution:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 && \
export KFP_ENDPOINT="http://localhost:8888" && \
export TIMEOUT_SECONDS=2700 && \
pytest ./test/sdk-execution-tests/sdk_execution_tests.py --asyncio-task-timeout $$TIMEOUT_SECONDS

.PHONY: test-sdk-isort
test-sdk-isort:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-isort-sdk.sh

.PHONY: test-sdk-upgrade
test-sdk-upgrade:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-test-sdk-upgrade.sh

.PHONY: test-sdk-yapf
test-sdk-yapf:
source .venv/bin/activate && \
$(MAKE) setup-python && \
./test/presubmit-yapf-sdk.sh

0 comments on commit 61b9f04

Please sign in to comment.