pyquipu-cli 0.3.0__tar.gz → 0.3.2__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.
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/PKG-INFO +1 -1
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/pyproject.toml +2 -2
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/remote.py +11 -1
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/main.py +37 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/.gitignore +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/__init__.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/__init__.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/axon.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/cache.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/cache.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/export.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/export.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/helpers.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/helpers.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/navigation.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/query.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/query.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/run.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/show.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/show.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/ui.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/commands/workspace.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/config.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/config.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/logger_config.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/logger_config.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/rendering.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/rendering.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/tui.css +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/tui.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/tui.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/ui_utils.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/ui_utils.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/view_model.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/src/quipu/cli/view_model.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/stitcher.lock +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/conftest.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_cache_commands.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_cache_commands.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_cli_interaction.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_cli_interaction.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_export_command.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_export_command.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_navigation_commands.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_query_commands.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_query_commands.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_unfriendly_paths.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_unfriendly_paths.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_workspace_commands.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_tui_logic.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_tui_logic.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_tui_reachability.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_tui_reachability.stitcher.yaml +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_view_model.py +0 -0
- {pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/unit/test_view_model.stitcher.yaml +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyquipu-cli"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
authors = [{ name="doucx", email="doucxldh@gmail.com" }]
|
|
9
9
|
description = "The command-line interface for Quipu."
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -53,4 +53,4 @@ quipu = "quipu.cli.main:app"
|
|
|
53
53
|
[tool.hatch.build.targets.wheel]
|
|
54
54
|
packages = ["src/quipu"]
|
|
55
55
|
# Hatch 默认会自动包含 package_data,如果需要显式包含:
|
|
56
|
-
# include = ["/src/quipu/cli/*.css"]
|
|
56
|
+
# include = ["/src/quipu/cli/*.css"]
|
|
@@ -13,6 +13,7 @@ from quipu.engine.git_db import GitDB
|
|
|
13
13
|
|
|
14
14
|
from ..config import DEFAULT_WORK_DIR
|
|
15
15
|
from ..logger_config import setup_logging
|
|
16
|
+
from .helpers import engine_context
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class SyncMode(str, Enum):
|
|
@@ -120,7 +121,16 @@ def register(app: typer.Typer):
|
|
|
120
121
|
git_db.push_quipu_refs(remote, final_user_id, force=True)
|
|
121
122
|
bus.success(L.sync.run.success.pushForce)
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
# --- 自动数据补水 ---
|
|
125
|
+
# 确保远程拉取的引用立即被 SQLite 索引
|
|
126
|
+
bus.info(L.cache.sync.info.hydrating)
|
|
127
|
+
try:
|
|
128
|
+
with engine_context(work_dir):
|
|
129
|
+
pass
|
|
130
|
+
bus.success(L.cache.sync.success)
|
|
131
|
+
except Exception as e:
|
|
132
|
+
# 使用 bus 进行本地化告警反馈
|
|
133
|
+
bus.warning(L.cache.sync.error, error=str(e))
|
|
124
134
|
|
|
125
135
|
except RuntimeError as e:
|
|
126
136
|
bus.error(L.sync.run.error.generic, error=str(e))
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import importlib.metadata
|
|
1
2
|
import logging
|
|
3
|
+
from typing import Annotated, Optional
|
|
2
4
|
|
|
3
5
|
import typer
|
|
4
6
|
from quipu.common.bus import bus
|
|
@@ -16,6 +18,27 @@ bus.set_renderer(TyperRenderer())
|
|
|
16
18
|
logging.getLogger(__name__)
|
|
17
19
|
|
|
18
20
|
|
|
21
|
+
def version_callback(value: bool):
|
|
22
|
+
if value:
|
|
23
|
+
packages = [
|
|
24
|
+
"pyquipu",
|
|
25
|
+
"pyquipu-application",
|
|
26
|
+
"pyquipu-cli",
|
|
27
|
+
"pyquipu-common",
|
|
28
|
+
"pyquipu-engine",
|
|
29
|
+
"pyquipu-spec",
|
|
30
|
+
"pyquipu-runtime",
|
|
31
|
+
]
|
|
32
|
+
typer.echo("Quipu 套件版本信息:")
|
|
33
|
+
for pkg in packages:
|
|
34
|
+
try:
|
|
35
|
+
v = importlib.metadata.version(pkg)
|
|
36
|
+
typer.echo(f" {pkg:20}: {v}")
|
|
37
|
+
except importlib.metadata.PackageNotFoundError:
|
|
38
|
+
typer.echo(f" {pkg:20}: 未安装")
|
|
39
|
+
raise typer.Exit()
|
|
40
|
+
|
|
41
|
+
|
|
19
42
|
# --- App Definition ---
|
|
20
43
|
app = typer.Typer(
|
|
21
44
|
add_completion=False,
|
|
@@ -27,6 +50,20 @@ app = typer.Typer(
|
|
|
27
50
|
# 注册子命令应用
|
|
28
51
|
app.add_typer(cache.cache_app)
|
|
29
52
|
|
|
53
|
+
|
|
54
|
+
@app.callback()
|
|
55
|
+
def main(
|
|
56
|
+
version: Annotated[
|
|
57
|
+
Optional[bool],
|
|
58
|
+
typer.Option("--version", "-V", callback=version_callback, is_eager=True, help="显示版本信息并退出。"),
|
|
59
|
+
] = None,
|
|
60
|
+
):
|
|
61
|
+
"""
|
|
62
|
+
Quipu: 一个基于 Git 的、用于文件系统状态溯源与文学化操作的工具。
|
|
63
|
+
"""
|
|
64
|
+
pass
|
|
65
|
+
|
|
66
|
+
|
|
30
67
|
# 注册顶级命令
|
|
31
68
|
axon.register(app)
|
|
32
69
|
workspace.register(app)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_cli_interaction.stitcher.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyquipu_cli-0.3.0 → pyquipu_cli-0.3.2}/tests/integration/test_unfriendly_paths.stitcher.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|