Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periodic sync upstream KF to midstream ODH #62

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions .github/workflows/build-image-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Test container image build and deployment
on:
pull_request:
paths-ignore:
- 'LICENSE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'
- 'clients/python/**'
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
- "clients/python/docs/**"
env:
IMG_ORG: opendatahub
IMG_REPO: model-registry
Expand Down Expand Up @@ -55,3 +55,25 @@ jobs:
- name: Wait for Test Registry Deployment
run: |
kubectl wait --for=condition=Available=true modelregistries/modelregistry-sample --timeout=5m
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt poetry
poetry --version
- name: Build package
working-directory: clients/python
run: |
poetry build --ansi
pip install dist/*.whl
- name: Connect with Python client
run: |
kubectl port-forward service/modelregistry-sample 9090:9090 &
sleep 5
python test/python/test_mr_conn.py localhost 9090
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 make clean model-registry

# Use distroless as minimal base image to package the model-registry binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
WORKDIR /
# copy the registry binary
COPY --from=builder /workspace/model-registry .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.odh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 make clean/odh build/odh

# Use distroless as minimal base image to package the model-registry binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
WORKDIR /
# copy the registry binary
COPY --from=builder /workspace/model-registry .
Expand Down
59 changes: 28 additions & 31 deletions clients/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions clients/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pytest = "^7.4.2"
coverage = { extras = ["toml"], version = "^7.3.2" }
pytest-cov = "^4.1.0"
sphinx-autobuild = "^2021.3.14"
ruff = "^0.1.6"
ruff = "^0.4.4"
mypy = "^1.7.0"
testcontainers = "^3.7.1"

Expand All @@ -55,6 +55,9 @@ line-length = 119

[tool.ruff]
target-version = "py39"
respect-gitignore = true

[tool.ruff.lint]
select = [
"F", # pyflakes
# pycodestyle
Expand All @@ -75,20 +78,15 @@ select = [
"SIM", # flake8-simplify
"UP", # pyupgrade
]
respect-gitignore = true
ignore = [
"D105", # missing docstring in magic method
"E501", # line too long
"S101", # use of assert detected
]
mccabe.max-complexity = 8
per-file-ignores = { "tests/**/*.py" = [
"D", # missing docstring in public module
] }

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
"D", # missing docstring in public module
]

[tool.ruff.mccabe]
max-complexity = 8
Loading
Loading