Skip to content

Commit c67bae2

Browse files
committed
Merge branch 'main' into allow-dynamic-models-ollama
2 parents 89b1052 + 28956f9 commit c67bae2

File tree

145 files changed

+6488
-5166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+6488
-5166
lines changed

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ omit =
44
*/llama_stack/providers/*
55
*/llama_stack/templates/*
66
.venv/*
7+
*/llama_stack/cli/scripts/*
8+
*/llama_stack/ui/*
9+
*/llama_stack/distribution/ui/*
10+
*/llama_stack/strong_typing/*
11+
*/llama_stack/env.py
12+
*/__init__.py

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# These owners will be the default owners for everything in
44
# the repo. Unless a later match takes precedence,
5-
* @ashwinb @yanxi0830 @hardikjshah @raghotham @ehhuang @terrytangyuan @leseb @bbrowning @reluctantfuturist @mattf
5+
* @ashwinb @yanxi0830 @hardikjshah @raghotham @ehhuang @terrytangyuan @leseb @bbrowning @reluctantfuturist @mattf @slekkala1
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 🔧 Tech Debt
2+
description: Something that is functional but should be improved or optimizied
3+
labels: ["tech-debt"]
4+
body:
5+
- type: textarea
6+
id: tech-debt-explanation
7+
attributes:
8+
label: 🤔 What is the technical debt you think should be addressed?
9+
description: >
10+
A clear and concise description of _what_ needs to be addressed - ensure you are describing
11+
constitutes [technical debt](https://en.wikipedia.org/wiki/Technical_debt) and is not a bug
12+
or feature request.
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: tech-debt-motivation
18+
attributes:
19+
label: 💡 What is the benefit of addressing this technical debt?
20+
description: >
21+
A clear and concise description of _why_ this work is needed.
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: other-thoughts
27+
attributes:
28+
label: Other thoughts
29+
description: >
30+
Any thoughts about how this may result in complexity in the codebase, or other trade-offs.

.github/actions/setup-ollama/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ runs:
77
shell: bash
88
run: |
99
docker run -d --name ollama -p 11434:11434 docker.io/leseb/ollama-with-models
10-
# TODO: rebuild an ollama image with llama-guard3:1b
1110
echo "Verifying Ollama status..."
1211
timeout 30 bash -c 'while ! curl -s -L http://127.0.0.1:11434; do sleep 1 && echo "."; done'
13-
docker exec ollama ollama pull llama-guard3:1b

.github/actions/setup-runner/action.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
description: The Python version to use
66
required: false
77
default: "3.12"
8+
client-version:
9+
description: The llama-stack-client-python version to test against (latest or published)
10+
required: false
11+
default: "latest"
812
runs:
913
using: "composite"
1014
steps:
@@ -20,8 +24,17 @@ runs:
2024
run: |
2125
uv sync --all-groups
2226
uv pip install ollama faiss-cpu
23-
# always test against the latest version of the client
24-
# TODO: this is not necessarily a good idea. we need to test against both published and latest
25-
# to find out backwards compatibility issues.
26-
uv pip install git+https://github.com/meta-llama/llama-stack-client-python.git@main
27+
28+
# Install llama-stack-client-python based on the client-version input
29+
if [ "${{ inputs.client-version }}" = "latest" ]; then
30+
echo "Installing latest llama-stack-client-python from main branch"
31+
uv pip install git+https://github.com/meta-llama/llama-stack-client-python.git@main
32+
elif [ "${{ inputs.client-version }}" = "published" ]; then
33+
echo "Installing published llama-stack-client-python from PyPI"
34+
uv pip install llama-stack-client
35+
else
36+
echo "Invalid client-version: ${{ inputs.client-version }}"
37+
exit 1
38+
fi
39+
2740
uv pip install -e .
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Coverage Badge
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'llama_stack/**'
8+
- 'tests/unit/**'
9+
- 'uv.lock'
10+
- 'pyproject.toml'
11+
- 'requirements.txt'
12+
- '.github/workflows/unit-tests.yml'
13+
- '.github/workflows/coverage-badge.yml' # This workflow
14+
workflow_dispatch:
15+
16+
jobs:
17+
unit-tests:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
23+
- name: Install dependencies
24+
uses: ./.github/actions/setup-runner
25+
26+
- name: Run unit tests
27+
run: |
28+
./scripts/unit-tests.sh
29+
30+
- name: Coverage Badge
31+
uses: tj-actions/coverage-badge-py@1788babcb24544eb5bbb6e0d374df5d1e54e670f # v2.0.4
32+
33+
- name: Verify Changed files
34+
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
35+
id: verify-changed-files
36+
with:
37+
files: coverage.svg
38+
39+
- name: Commit files
40+
if: steps.verify-changed-files.outputs.files_changed == 'true'
41+
run: |
42+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
43+
git config --local user.name "github-actions[bot]"
44+
git add coverage.svg
45+
git commit -m "Updated coverage.svg"
46+
47+
- name: Create Pull Request
48+
if: steps.verify-changed-files.outputs.files_changed == 'true'
49+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
title: "ci: [Automatic] Coverage Badge Update"
53+
body: |
54+
This PR updates the coverage badge based on the latest coverage report.
55+
56+
Automatically generated by the [workflow coverage-badge.yaml](.github/workflows/coverage-badge.yaml)
57+
delete-branch: true

0 commit comments

Comments
 (0)