refactor: Rename Leaf to DeltaSpace for semantic clarity

- Renamed Leaf class to DeltaSpace throughout the codebase
- Updated all imports, method signatures, and variable names
- Updated documentation and comments to reflect the new naming
- DeltaSpace better represents a container for delta-compressed files

The term "DeltaSpace" is more semantically accurate than "Leaf" as it
represents a space/container for managing related files with delta
compression, not a terminal node in a tree structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Simone Scarduzio
2025-09-23 08:05:20 +02:00
parent 0613de9a5e
commit fb3ad0e076
14 changed files with 112 additions and 102 deletions
+3 -3
View File
@@ -196,7 +196,7 @@ deltaglider rm -r s3://backups/2023/
```python
from pathlib import Path
from deltaglider.core import DeltaService, Leaf, ObjectKey
from deltaglider.core import DeltaService, DeltaSpace, ObjectKey
from deltaglider.adapters import (
S3StorageAdapter,
XdeltaAdapter,
@@ -261,8 +261,8 @@ def create_service(
service = create_service()
# Upload a file with automatic delta compression
leaf = Leaf(bucket="my-releases", prefix="v2.0.0")
summary = service.put(Path("my-app-v2.0.0.zip"), leaf)
delta_space = DeltaSpace(bucket="my-releases", prefix="v2.0.0")
summary = service.put(Path("my-app-v2.0.0.zip"), delta_space)
print(f"Operation: {summary.operation}") # 'create_reference' or 'create_delta'
print(f"Stored at: s3://{summary.bucket}/{summary.key}")