Add soup version --full, bump to v0.3.2

- `soup version --full` shows version, Python, GPU backend, installed extras
- Dynamic test count badge via Gist endpoint in CI
- README: Optional Extras table, --verbose note, CSV/Parquet, Changelog link
- 323 tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alpamys 2026-03-05 19:46:16 +05:00
parent ee9aefcc55
commit 83e44a5dd0
6 changed files with 74 additions and 7 deletions

View File

@ -79,6 +79,8 @@ soup train --config soup.yaml
**Confirmation prompts:** `commands/train.py` and `commands/sweep.py` ask for confirmation before starting. Skip with `--yes` / `-y`.
**Version:** `cli.py` `version()` command supports `--full` flag that shows version, Python version, GPU backend, and installed optional extras in one line.
## Code Conventions
- **Line length:** 100 chars (ruff enforced)
@ -107,14 +109,14 @@ soup train --config soup.yaml
## Tests
Test suite (~321 tests) lives in `tests/`:
Test suite lives in `tests/`:
| File | Covers |
|---|---|
| `test_config.py` | Config loading, validation, defaults |
| `test_data.py` | Format detection, conversion, validation |
| `test_gpu.py` | GPU detection, batch size estimation |
| `test_cli.py` | CLI commands basic validation |
| `test_cli.py` | CLI commands, version --full |
| `test_tracker.py` | SQLite experiment tracker |
| `test_runs.py` | `soup runs` CLI commands |
| `test_data_tools.py` | Data convert/merge/dedup/stats commands |

View File

@ -349,6 +349,17 @@ soup doctor
Shows: Python version, GPU availability, all dependency versions, and fix suggestions.
## Version Info
```bash
# Basic version
soup version
# Full system info (useful for bug reports)
soup version --full
# → soup v0.3.2 | Python 3.11.5 | CUDA 12.1 | extras: serve, data
```
## Error Handling
Soup shows friendly error messages by default (2-3 lines with a fix suggestion). For full tracebacks:
@ -500,7 +511,7 @@ soup runs show <run_id> Run details + loss graph
soup runs compare <run_1> <run_2> Compare two runs
soup doctor Check environment
soup quickstart [--dry-run] Full demo
soup version Show version
soup version [--full] Show version (--full: system info)
soup --verbose <command> Full traceback on errors
```

View File

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "soup-cli"
version = "0.3.1"
version = "0.3.2"
description = "Fine-tune LLMs in one command. No SSH, no config hell."
readme = "README.md"
license = "MIT"

View File

@ -1,3 +1,3 @@
"""Soup CLI — Fine-tune LLMs in one command."""
__version__ = "0.3.1"
__version__ = "0.3.2"

View File

@ -60,9 +60,50 @@ data.app.command(name="generate")(generate.generate)
@app.command()
def version():
def version(
full: bool = typer.Option(False, "--full", "-f", help="Show system info and extras"),
):
"""Show Soup CLI version."""
console.print(f"[bold green]soup[/] v{__version__}")
if not full:
console.print(f"[bold green]soup[/] v{__version__}")
return
import platform
parts = [f"[bold green]soup[/] v{__version__}"]
parts.append(f"Python {platform.python_version()}")
# GPU info
try:
import torch
if torch.cuda.is_available():
parts.append(f"CUDA {torch.version.cuda}")
elif hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
parts.append("MPS")
else:
parts.append("CPU only")
except ImportError:
parts.append("no torch")
# Installed extras
extras = []
for name, label in [
("fastapi", "serve"),
("datasketch", "data"),
("lm_eval", "eval"),
("deepspeed", "deepspeed"),
("wandb", "wandb"),
]:
try:
__import__(name)
extras.append(label)
except ImportError:
pass
if extras:
parts.append(f"extras: {', '.join(extras)}")
console.print(" | ".join(parts))
@app.callback(invoke_without_command=True)

View File

@ -14,6 +14,19 @@ def test_version():
assert __version__ in result.output
def test_version_full():
result = runner.invoke(app, ["version", "--full"])
assert result.exit_code == 0
assert __version__ in result.output
assert "Python" in result.output
def test_version_full_short_flag():
result = runner.invoke(app, ["version", "-f"])
assert result.exit_code == 0
assert "Python" in result.output
def test_help():
result = runner.invoke(app, ["--help"])
assert result.exit_code == 0