-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
182 lines (140 loc) · 5.22 KB
/
Copy pathjustfile
File metadata and controls
182 lines (140 loc) · 5.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Everruns SDK - Task automation
uv := `if command -v uv >/dev/null 2>&1; then command -v uv; else printf 'python3 -m uv'; fi`
default:
@just --list
# Setup all SDKs
setup:
cd rust && cargo build
cd python && {{uv}} sync --all-extras
cd typescript && npm ci
# Run all tests
test: test-generate test-rust test-python test-typescript check-examples
# Test repo-level generation helpers
test-generate:
python3 scripts/test_generate.py
# Test Rust SDK
test-rust:
cd rust && cargo test
# Test Python SDK
test-python:
cd python && {{uv}} run pytest
# Test TypeScript SDK
test-typescript:
cd typescript && npm test
# Check SDK examples compile/syntax-check
check-examples: check-examples-rust check-examples-python check-examples-typescript
# Check Rust examples
check-examples-rust:
cd rust && cargo check --examples
# Check Python examples
check-examples-python:
cd python && {{uv}} run python -m py_compile examples/basic.py examples/initial_files.py examples/workspaces.py examples/memories.py
# Check TypeScript examples
check-examples-typescript:
cd typescript && npm run build
cd typescript && npx tsc --noEmit --ignoreConfig --types node examples/basic.ts examples/initial-files.ts examples/workspaces.ts examples/memories.ts
# Lint all SDKs
lint: lint-rust lint-python lint-typescript
# Lint Rust
lint-rust:
cd rust && cargo fmt --check
cd rust && cargo clippy -- -D warnings
# Lint Python
lint-python:
cd python && {{uv}} run ruff check .
cd python && {{uv}} run ruff format --check .
# Lint TypeScript
lint-typescript:
cd typescript && npm run lint
# Auto-fix formatting across all SDKs
fmt:
cd rust && cargo fmt
cd python && {{uv}} run ruff format .
cd typescript && npx prettier --write "src/**/*.ts"
# Generate public SDK models from OpenAPI spec
generate:
python3 scripts/generate.py
# Verify generated public models are current
generate-check:
python3 scripts/generate.py --check
# Sync OpenAPI from upstream and regenerate public models
sync-openapi:
python3 scripts/generate.py --sync-openapi
# Run coverage for all SDKs
coverage:
cd rust && cargo llvm-cov --lcov --output-path lcov.info
cd python && {{uv}} run pytest --cov=everruns_sdk --cov-report=xml
cd typescript && npm test -- --coverage
# Pre-push checks (~30s): lint + commit attribution
pre-push:
bash scripts/lib/pre-push.sh
# Test git identity helpers
test-git-identity:
bash scripts/test-git-identity.sh
# Pre-PR checks
pre-pr: lint test
@echo "All checks passed!"
# Dry-run publish
publish-dry-run:
cd rust && cargo publish --dry-run
cd python && {{uv}} build
cd typescript && npm run build
# Check all cookbooks compile
check-cookbook: check-cookbook-rust check-cookbook-python check-cookbook-typescript
# Check Rust cookbook
check-cookbook-rust:
cd cookbook/rust && cargo check
# Check Python cookbook
check-cookbook-python:
cd cookbook/python && {{uv}} sync
cd cookbook/python && {{uv}} run python -c "import py_compile, glob; [py_compile.compile(f, doraise=True) for f in glob.glob('src/**/*.py', recursive=True)]"
# Check TypeScript cookbook
check-cookbook-typescript:
cd typescript && npm run build
cd cookbook/typescript && npm install
cd cookbook/typescript && npm run check
# Lint all cookbooks
lint-cookbook: lint-cookbook-rust lint-cookbook-python lint-cookbook-typescript
# Lint Rust cookbook
lint-cookbook-rust:
cd cookbook/rust && cargo fmt --check && cargo clippy -- -D warnings
# Lint Python cookbook
lint-cookbook-python:
cd cookbook/python && {{uv}} sync
cd cookbook/python && {{uv}} run ruff check . && {{uv}} run ruff format --check .
# Lint TypeScript cookbook
lint-cookbook-typescript:
cd cookbook/typescript && npm install
cd cookbook/typescript && npm run lint
# Run Rust cookbook (requires EVERRUNS_API_KEY, EVERRUNS_API_URL)
run-cookbook-rust:
cd cookbook/rust && cargo run --bin dad-jokes
# Run Python cookbook (requires EVERRUNS_API_KEY, EVERRUNS_API_URL)
run-cookbook-python:
cd cookbook/python && {{uv}} run python src/main.py
# Run TypeScript cookbook (requires EVERRUNS_API_KEY, EVERRUNS_API_URL)
run-cookbook-typescript:
cd cookbook/typescript && npx tsx src/main.ts
# Prepare a release (update versions across all SDKs)
release-prepare version:
#!/usr/bin/env bash
set -euo pipefail
echo "Preparing release v{{version}}..."
# Update Rust version
sed -i 's/^version = ".*"/version = "{{version}}"/' rust/Cargo.toml
echo "Updated rust/Cargo.toml to {{version}}"
# Update Python version
sed -i 's/^version = ".*"/version = "{{version}}"/' python/pyproject.toml
echo "Updated python/pyproject.toml to {{version}}"
# Update TypeScript version
cd typescript && npm version "{{version}}" --no-git-tag-version && cd ..
echo "Updated typescript/package.json to {{version}}"
echo ""
echo "Next steps:"
echo "1. Edit CHANGELOG.md to add release notes for {{version}}"
echo "2. Run: just release-check"
echo "3. Commit with: git commit -m 'chore(release): prepare v{{version}}'"
echo "4. Create PR titled: chore(release): prepare v{{version}}"
# Verify release is ready
release-check: pre-pr publish-dry-run
@echo "All release checks passed!"