feat(cli): rename binary from da to agnes (BREAKING)
This commit is contained in:
parent
841dcc8447
commit
8c8cdf6a6a
3 changed files with 33 additions and 4 deletions
|
|
@ -44,13 +44,13 @@ def _cli_version() -> str:
|
|||
|
||||
def _version_callback(value: bool) -> None:
|
||||
if value:
|
||||
typer.echo(f"da {_cli_version()}")
|
||||
typer.echo(f"agnes {_cli_version()}")
|
||||
raise typer.Exit()
|
||||
|
||||
|
||||
app = typer.Typer(
|
||||
name="da",
|
||||
help="AI Data Analyst CLI — data sync, queries, and admin for AI agents",
|
||||
name="agnes",
|
||||
help="Agnes — AI Data Analyst CLI",
|
||||
no_args_is_help=True,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ dev = [
|
|||
]
|
||||
|
||||
[project.scripts]
|
||||
da = "cli.main:app"
|
||||
agnes = "cli.main:app"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
|
|
|
|||
29
tests/test_cli_binary_rename.py
Normal file
29
tests/test_cli_binary_rename.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
"""Confirm the wheel installs the binary as `agnes`, not `da`."""
|
||||
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_agnes_command_exists():
|
||||
"""`agnes --version` must succeed once the package is editable-installed."""
|
||||
result = subprocess.run(
|
||||
["agnes", "--version"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0, (
|
||||
f"agnes --version failed (rc={result.returncode}); "
|
||||
f"stdout={result.stdout!r} stderr={result.stderr!r}"
|
||||
)
|
||||
|
||||
|
||||
def test_da_command_no_longer_works():
|
||||
"""Greenfield rename: no backward-compat alias kept for `da`."""
|
||||
result = subprocess.run(
|
||||
["bash", "-c", "command -v da"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode != 0, (
|
||||
f"`da` should NOT be on PATH after the rename, but resolved to: "
|
||||
f"{result.stdout.strip()!r}"
|
||||
)
|
||||
Loading…
Reference in a new issue