mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-05 02:17:31 +00:00
Merge remote-tracking branch 'upstream/main' into oasdiff-for-openai
This commit is contained in:
commit
932064d9ad
645 changed files with 100149 additions and 35820 deletions
|
|
@ -1,5 +1,5 @@
|
|||
exclude: 'build/'
|
||||
|
||||
minimum_pre_commit_version: 4.4.0
|
||||
default_language_version:
|
||||
python: python3.12
|
||||
node: "22"
|
||||
|
|
@ -43,7 +43,6 @@ repos:
|
|||
hooks:
|
||||
- id: ruff
|
||||
args: [ --fix ]
|
||||
exclude: ^src/llama_stack/strong_typing/.*$
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/adamchainz/blacken-docs
|
||||
|
|
@ -107,16 +106,16 @@ repos:
|
|||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
files: ^src/llama_stack/providers/.*$
|
||||
files: ^src/llama_stack/providers/.*$|^scripts/run_openapi_generator.sh$
|
||||
- id: openapi-codegen
|
||||
name: API Spec Codegen
|
||||
additional_dependencies:
|
||||
- uv==0.7.8
|
||||
entry: sh -c './scripts/uv-run-with-index.sh run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
|
||||
entry: sh -c './scripts/uv-run-with-index.sh run scripts/run_openapi_generator.sh'
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
files: ^src/llama_stack/apis/|^docs/openapi_generator/
|
||||
files: ^src/llama_stack_api/.*$
|
||||
- id: check-workflows-use-hashes
|
||||
name: Check GitHub Actions use SHA-pinned actions
|
||||
entry: ./scripts/check-workflows-use-hashes.sh
|
||||
|
|
@ -201,6 +200,27 @@ repos:
|
|||
echo;
|
||||
exit 1;
|
||||
} || true
|
||||
- id: check-api-independence
|
||||
name: Ensure llama_stack_api does not import llama_stack
|
||||
entry: bash
|
||||
language: system
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
always_run: true
|
||||
files: ^src/llama_stack_api/.*$
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
API_DIR="src/llama_stack_api"
|
||||
grep -rn --include="*.py" -E '^[^#]*(import llama_stack\b|from llama_stack\b)' "$API_DIR" 2>/dev/null && {
|
||||
echo "llama_stack_api must not import llama_stack";
|
||||
exit 1;
|
||||
}
|
||||
[ -f "$API_DIR/pyproject.toml" ] && grep -n 'llama_stack[^_]' "$API_DIR/pyproject.toml" && {
|
||||
echo "llama_stack_api must not depend on llama_stack in pyproject.toml";
|
||||
exit 1;
|
||||
}
|
||||
exit 0
|
||||
|
||||
ci:
|
||||
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue