Skip to content

Commit 67df4f5

Browse files
no-jira: Vendor kuberay python client
1 parent 538e780 commit 67df4f5

32 files changed

+4862
-30
lines changed

.github/workflows/coverage-badge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
poetry install --with test
3030
- name: Generate coverage report
3131
run: |
32-
coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest
32+
coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py,src/codeflare_sdk/vendored/**" -m pytest
3333
3434
- name: Coverage Badge
3535
uses: tj-actions/coverage-badge-py@v2

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
poetry install --with test
2727
- name: Test with pytest and check coverage
2828
run: |
29-
coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest
29+
coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py,src/codeflare_sdk/vendored/**" -m pytest
3030
coverage=$(coverage report -m | tail -1 | tail -c 4 | head -c 2)
3131
if (( $coverage < 90 )); then echo "Coverage failed at ${coverage}%"; exit 1; else echo "Coverage passed, ${coverage}%"; fi
3232
- name: Upload to Codecov

poetry.lock

Lines changed: 1 addition & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ description = "Python SDK for codeflare client"
99

1010
license = "Apache-2.0"
1111

12+
# Exclude vendored tests, examples, and build files from the package
13+
exclude = [
14+
"src/codeflare_sdk/vendored/python_client_test",
15+
"src/codeflare_sdk/vendored/examples",
16+
"src/codeflare_sdk/vendored/pyproject.toml",
17+
"src/codeflare_sdk/vendored/poetry.lock",
18+
"src/codeflare_sdk/vendored/README.md"
19+
]
20+
1221
authors = [
1322
"Michael Clifford <[email protected]>",
1423
"Mustafa Eyceoz <[email protected]>",
@@ -33,7 +42,6 @@ cryptography = "43.0.3"
3342
executing = "1.2.0"
3443
pydantic = ">= 2.10.6"
3544
ipywidgets = "8.1.2"
36-
python-client = { git = "https://github.com/ray-project/kuberay.git", subdirectory = "clients/python-client", rev = "b2fd91b58c2bbe22f9b4f730c5a8f3180c05e570" }
3745

3846
[[tool.poetry.source]]
3947
name = "pypi"
@@ -73,7 +81,7 @@ markers = [
7381
"openshift",
7482
"nvidia_gpu"
7583
]
76-
addopts = "--timeout=900"
84+
addopts = "--timeout=900 --ignore=src/codeflare_sdk/vendored"
7785
testpaths = ["src/codeflare_sdk"]
7886
collect_ignore = ["src/codeflare_sdk/common/utils/unit_test_support.py"]
7987

src/codeflare_sdk/ray/rayjobs/rayjob.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
from codeflare_sdk.common.utils.constants import MOUNT_PATH
2828

2929
from codeflare_sdk.common.utils.utils import get_ray_image_for_python_version
30-
from python_client.kuberay_job_api import RayjobApi
31-
from python_client.kuberay_cluster_api import RayClusterApi
30+
from codeflare_sdk.vendored.python_client.kuberay_job_api import RayjobApi
31+
from codeflare_sdk.vendored.python_client.kuberay_cluster_api import RayClusterApi
3232
from codeflare_sdk.ray.rayjobs.config import ManagedClusterConfig
3333
from codeflare_sdk.ray.rayjobs.runtime_env import (
3434
create_file_secret,
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
10+
# Distribution / packaging
11+
bin/
12+
build/
13+
develop-eggs/
14+
dist/
15+
eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
25+
# Installer logs
26+
pip-log.txt
27+
pip-delete-this-directory.txt
28+
29+
# Unit test / coverage reports
30+
.tox/
31+
htmlcov
32+
.coverage
33+
.cache
34+
nosetests.xml
35+
coverage.xml

0 commit comments

Comments
 (0)