audit cleanup: cli (#166)
* 📝 docs(STATUS): update last sync timestamp - update last sync timestamp to reflect recent status synchronization * feat(cli): add standalone `aipass` command via console_scripts entry point Resolves APLAN-0074 open item: aipass command now accessible on PATH via pyproject.toml console_scripts. Added cli_entry() wrapper in __init__.py, bypass for seedgo unused_function, and integration test for the entry point. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fe08adf61a
commit
0991d89bb8
@@ -2,7 +2,7 @@
|
||||
|
||||
> Auto-generated by `drone @prax status sync`. Do not edit manually.
|
||||
|
||||
**Last sync:** 2026-03-31 16:42
|
||||
**Last sync:** 2026-03-31 16:55
|
||||
**Summary:** 9 operational | 0 in-progress | 0 not started
|
||||
|
||||
---
|
||||
|
||||
@@ -52,6 +52,7 @@ dev = [
|
||||
|
||||
[project.scripts]
|
||||
drone = "aipass.drone.cli:main"
|
||||
aipass = "aipass.cli:cli_entry"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/aipass"]
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
"file": "system_logs",
|
||||
"standard": "log_structure",
|
||||
"reason": "Prax branch detection bug \u2014 CLI logs land as unknown_branch. Prax confirmed known limitation (2026-03-23), fix pending on prax side."
|
||||
},
|
||||
{
|
||||
"file": "__init__.py",
|
||||
"standard": "unused_function",
|
||||
"reason": "cli_entry() is the console_scripts entry point — called by pyproject.toml [project.scripts] aipass = 'aipass.cli:cli_entry', not from within the codebase"
|
||||
}
|
||||
],
|
||||
"notes": {
|
||||
|
||||
@@ -1,2 +1,14 @@
|
||||
"""CLI - Display formatting for AIPass."""
|
||||
import sys
|
||||
|
||||
from aipass.cli.apps.modules.display import console, header, success, error, warning, section
|
||||
|
||||
|
||||
def cli_entry():
|
||||
"""Console_scripts entry point for the `aipass` command."""
|
||||
from aipass.cli.apps.cli import main
|
||||
|
||||
try:
|
||||
sys.exit(main())
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
|
||||
@@ -13,8 +13,10 @@ import sys
|
||||
from io import StringIO
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from rich.console import Console
|
||||
|
||||
from aipass.cli import cli_entry
|
||||
from aipass.cli.apps import cli as cli_module
|
||||
from aipass.cli.apps.cli import main
|
||||
from aipass.cli.apps.modules import display
|
||||
@@ -136,3 +138,13 @@ class TestModuleRunnable:
|
||||
cwd="/home/patrick/Projects/AIPass/src",
|
||||
)
|
||||
assert result.returncode == 0
|
||||
|
||||
def test_cli_entry_callable(self):
|
||||
"""cli_entry() is the console_scripts entry point — verify it's callable."""
|
||||
cons, _get_output = _make_capture_console()
|
||||
with patch.object(cli_module, "CONSOLE", cons), \
|
||||
patch.object(display, "CONSOLE", cons), \
|
||||
patch("sys.argv", ["aipass", "--version"]), \
|
||||
pytest.raises(SystemExit) as exc_info:
|
||||
cli_entry()
|
||||
assert exc_info.value.code == 0
|
||||
|
||||
Reference in New Issue
Block a user