Skip to content

Commit b70f3dc

Browse files
ndeepak-basetenbolasim
authored andcommitted
Add truss migrate CLI command for model_cache and external_data
Fix mypy type errors by adding explicit dict[str, Any] type annotation to result variable.
2 parents 71c6f27 + 03da245 commit b70f3dc

File tree

123 files changed

+9063
-1119
lines changed

Some content is hidden

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

123 files changed

+9063
-1119
lines changed

.github/workflows/baseten-performance-client-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,15 @@ jobs:
6767
run: |
6868
cd .. # outside the python bindings
6969
cargo test --release
70+
71+
- name: Test reverse proxy
72+
run: |
73+
cd .. # outside the python bindings
74+
# Build reverse proxy
75+
cargo build --release --package baseten-performance-reverse-proxy
76+
77+
# Run unit tests
78+
cargo test --package baseten-performance-reverse-proxy
79+
80+
# Run integration tests
81+
cargo test --package baseten-performance-reverse-proxy --test integration_test

AGENTS.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Truss Development Guide
2+
3+
## Package Management
4+
5+
Use `uv` for all Python operations:
6+
```bash
7+
uv run pytest ... # Run tests
8+
uv run ruff check . # Lint
9+
uv run ruff format . # Format
10+
uv run truss <command> # Run truss CLI
11+
```
12+
13+
## Linting & Formatting
14+
15+
Always run before committing:
16+
```bash
17+
uv run ruff check <files>
18+
uv run ruff format <files>
19+
```
20+
21+
## Code Style
22+
23+
- **No inline imports** - Always place imports at the top of the file in global scope, never inside functions.
24+
25+
## Testing
26+
27+
```bash
28+
# Unit tests
29+
uv run pytest truss/tests/path/to/test.py -v
30+
31+
# Integration tests (requires Docker)
32+
uv run pytest truss/tests/test_custom_server.py -v -m integration
33+
34+
# Run specific test
35+
uv run pytest truss/tests/test_config.py::test_name -v
36+
```
37+
38+
**Test fixtures:** Use `test_data_path` fixture (from `conftest.py`) for config files in `truss/tests/test_data/`.
39+
40+
## Key Code Locations
41+
42+
| Area | Location |
43+
|------|----------|
44+
| Config validation | `truss/base/truss_config.py` |
45+
| TRT-LLM config | `truss/base/trt_llm_config.py` |
46+
| Image building | `truss/contexts/image_builder/serving_image_builder.py` |
47+
| Templates | `truss/templates/` |
48+
| CLI | `truss/cli/cli.py` |
49+
| Remote/push | `truss/remote/baseten/remote.py` |
50+
51+
## Architecture Notes
52+
53+
- `docker_server` deployments use supervisord to manage processes
54+
- Config is validated via Pydantic models in `truss_config.py`
55+
- Image build generates Dockerfile from Jinja templates

CLAUDE.md

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

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Rust build artifacts
2+
target/
3+
**/*.rs.bk
4+
5+
# Node modules (if any)
6+
node_modules/
7+
8+
# Python files (if any)
9+
__pycache__/
10+
*.pyc
11+
*.pyo
12+
*.pyd
13+
.Python
14+
env/
15+
venv/
16+
.venv/
17+
18+
# IDE files
19+
.vscode/
20+
.idea/
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+
29+
# Logs
30+
*.log
31+
32+
# Test files
33+
tests/
34+
*.test
35+
36+
# Documentation
37+
docs/
38+
*.md
39+
!README.md
40+
41+
# Git
42+
.git/
43+
.gitignore
44+
45+
# Environment files
46+
.env
47+
.env.local
48+
.env.*.local
49+
50+
# Temporary files
51+
tmp/
52+
temp/

0 commit comments

Comments
 (0)