Skip to content

Commit 7bc925c

Browse files
authored
fix(ci): update pyproject.toml to use uv and remove broken CI (#5)
Stainless by default uses Rye. We need to make it use UV which is more modern (and a significantly upgraded version of Rye.) I have completely nuked existing CI workflows installed by Stainless and instead added our own pre-commit. We will gradually make this more robust by running a lot more tests before landing the client SDK PRs.
1 parent ce13e0f commit 7bc925c

File tree

15 files changed

+218
-400
lines changed

15 files changed

+218
-400
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@ehhuang @ashwinb @raghotham @reluctantfuturist
1+
@ehhuang @ashwinb @raghotham @reluctantfuturist @leseb

.github/workflows/ci.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
18+
with:
19+
python-version: '3.12'
20+
cache: pip
21+
cache-dependency-path: |
22+
**/requirements*.txt
23+
.pre-commit-config.yaml
24+
25+
- uses: pre-commit/action@v3.0.1

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
exclude: 'build/'
2+
3+
default_language_version:
4+
python: python3
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v5.0.0 # Latest stable version
9+
hooks:
10+
- id: check-merge-conflict
11+
- id: check-added-large-files
12+
args: ['--maxkb=1000']
13+
- id: end-of-file-fixer
14+
exclude: '^(.*\.svg)$'
15+
16+
- repo: https://github.com/astral-sh/ruff-pre-commit
17+
rev: v0.9.4
18+
hooks:
19+
- id: ruff
20+
files: ^src/llama_stack_client/lib/.*
21+
args: [
22+
--fix,
23+
--exit-non-zero-on-fix
24+
]
25+
- id: ruff-format
26+
files: ^src/llama_stack_client/lib/.*
27+
28+
- repo: https://github.com/adamchainz/blacken-docs
29+
rev: 1.19.0
30+
hooks:
31+
- id: blacken-docs
32+
files: ^src/llama_stack_client/lib/.*
33+
additional_dependencies:
34+
- black==24.3.0
35+
36+
# - repo: https://github.com/pre-commit/mirrors-mypy
37+
# rev: v1.14.0
38+
# hooks:
39+
# - id: mypy
40+
# additional_dependencies:
41+
# - types-requests
42+
# - types-setuptools
43+
# - pydantic
44+
# args: [--ignore-missing-imports]
45+
46+
# - repo: https://github.com/jsh9/pydoclint
47+
# rev: d88180a8632bb1602a4d81344085cf320f288c5a
48+
# hooks:
49+
# - id: pydoclint
50+
# args: [--config=pyproject.toml]
51+
52+
# - repo: https://github.com/tcort/markdown-link-check
53+
# rev: v3.11.2
54+
# hooks:
55+
# - id: markdown-link-check
56+
# args: ['--quiet']
57+
58+
ci:
59+
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
60+
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.18
1+
3.12

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
".": "0.1.0-alpha.3"
3-
}
3+
}

Brewfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
brew "rye"
2-

0 commit comments

Comments
 (0)