bam-tool 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bam_tool-0.2.0/.gitignore +43 -0
- bam_tool-0.2.0/LICENSE +21 -0
- bam_tool-0.2.0/PKG-INFO +476 -0
- bam_tool-0.2.0/README.md +451 -0
- bam_tool-0.2.0/examples/README.md +10 -0
- bam_tool-0.2.0/examples/remote-cache/README.md +148 -0
- bam_tool-0.2.0/pyproject.toml +113 -0
- bam_tool-0.2.0/src/bam_tool/__init__.py +1 -0
- bam_tool-0.2.0/src/bam_tool/__main__.py +8 -0
- bam_tool-0.2.0/src/bam_tool/_version.py +24 -0
- bam_tool-0.2.0/src/bam_tool/cache/__init__.py +24 -0
- bam_tool-0.2.0/src/bam_tool/cli.py +655 -0
- bam_tool-0.2.0/src/bam_tool/config/__init__.py +21 -0
- bam_tool-0.2.0/src/bam_tool/config/parser.py +99 -0
- bam_tool-0.2.0/src/bam_tool/config/schema.py +28 -0
- bam_tool-0.2.0/src/bam_tool/executor/__init__.py +10 -0
- bam_tool-0.2.0/src/bam_tool/executor/executor.py +196 -0
- bam_tool-0.2.0/src/bam_tool/graph/__init__.py +19 -0
- bam_tool-0.2.0/src/bam_tool/graph/builder.py +128 -0
- bam_tool-0.2.0/src/bam_tool/tasks/__init__.py +5 -0
- bam_tool-0.2.0/src/bam_tool/tasks/task.py +18 -0
- bam_tool-0.2.0/tests/component/test_cli_e2e.py +48 -0
- bam_tool-0.2.0/tests/conftest.py +15 -0
- bam_tool-0.2.0/tests/integration/test_cache_manager.py +135 -0
- bam_tool-0.2.0/tests/integration/test_error_context.py +126 -0
- bam_tool-0.2.0/tests/integration/test_errors.py +232 -0
- bam_tool-0.2.0/tests/integration/test_parallel.py +226 -0
- bam_tool-0.2.0/tests/integration/test_rich_progress.py +104 -0
- bam_tool-0.2.0/tests/integration/test_workflows.py +426 -0
- bam_tool-0.2.0/tests/integration-cascache/.gitignore +8 -0
- bam_tool-0.2.0/tests/integration-cascache/README.md +121 -0
- bam_tool-0.2.0/tests/integration-cascache/docker-compose.yml +48 -0
- bam_tool-0.2.0/tests/integration-cascache/run-tests.sh +47 -0
- bam_tool-0.2.0/tests/integration-cascache/test_cascache_integration.py +302 -0
- bam_tool-0.2.0/tests/unit/cache/test_cas_retry.py +293 -0
- bam_tool-0.2.0/tests/unit/test_cache.py +97 -0
- bam_tool-0.2.0/tests/unit/test_cli.py +255 -0
- bam_tool-0.2.0/tests/unit/test_config_parser.py +78 -0
- bam_tool-0.2.0/tests/unit/test_executor.py +132 -0
- bam_tool-0.2.0/tests/unit/test_graph_builder.py +68 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Build & Distribution
|
|
2
|
+
build/
|
|
3
|
+
dist/
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
*.whl
|
|
7
|
+
*.tar.gz
|
|
8
|
+
|
|
9
|
+
# Python
|
|
10
|
+
__pycache__/
|
|
11
|
+
*.py[cod]
|
|
12
|
+
*$py.class
|
|
13
|
+
.Python
|
|
14
|
+
env/
|
|
15
|
+
venv/
|
|
16
|
+
ENV/
|
|
17
|
+
.venv
|
|
18
|
+
|
|
19
|
+
# Testing
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
coverage.xml
|
|
23
|
+
htmlcov/
|
|
24
|
+
.tox/
|
|
25
|
+
|
|
26
|
+
# Type checking
|
|
27
|
+
.pyright/
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
|
|
30
|
+
# Linting & Formatting
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
|
|
33
|
+
# IDE
|
|
34
|
+
.vscode/
|
|
35
|
+
.idea/
|
|
36
|
+
*.swp
|
|
37
|
+
*.swo
|
|
38
|
+
*~
|
|
39
|
+
.DS_Store
|
|
40
|
+
|
|
41
|
+
# OS
|
|
42
|
+
Thumbs.db
|
|
43
|
+
*.log
|
bam_tool-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) {now.year} ladidadida
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
bam_tool-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bam-tool
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: **bam** is a content-addressed workflow orchestration tool that brings the power of content-addressable storage (CAS) to everyday development workflows. Based on side projects cascache_lib and cascache_server.
|
|
5
|
+
Project-URL: Homepage, https://gitlab.com/cascascade/bam
|
|
6
|
+
Project-URL: Repository, https://gitlab.com/cascascade/bam
|
|
7
|
+
Project-URL: Issues, https://gitlab.com/cascascade/bam/-/issues
|
|
8
|
+
Project-URL: Documentation, https://gitlab.com/cascascade/bam/-/blob/main/README.md
|
|
9
|
+
Author-email: ladidadida <stefan@dalada.de>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Requires-Python: >=3.13
|
|
18
|
+
Requires-Dist: cascache-lib>=0.1.0
|
|
19
|
+
Requires-Dist: networkx>=3.0
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
22
|
+
Requires-Dist: rich>=13.0.0
|
|
23
|
+
Requires-Dist: typer>=0.12.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# bam ๐
|
|
27
|
+
|
|
28
|
+
> **โ ๏ธ PROOF OF CONCEPT - NOT PRODUCTION READY**
|
|
29
|
+
>
|
|
30
|
+
> This is a **conceptual implementation** for research and development purposes.
|
|
31
|
+
> While it demonstrates core CAS functionality and includes comprehensive testing,
|
|
32
|
+
> it is **not intended for production use**. Use at your own risk.
|
|
33
|
+
>
|
|
34
|
+
> See [docs/concept.md](docs/concept.md) for more details about the concept and technologies used.
|
|
35
|
+
|
|
36
|
+
**Flow naturally through your build pipeline**
|
|
37
|
+
|
|
38
|
+
bam is a content-addressed workflow orchestration tool that brings the power of content-addressable storage to everyday development workflows. It bridges the gap between simple task runners (like Make/Just) and complex build systems (like Bazel), providing intelligent caching without forcing teams to restructure their projects.
|
|
39
|
+
|
|
40
|
+
bam utilizes its partner projects [cascache_lib](https://gitlab.com/cascascade/cascache_lib) and [cascache_server](https://gitlab.com/cascascade/cascache_server) that implement local and remote CAS caching.
|
|
41
|
+
|
|
42
|
+
**Warning**: Large parts of this tool were generated with the help of AI. Special thanks to Claude Sonnet for the excellent support!
|
|
43
|
+
|
|
44
|
+
## โจ Features
|
|
45
|
+
|
|
46
|
+
- **๐ฏ Smart Caching** - Content-addressed caching with SHA256 for instant rebuilds
|
|
47
|
+
- **๐ Distributed Cache** - Share cache across team with automatic retry and fallback
|
|
48
|
+
- **โก Parallel Execution** - Auto-detect CPU cores and run independent tasks concurrently
|
|
49
|
+
- **๐ณ Interactive Tree View** - Dagger-style dependency visualization with live progress
|
|
50
|
+
- **๐ Dependency Graphs** - Automatic topological sorting and cycle detection
|
|
51
|
+
- **๐ Rich CLI** - Beautiful tree views, error context, and progress tracking
|
|
52
|
+
- **โ๏ธ Simple Config** - Clean YAML syntax with glob patterns and env vars
|
|
53
|
+
- **๐ก๏ธ Type Safe** - Full type hints with pyright validation
|
|
54
|
+
- **๐งช Well Tested** - 85% coverage with 101 passing tests
|
|
55
|
+
- **๐ Documented** - Complete CLI and configuration references
|
|
56
|
+
|
|
57
|
+
## ๐ Quick Start
|
|
58
|
+
|
|
59
|
+
### Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Using uv (recommended)
|
|
63
|
+
uv pip install bam
|
|
64
|
+
|
|
65
|
+
# Using pip
|
|
66
|
+
pip install bam
|
|
67
|
+
|
|
68
|
+
# From source
|
|
69
|
+
git clone https://gitlab.com/cascascade/bam.git
|
|
70
|
+
cd bam
|
|
71
|
+
uv sync
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Your First Workflow
|
|
75
|
+
|
|
76
|
+
Create `bam.yaml` in your project:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
version: 1
|
|
80
|
+
|
|
81
|
+
tasks:
|
|
82
|
+
build:
|
|
83
|
+
command: npm run build
|
|
84
|
+
inputs:
|
|
85
|
+
- "src/**/*.ts"
|
|
86
|
+
- "package.json"
|
|
87
|
+
outputs:
|
|
88
|
+
- "dist/"
|
|
89
|
+
|
|
90
|
+
test:
|
|
91
|
+
command: npm test
|
|
92
|
+
inputs:
|
|
93
|
+
- "src/**/*.ts"
|
|
94
|
+
- "tests/**/*.ts"
|
|
95
|
+
depends_on:
|
|
96
|
+
- build
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Run your tasks:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Execute tasks with dependencies
|
|
103
|
+
bam run test
|
|
104
|
+
|
|
105
|
+
# Parallel execution (auto-detect CPUs)
|
|
106
|
+
bam run test # defaults to parallel
|
|
107
|
+
|
|
108
|
+
# Control parallelism
|
|
109
|
+
bam run test --jobs 4 # use 4 workers
|
|
110
|
+
bam run test --jobs 1 # sequential
|
|
111
|
+
|
|
112
|
+
# Plain output for CI/CD
|
|
113
|
+
bam run test --plain
|
|
114
|
+
|
|
115
|
+
# List available tasks
|
|
116
|
+
bam list
|
|
117
|
+
|
|
118
|
+
# Visualize dependency graph
|
|
119
|
+
bam graph
|
|
120
|
+
|
|
121
|
+
# Validate configuration
|
|
122
|
+
bam validate
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Distributed Caching
|
|
126
|
+
|
|
127
|
+
Share cache across your team with a remote CAS server:
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
cache:
|
|
131
|
+
local:
|
|
132
|
+
enabled: true
|
|
133
|
+
path: .bam/cache
|
|
134
|
+
remote:
|
|
135
|
+
enabled: true
|
|
136
|
+
type: cas
|
|
137
|
+
url: grpc://cas.example.com:50051
|
|
138
|
+
token_file: ~/.bam/cas-token
|
|
139
|
+
timeout: 30.0
|
|
140
|
+
max_retries: 3 # Automatic retry on transient errors
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Features:**
|
|
144
|
+
- ๐ Automatic retry with exponential backoff
|
|
145
|
+
- ๐ Connection pooling for low latency
|
|
146
|
+
- โก Local-first strategy (check local โ remote โ miss)
|
|
147
|
+
- ๐ก๏ธ Graceful fallback to local on network errors
|
|
148
|
+
- ๐ Statistics tracking (future: `bam cache stats`)
|
|
149
|
+
|
|
150
|
+
See [examples/remote-cache/](examples/remote-cache/) for complete setup guide.
|
|
151
|
+
|
|
152
|
+
## ๐ Documentation
|
|
153
|
+
|
|
154
|
+
**User Guides:**
|
|
155
|
+
- [Concept Document](docs/concept.md) - What is bam? Core concepts and technology stack
|
|
156
|
+
- [CLI Reference](docs/cli.md) - Complete command documentation
|
|
157
|
+
- [Configuration Guide](docs/configuration.md) - Full bam.yaml reference
|
|
158
|
+
|
|
159
|
+
**Technical Specifications:**
|
|
160
|
+
- [Architecture](spec/architecture.md) - System design and components
|
|
161
|
+
- [Testing Strategy](spec/testing.md) - Test organization and practices
|
|
162
|
+
- [Design Document](spec/design.md) - Philosophy and principles
|
|
163
|
+
- [Roadmap](spec/roadmap.md) - Implementation timeline and status
|
|
164
|
+
|
|
165
|
+
## ๐ฏ Use Cases
|
|
166
|
+
|
|
167
|
+
### Python Project
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
version: 1
|
|
171
|
+
|
|
172
|
+
tasks:
|
|
173
|
+
lint:
|
|
174
|
+
command: ruff check src/
|
|
175
|
+
inputs: ["src/**/*.py", "pyproject.toml"]
|
|
176
|
+
|
|
177
|
+
typecheck:
|
|
178
|
+
command: pyright
|
|
179
|
+
inputs: ["src/**/*.py"]
|
|
180
|
+
|
|
181
|
+
test:
|
|
182
|
+
command: pytest
|
|
183
|
+
inputs: ["src/**/*.py", "tests/**/*.py"]
|
|
184
|
+
depends_on: [lint, typecheck]
|
|
185
|
+
|
|
186
|
+
build:
|
|
187
|
+
command: python -m build
|
|
188
|
+
inputs: ["src/**/*.py", "pyproject.toml"]
|
|
189
|
+
outputs: ["dist/"]
|
|
190
|
+
depends_on: [test]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Multi-Stage Build
|
|
194
|
+
|
|
195
|
+
```yaml
|
|
196
|
+
version: 1
|
|
197
|
+
|
|
198
|
+
tasks:
|
|
199
|
+
generate:
|
|
200
|
+
command: protoc --python_out=. schema.proto
|
|
201
|
+
inputs: ["schema.proto"]
|
|
202
|
+
outputs: ["schema_pb2.py"]
|
|
203
|
+
|
|
204
|
+
build-backend:
|
|
205
|
+
command: go build -o backend cmd/server/main.go
|
|
206
|
+
inputs: ["cmd/**/*.go", "*.proto"]
|
|
207
|
+
outputs: ["backend"]
|
|
208
|
+
depends_on: [generate]
|
|
209
|
+
|
|
210
|
+
build-frontend:
|
|
211
|
+
command: npm run build
|
|
212
|
+
inputs: ["src/**/*.ts"]
|
|
213
|
+
outputs: ["dist/"]
|
|
214
|
+
depends_on: [generate]
|
|
215
|
+
|
|
216
|
+
package:
|
|
217
|
+
command: docker build -t myapp .
|
|
218
|
+
inputs: ["backend", "dist/", "Dockerfile"]
|
|
219
|
+
depends_on: [build-backend, build-frontend]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## ๐จ CLI Commands
|
|
223
|
+
|
|
224
|
+
### `bam run`
|
|
225
|
+
|
|
226
|
+
Execute tasks with automatic dependency resolution and parallel execution:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Run single task (parallel by default)
|
|
230
|
+
bam run build
|
|
231
|
+
|
|
232
|
+
# Control parallelism
|
|
233
|
+
bam run build --jobs 8 # use 8 workers
|
|
234
|
+
bam run build --jobs auto # auto-detect CPUs
|
|
235
|
+
bam run build --jobs 1 # sequential
|
|
236
|
+
|
|
237
|
+
# Plain output for CI/CD
|
|
238
|
+
bam run build --plain
|
|
239
|
+
|
|
240
|
+
# Run multiple tasks
|
|
241
|
+
bam run lint test build
|
|
242
|
+
|
|
243
|
+
# Dry run (show execution plan)
|
|
244
|
+
bam run --dry-run deploy
|
|
245
|
+
|
|
246
|
+
# Disable caching
|
|
247
|
+
bam run --no-cache build
|
|
248
|
+
|
|
249
|
+
# Quiet mode
|
|
250
|
+
bam run -q test
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Interactive Tree View:**
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
๐ฆ Tasks
|
|
257
|
+
โโโ โ lint-css โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
258
|
+
โ โโโ โ test โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
259
|
+
โ โโโ โ build โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
260
|
+
โ โโโ โ package โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
261
|
+
โโโ โ lint-js โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
262
|
+
โโโ โ lint-python โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
263
|
+
โโโ โ docs โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
|
|
264
|
+
|
|
265
|
+
โ Successfully executed 7 task(s)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Error Context:**
|
|
269
|
+
|
|
270
|
+
When tasks fail, bam provides detailed context:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
โ Task failed: step3
|
|
274
|
+
Dependency chain:
|
|
275
|
+
โโ step1
|
|
276
|
+
โโ step2
|
|
277
|
+
โโ step3
|
|
278
|
+
|
|
279
|
+
โ Skipped 3 task(s) due to failure:
|
|
280
|
+
โข step4
|
|
281
|
+
โข step5
|
|
282
|
+
โข final
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### `bam graph`
|
|
286
|
+
|
|
287
|
+
Visualize task dependencies:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# ASCII tree output
|
|
291
|
+
bam graph
|
|
292
|
+
|
|
293
|
+
# GraphViz DOT format
|
|
294
|
+
bam graph --format dot > graph.dot
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Example Output:**
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
โโ Roots (no dependencies)
|
|
301
|
+
โ โโ setup-database
|
|
302
|
+
โ โโ install-deps
|
|
303
|
+
โ
|
|
304
|
+
โโ Layer 1
|
|
305
|
+
โ โโ lint-python
|
|
306
|
+
โ โโ lint-js
|
|
307
|
+
โ
|
|
308
|
+
โโ Layer 2
|
|
309
|
+
โ โโ test-unit
|
|
310
|
+
โ โโ test-integration
|
|
311
|
+
โ
|
|
312
|
+
โโ Final layer
|
|
313
|
+
โโ deploy
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### `bam validate`
|
|
317
|
+
|
|
318
|
+
Validate configuration:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
bam validate
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Checks:
|
|
325
|
+
- โ
Valid YAML syntax
|
|
326
|
+
- โ
No cyclic dependencies
|
|
327
|
+
- โ
All dependencies defined
|
|
328
|
+
- โ
Required fields present
|
|
329
|
+
|
|
330
|
+
### `bam clean`
|
|
331
|
+
|
|
332
|
+
Manage cache:
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# Clean with confirmation
|
|
336
|
+
bam clean
|
|
337
|
+
|
|
338
|
+
# Force clean
|
|
339
|
+
bam clean --force
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## ๐๏ธ Architecture
|
|
343
|
+
|
|
344
|
+
bam is built as a layered system:
|
|
345
|
+
|
|
346
|
+
**CLI โ Config โ Graph โ Executor โ Cache**
|
|
347
|
+
|
|
348
|
+
Each layer is independently testable with clear interfaces. The architecture supports local-first operation with future remote cache backends.
|
|
349
|
+
|
|
350
|
+
For detailed architecture documentation, see [spec/architecture.md](spec/architecture.md).
|
|
351
|
+
|
|
352
|
+
## ๐งช Testing
|
|
353
|
+
|
|
354
|
+
bam maintains high code quality with comprehensive testing:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
# Run unit and integration tests
|
|
358
|
+
uv run pytest
|
|
359
|
+
|
|
360
|
+
# With coverage report
|
|
361
|
+
uv run pytest --cov=bam --cov-report=html
|
|
362
|
+
|
|
363
|
+
# cascache integration tests (requires Docker)
|
|
364
|
+
./tests/integration-cascache/run-tests.sh
|
|
365
|
+
# Or with just:
|
|
366
|
+
just test-cascache
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Current Status:**
|
|
370
|
+
- 101 tests (51 unit + 47 integration + 3 component)
|
|
371
|
+
- 85% code coverage
|
|
372
|
+
- All quality checks passing
|
|
373
|
+
- Optional: cascache integration tests with Docker Compose
|
|
374
|
+
|
|
375
|
+
**Test Levels:**
|
|
376
|
+
- **Unit tests** (`tests/unit/`) - Fast, mocked dependencies
|
|
377
|
+
- **Integration tests** (`tests/integration/`) - Component interaction, local only
|
|
378
|
+
- **Component tests** (`tests/component/`) - CLI end-to-end tests
|
|
379
|
+
- **cascache integration** (`tests/integration-cascache/`) - Real cascache server (Docker-based)
|
|
380
|
+
|
|
381
|
+
For detailed testing strategy, see [spec/testing.md](spec/testing.md) and [tests/integration-cascache/README.md](tests/integration-cascache/README.md).
|
|
382
|
+
|
|
383
|
+
## ๐ ๏ธ Development
|
|
384
|
+
|
|
385
|
+
### Quick Setup
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Clone and install
|
|
389
|
+
git clone https://gitlab.com/cascascade/bam.git
|
|
390
|
+
cd bam
|
|
391
|
+
uv sync
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Common Commands
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
just lint # Run linter (ruff)
|
|
398
|
+
just typecheck # Type checking (pyright)
|
|
399
|
+
just test # Run tests (pytest)
|
|
400
|
+
just test-cascache # cascache integration tests (Docker)
|
|
401
|
+
just ci-gitlab # Full CI pipeline
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
For detailed development setup and project structure, see [spec/architecture.md](spec/architecture.md).
|
|
405
|
+
|
|
406
|
+
## ๐ Status
|
|
407
|
+
|
|
408
|
+
**Phase 1: Core MVP** โ
COMPLETE (2026-02-12)
|
|
409
|
+
|
|
410
|
+
- โ
Task execution with dependencies
|
|
411
|
+
- โ
Content-addressable caching
|
|
412
|
+
- โ
YAML configuration
|
|
413
|
+
- โ
Rich CLI interface
|
|
414
|
+
- โ
Graph visualization
|
|
415
|
+
- โ
85% test coverage
|
|
416
|
+
- โ
Complete documentation
|
|
417
|
+
|
|
418
|
+
**Phase 2: Parallelization** โ
COMPLETE (2026-02-12)
|
|
419
|
+
|
|
420
|
+
- โ
Async task execution
|
|
421
|
+
- โ
Parallel execution with `--jobs` flag
|
|
422
|
+
- โ
Auto CPU detection
|
|
423
|
+
- โ
Interactive tree view with live progress
|
|
424
|
+
- โ
Dependency-aware scheduling
|
|
425
|
+
- โ
Better error context with dependency chains
|
|
426
|
+
- โ
TTY detection for CI/CD compatibility
|
|
427
|
+
|
|
428
|
+
**Coming Soon:**
|
|
429
|
+
- ๐ Phase 3: Remote Cache Hardening (advanced CAS sync, observability, reliability)
|
|
430
|
+
- ๐จ Phase 4: Enhanced developer experience
|
|
431
|
+
- ๐ค Phase 5: CI/CD optimizations
|
|
432
|
+
|
|
433
|
+
**Future Features:**
|
|
434
|
+
- ๐ณ Docker Integration - Run tasks in isolated containers
|
|
435
|
+
- ๐ Remote Execution - Execute tasks on remote machines via cascache
|
|
436
|
+
- ๐ Plugin System - Extensible architecture for custom integrations
|
|
437
|
+
- ๐ Web Dashboard - Real-time monitoring and analytics
|
|
438
|
+
- ๐จ VSCode Integration - Tasks generator or full extension
|
|
439
|
+
- ๐ค CI Pipeline Generation - Auto-generate GitHub Actions, GitLab CI, etc.
|
|
440
|
+
|
|
441
|
+
See [roadmap.md](spec/roadmap.md) for details.
|
|
442
|
+
|
|
443
|
+
## ๐ค Contributing
|
|
444
|
+
|
|
445
|
+
Contributions welcome! Please:
|
|
446
|
+
|
|
447
|
+
- Follow PEP 8 and project code style
|
|
448
|
+
- Add tests for new functionality
|
|
449
|
+
- Update documentation as needed
|
|
450
|
+
- Run quality checks before submitting
|
|
451
|
+
|
|
452
|
+
Development setup instructions in the [Development](#development) section above.
|
|
453
|
+
|
|
454
|
+
## ๐ License
|
|
455
|
+
|
|
456
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
457
|
+
|
|
458
|
+
## ๐ Links
|
|
459
|
+
|
|
460
|
+
**Documentation:**
|
|
461
|
+
- [Concept Document](docs/concept.md) - Core concepts and technology stack
|
|
462
|
+
- [CLI Reference](docs/cli.md) - Command documentation
|
|
463
|
+
- [Configuration Guide](docs/configuration.md) - YAML reference
|
|
464
|
+
|
|
465
|
+
**Specifications:**
|
|
466
|
+
- [Architecture](spec/architecture.md) - System design
|
|
467
|
+
- [Testing Strategy](spec/testing.md) - Test practices
|
|
468
|
+
- [Design Document](spec/design.md) - Philosophy
|
|
469
|
+
- [Roadmap](spec/roadmap.md) - Implementation plan
|
|
470
|
+
|
|
471
|
+
**Examples:**
|
|
472
|
+
- [examples/](examples/) - Sample projects
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
**Built with:** Python 3.13+ โข uv โข Typer โข Rich โข NetworkX โข Pydantic
|