ChatHFD 0.1.0__tar.gz → 0.1.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.
chathfd-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.4
2
+ Name: ChatHFD
3
+ Version: 0.1.2
4
+ Summary: ChatHFD: ChatArch Hugging Face Download tooling package
5
+ Author-email: ChatArch <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ChatArch/ChatHFD
8
+ Project-URL: Repository, https://github.com/ChatArch/ChatHFD
9
+ Project-URL: Documentation, https://arch.gh.wzhecnu.cn/ChatHFD/
10
+ Keywords: chathfd,chatarch,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle<0.3.0,>=0.2.0
18
+ Requires-Dist: chatenv<0.3.0,>=0.2.10
19
+ Provides-Extra: dev
20
+ Requires-Dist: build; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Requires-Dist: twine; extra == "dev"
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
25
+ Requires-Dist: mkdocs-material<10.0,>=9.5; extra == "docs"
26
+ Requires-Dist: mkdocs-static-i18n<2.0,>=1.2; extra == "docs"
27
+ Requires-Dist: mike<3.0,>=2.0; extra == "docs"
28
+ Dynamic: license-file
29
+
30
+ <div align="center">
31
+ <a href="https://pypi.python.org/pypi/ChatHFD">
32
+ <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
33
+ </a>
34
+ <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
35
+ <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
36
+ </a>
37
+ <a href="https://arch.gh.wzhecnu.cn/ChatHFD/">
38
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
39
+ </a>
40
+ </div>
41
+
42
+ <div align="center">
43
+
44
+ [英文版](README.en.md) | [简体中文](README.md)
45
+ </div>
46
+
47
+ # ChatHFD
48
+
49
+ ChatHFD 是 ChatArch 的 Hugging Face Download(HFD)工具包入口。当前包保持最小 root-only CLI,用于保留可安装、可发现、可发布的工具壳;实际下载编排能力尚未暴露为子命令。
50
+
51
+ ## 快速开始
52
+
53
+ ```bash
54
+ pip install ChatHFD
55
+ chathfd --help
56
+ chathfd --version
57
+ chathfd --tree
58
+ chathfd --tree-brief
59
+ ```
60
+
61
+ ## 当前 CLI 树(`--tree`)
62
+
63
+ ```text
64
+ chathfd
65
+ ├── --help # Show this message and exit.
66
+ ├── --version # Show the version and exit.
67
+ ├── --tree # Print the registered CLI tree and exit.
68
+ └── --tree-brief # Print the registered CLI tree without parameter signatures and exit.
69
+ ```
70
+
71
+ ## CLI 边界
72
+
73
+ - 当前 CLI 只有根选项,没有业务子命令。
74
+ - `--tree` 和 `--tree-brief` 由 ChatStyle 共享 Click tree runtime 从实际注册面生成,公开根名固定为 `chathfd`。
75
+ - `--tree` 默认保留命令参数签名;`--tree-brief` 省略参数签名,但保留命令节点和描述。当前没有参数化子命令,因此两种模式显示同一组 root-only 节点。
76
+ - 后续新增真实 HFD 下载、镜像、缓存或校验命令时,必须先更新 Click 注册面,再用真实 `chathfd --tree` 和 `chathfd --tree-brief` 同步文档。
77
+
78
+ ## 目录结构
79
+
80
+ - `src/`:包源码
81
+ - `tests/code-tests/`:代码测试和历史测试迁移
82
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
83
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
84
+ - `docs/`:长期维护文档,由 MkDocs 构建
85
+
86
+ ## 开发说明
87
+
88
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -0,0 +1,59 @@
1
+ <div align="center">
2
+ <a href="https://pypi.python.org/pypi/ChatHFD">
3
+ <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
4
+ </a>
5
+ <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
6
+ <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
7
+ </a>
8
+ <a href="https://arch.gh.wzhecnu.cn/ChatHFD/">
9
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
10
+ </a>
11
+ </div>
12
+
13
+ <div align="center">
14
+
15
+ [英文版](README.en.md) | [简体中文](README.md)
16
+ </div>
17
+
18
+ # ChatHFD
19
+
20
+ ChatHFD 是 ChatArch 的 Hugging Face Download(HFD)工具包入口。当前包保持最小 root-only CLI,用于保留可安装、可发现、可发布的工具壳;实际下载编排能力尚未暴露为子命令。
21
+
22
+ ## 快速开始
23
+
24
+ ```bash
25
+ pip install ChatHFD
26
+ chathfd --help
27
+ chathfd --version
28
+ chathfd --tree
29
+ chathfd --tree-brief
30
+ ```
31
+
32
+ ## 当前 CLI 树(`--tree`)
33
+
34
+ ```text
35
+ chathfd
36
+ ├── --help # Show this message and exit.
37
+ ├── --version # Show the version and exit.
38
+ ├── --tree # Print the registered CLI tree and exit.
39
+ └── --tree-brief # Print the registered CLI tree without parameter signatures and exit.
40
+ ```
41
+
42
+ ## CLI 边界
43
+
44
+ - 当前 CLI 只有根选项,没有业务子命令。
45
+ - `--tree` 和 `--tree-brief` 由 ChatStyle 共享 Click tree runtime 从实际注册面生成,公开根名固定为 `chathfd`。
46
+ - `--tree` 默认保留命令参数签名;`--tree-brief` 省略参数签名,但保留命令节点和描述。当前没有参数化子命令,因此两种模式显示同一组 root-only 节点。
47
+ - 后续新增真实 HFD 下载、镜像、缓存或校验命令时,必须先更新 Click 注册面,再用真实 `chathfd --tree` 和 `chathfd --tree-brief` 同步文档。
48
+
49
+ ## 目录结构
50
+
51
+ - `src/`:包源码
52
+ - `tests/code-tests/`:代码测试和历史测试迁移
53
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
54
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
55
+ - `docs/`:长期维护文档,由 MkDocs 构建
56
+
57
+ ## 开发说明
58
+
59
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -9,7 +9,7 @@ description = "ChatHFD: ChatArch Hugging Face Download tooling package"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = "MIT"
12
- dependencies = ["click>=8.0", "chatstyle>=0.1.0,<0.2.0", "chatenv>=0.2.0,<0.3.0"]
12
+ dependencies = ["click>=8.0", "chatstyle>=0.2.0,<0.3.0", "chatenv>=0.2.10,<0.3.0"]
13
13
  authors = [{name = "ChatArch", email = "1073853456@qq.com"}]
14
14
  keywords = ["chathfd", "chatarch", "cli"]
15
15
  classifiers = [
@@ -20,7 +20,7 @@ classifiers = [
20
20
  [project.urls]
21
21
  Homepage = "https://github.com/ChatArch/ChatHFD"
22
22
  Repository = "https://github.com/ChatArch/ChatHFD"
23
- Documentation = "https://ChatArch.github.io/ChatHFD"
23
+ Documentation = "https://arch.gh.wzhecnu.cn/ChatHFD/"
24
24
 
25
25
  [project.scripts]
26
26
  chathfd = "chathfd.cli:main"
@@ -30,7 +30,7 @@ chathfd = "chathfd.config"
30
30
 
31
31
  [project.optional-dependencies]
32
32
  dev = ["build", "pytest", "twine"]
33
- docs = ["mkdocs>=1.4.0", "mkdocs-material>=9.0.0", "mike>=2.0.0"]
33
+ docs = ["mkdocs>=1.6,<2.0", "mkdocs-material>=9.5,<10.0", "mkdocs-static-i18n>=1.2,<2.0", "mike>=2.0,<3.0"]
34
34
 
35
35
  [tool.setuptools.dynamic]
36
36
  version = {attr = "chathfd.__version__"}
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.4
2
+ Name: ChatHFD
3
+ Version: 0.1.2
4
+ Summary: ChatHFD: ChatArch Hugging Face Download tooling package
5
+ Author-email: ChatArch <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ChatArch/ChatHFD
8
+ Project-URL: Repository, https://github.com/ChatArch/ChatHFD
9
+ Project-URL: Documentation, https://arch.gh.wzhecnu.cn/ChatHFD/
10
+ Keywords: chathfd,chatarch,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle<0.3.0,>=0.2.0
18
+ Requires-Dist: chatenv<0.3.0,>=0.2.10
19
+ Provides-Extra: dev
20
+ Requires-Dist: build; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Requires-Dist: twine; extra == "dev"
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
25
+ Requires-Dist: mkdocs-material<10.0,>=9.5; extra == "docs"
26
+ Requires-Dist: mkdocs-static-i18n<2.0,>=1.2; extra == "docs"
27
+ Requires-Dist: mike<3.0,>=2.0; extra == "docs"
28
+ Dynamic: license-file
29
+
30
+ <div align="center">
31
+ <a href="https://pypi.python.org/pypi/ChatHFD">
32
+ <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
33
+ </a>
34
+ <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
35
+ <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
36
+ </a>
37
+ <a href="https://arch.gh.wzhecnu.cn/ChatHFD/">
38
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
39
+ </a>
40
+ </div>
41
+
42
+ <div align="center">
43
+
44
+ [英文版](README.en.md) | [简体中文](README.md)
45
+ </div>
46
+
47
+ # ChatHFD
48
+
49
+ ChatHFD 是 ChatArch 的 Hugging Face Download(HFD)工具包入口。当前包保持最小 root-only CLI,用于保留可安装、可发现、可发布的工具壳;实际下载编排能力尚未暴露为子命令。
50
+
51
+ ## 快速开始
52
+
53
+ ```bash
54
+ pip install ChatHFD
55
+ chathfd --help
56
+ chathfd --version
57
+ chathfd --tree
58
+ chathfd --tree-brief
59
+ ```
60
+
61
+ ## 当前 CLI 树(`--tree`)
62
+
63
+ ```text
64
+ chathfd
65
+ ├── --help # Show this message and exit.
66
+ ├── --version # Show the version and exit.
67
+ ├── --tree # Print the registered CLI tree and exit.
68
+ └── --tree-brief # Print the registered CLI tree without parameter signatures and exit.
69
+ ```
70
+
71
+ ## CLI 边界
72
+
73
+ - 当前 CLI 只有根选项,没有业务子命令。
74
+ - `--tree` 和 `--tree-brief` 由 ChatStyle 共享 Click tree runtime 从实际注册面生成,公开根名固定为 `chathfd`。
75
+ - `--tree` 默认保留命令参数签名;`--tree-brief` 省略参数签名,但保留命令节点和描述。当前没有参数化子命令,因此两种模式显示同一组 root-only 节点。
76
+ - 后续新增真实 HFD 下载、镜像、缓存或校验命令时,必须先更新 Click 注册面,再用真实 `chathfd --tree` 和 `chathfd --tree-brief` 同步文档。
77
+
78
+ ## 目录结构
79
+
80
+ - `src/`:包源码
81
+ - `tests/code-tests/`:代码测试和历史测试迁移
82
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
83
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
84
+ - `docs/`:长期维护文档,由 MkDocs 构建
85
+
86
+ ## 开发说明
87
+
88
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -11,4 +11,5 @@ src/chathfd/__init__.py
11
11
  src/chathfd/cli.py
12
12
  src/chathfd/config.py
13
13
  tests/test_cli.py
14
- tests/test_version.py
14
+ tests/test_version.py
15
+ tests/test_workflow_contract.py
@@ -0,0 +1,14 @@
1
+ click>=8.0
2
+ chatstyle<0.3.0,>=0.2.0
3
+ chatenv<0.3.0,>=0.2.10
4
+
5
+ [dev]
6
+ build
7
+ pytest
8
+ twine
9
+
10
+ [docs]
11
+ mkdocs<2.0,>=1.6
12
+ mkdocs-material<10.0,>=9.5
13
+ mkdocs-static-i18n<2.0,>=1.2
14
+ mike<3.0,>=2.0
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.1.0"
5
+ __version__ = "0.1.2"
@@ -0,0 +1,23 @@
1
+ """CLI entrypoint for chathfd."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import click
6
+ from chatstyle import add_tree_option
7
+
8
+ from chathfd import __version__
9
+
10
+
11
+ @click.group(invoke_without_command=True)
12
+ @click.version_option(__version__, prog_name="chathfd")
13
+ @add_tree_option(renderer_options={"root_name": "chathfd"})
14
+ @click.pass_context
15
+ def main(ctx: click.Context) -> None:
16
+ """chathfd command line interface."""
17
+ if ctx.invoked_subcommand is None:
18
+ # Root-only package for now: keep normal Click help behavior when no command is supplied.
19
+ click.echo(ctx.get_help())
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()
@@ -0,0 +1,65 @@
1
+ import click
2
+ from click.testing import CliRunner
3
+
4
+ from chathfd import __version__
5
+ from chathfd.cli import main
6
+
7
+
8
+ EXPECTED_ROOT_TREE = (
9
+ "chathfd\n"
10
+ "├── --help # Show this message and exit.\n"
11
+ "├── --version # Show the version and exit.\n"
12
+ "├── --tree # Print the registered CLI tree and exit.\n"
13
+ "└── --tree-brief # Print the registered CLI tree without parameter signatures and exit.\n"
14
+ )
15
+
16
+
17
+ def test_help_mentions_tree_options():
18
+ result = CliRunner().invoke(main, ["--help"])
19
+
20
+ assert result.exit_code == 0
21
+ assert "--tree" in result.output
22
+ assert "--tree-brief" in result.output
23
+
24
+
25
+ def test_version_option_reports_package_version():
26
+ result = CliRunner().invoke(main, ["--version"])
27
+
28
+ assert result.exit_code == 0
29
+ assert f"chathfd, version {__version__}" in result.output
30
+
31
+
32
+ def test_tree_reports_registered_root_only_surface():
33
+ result = CliRunner().invoke(main, ["--tree"])
34
+
35
+ assert result.exit_code == 0
36
+ assert result.output == EXPECTED_ROOT_TREE
37
+
38
+
39
+ def test_tree_brief_reports_registered_root_only_surface():
40
+ result = CliRunner().invoke(main, ["--tree-brief"])
41
+
42
+ assert result.exit_code == 0
43
+ assert result.output == EXPECTED_ROOT_TREE
44
+
45
+
46
+ def test_tree_modes_include_and_omit_command_parameter_signatures():
47
+ @click.command("download")
48
+ @click.argument("repo_id")
49
+ @click.option("--revision", help="Repository revision.")
50
+ def download(repo_id: str, revision: str | None) -> None:
51
+ """Download a repository."""
52
+
53
+ main.add_command(download)
54
+ try:
55
+ detailed = CliRunner().invoke(main, ["--tree"])
56
+ brief = CliRunner().invoke(main, ["--tree-brief"])
57
+ finally:
58
+ main.commands.pop("download")
59
+
60
+ assert detailed.exit_code == 0
61
+ assert "download <REPO-ID> [--revision REVISION] # Download a repository." in detailed.output
62
+ assert brief.exit_code == 0
63
+ assert "download # Download a repository." in brief.output
64
+ assert "<REPO-ID>" not in brief.output
65
+ assert "[--revision REVISION]" not in brief.output
@@ -2,4 +2,4 @@ from chathfd import __version__
2
2
 
3
3
 
4
4
  def test_version_present():
5
- assert __version__ == "0.1.0"
5
+ assert __version__ == "0.1.2"
@@ -0,0 +1,36 @@
1
+ from pathlib import Path
2
+
3
+ ROOT = Path(__file__).resolve().parents[1]
4
+
5
+
6
+ def test_publish_workflow_is_tag_only_oidc_and_main_guarded():
7
+ workflow = (ROOT / ".github" / "workflows" / "publish.yml").read_text(encoding="utf-8")
8
+
9
+ assert 'tags:' in workflow
10
+ assert 'workflow_dispatch' not in workflow
11
+ assert 'id-token: write' in workflow
12
+ assert 'pypa/gh-action-pypi-publish@release/v1' in workflow
13
+ assert 'git fetch --no-tags origin main:refs/remotes/origin/main' in workflow
14
+ assert 'git merge-base --is-ancestor "${GITHUB_SHA}" refs/remotes/origin/main' in workflow
15
+ legacy_secret_markers = ["PYPI" + "_API_TOKEN", "TWINE" + "_PASSWORD", "secrets" + ".PYPI"]
16
+ assert all(marker not in workflow for marker in legacy_secret_markers)
17
+
18
+
19
+ def test_preview_workflow_uses_site_url_from_mkdocs():
20
+ workflow = (ROOT / ".github" / "workflows" / "preview.yaml").read_text(encoding="utf-8")
21
+
22
+ assert 'CHATARCH_PREVIEW_URL' in workflow
23
+ assert 'site_url=$(python' in workflow
24
+ assert 'mkdocs.yml' in workflow
25
+ assert 'github.io' not in workflow
26
+
27
+
28
+ def test_mkdocs_material_renderer_and_public_domain():
29
+ config = (ROOT / "mkdocs.yml").read_text(encoding="utf-8")
30
+
31
+ assert 'site_url: https://arch.gh.wzhecnu.cn/ChatHFD/' in config
32
+ assert 'mkdocs-static-i18n' not in config # dependency belongs to pyproject; plugin name is i18n
33
+ assert 'pymdownx.emoji' in config
34
+ assert 'material.extensions.emoji.twemoji' in config
35
+ assert 'material.extensions.emoji.to_svg' in config
36
+ assert 'cli-tree.md' in config
chathfd-0.1.0/PKG-INFO DELETED
@@ -1,79 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ChatHFD
3
- Version: 0.1.0
4
- Summary: ChatHFD: ChatArch Hugging Face Download tooling package
5
- Author-email: ChatArch <1073853456@qq.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/ChatArch/ChatHFD
8
- Project-URL: Repository, https://github.com/ChatArch/ChatHFD
9
- Project-URL: Documentation, https://ChatArch.github.io/ChatHFD
10
- Keywords: chathfd,chatarch,cli
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.10
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: click>=8.0
17
- Requires-Dist: chatstyle<0.2.0,>=0.1.0
18
- Requires-Dist: chatenv<0.3.0,>=0.2.0
19
- Provides-Extra: dev
20
- Requires-Dist: build; extra == "dev"
21
- Requires-Dist: pytest; extra == "dev"
22
- Requires-Dist: twine; extra == "dev"
23
- Provides-Extra: docs
24
- Requires-Dist: mkdocs>=1.4.0; extra == "docs"
25
- Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
26
- Requires-Dist: mike>=2.0.0; extra == "docs"
27
- Dynamic: license-file
28
-
29
- <div align="center">
30
- <a href="https://pypi.python.org/pypi/ChatHFD">
31
- <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
32
- </a>
33
- <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
34
- <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
35
- </a>
36
- <a href="https://ChatArch.github.io/ChatHFD">
37
- <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
38
- </a>
39
- </div>
40
-
41
- <div align="center">
42
-
43
- [English](README.en.md) | [简体中文](README.md)
44
- </div>
45
-
46
- # ChatHFD
47
-
48
- ChatHFD: ChatArch Hugging Face Download tooling package
49
-
50
- ## 快速开始
51
-
52
- ```bash
53
- pip install -e ".[dev]"
54
- chathfd --help
55
- chathfd --version
56
- python -m pytest -q
57
- python -m build
58
- ```
59
-
60
- ## CLI 规范
61
-
62
- 这个模板默认依赖 `chatstyle>=0.1.0,<0.2.0` 和 `chatenv>=0.2.0,<0.3.0`,新的命令应优先使用:
63
-
64
- - `CommandSchema` / `CommandField` 描述输入。
65
- - `add_interactive_option()` 提供统一 `-i/-I`。
66
- - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
67
- - 默认生成 `config.py` 和 `chatenv.configs` entry point,使包可被 ChatEnv 发现;只有明确不需要 ChatEnv 接入时才使用 `--without-chatenv-provider`。
68
-
69
- ## 目录结构
70
-
71
- - `src/`:包源码
72
- - `tests/code-tests/`:代码测试和历史测试迁移
73
- - `tests/cli-tests/`:真实 CLI 测试,doc-first
74
- - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
75
- - `docs/`:长期维护文档,由 mkdocs 构建
76
-
77
- ## 开发说明
78
-
79
- 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
chathfd-0.1.0/README.md DELETED
@@ -1,51 +0,0 @@
1
- <div align="center">
2
- <a href="https://pypi.python.org/pypi/ChatHFD">
3
- <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
4
- </a>
5
- <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
6
- <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
7
- </a>
8
- <a href="https://ChatArch.github.io/ChatHFD">
9
- <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
10
- </a>
11
- </div>
12
-
13
- <div align="center">
14
-
15
- [English](README.en.md) | [简体中文](README.md)
16
- </div>
17
-
18
- # ChatHFD
19
-
20
- ChatHFD: ChatArch Hugging Face Download tooling package
21
-
22
- ## 快速开始
23
-
24
- ```bash
25
- pip install -e ".[dev]"
26
- chathfd --help
27
- chathfd --version
28
- python -m pytest -q
29
- python -m build
30
- ```
31
-
32
- ## CLI 规范
33
-
34
- 这个模板默认依赖 `chatstyle>=0.1.0,<0.2.0` 和 `chatenv>=0.2.0,<0.3.0`,新的命令应优先使用:
35
-
36
- - `CommandSchema` / `CommandField` 描述输入。
37
- - `add_interactive_option()` 提供统一 `-i/-I`。
38
- - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
39
- - 默认生成 `config.py` 和 `chatenv.configs` entry point,使包可被 ChatEnv 发现;只有明确不需要 ChatEnv 接入时才使用 `--without-chatenv-provider`。
40
-
41
- ## 目录结构
42
-
43
- - `src/`:包源码
44
- - `tests/code-tests/`:代码测试和历史测试迁移
45
- - `tests/cli-tests/`:真实 CLI 测试,doc-first
46
- - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
47
- - `docs/`:长期维护文档,由 mkdocs 构建
48
-
49
- ## 开发说明
50
-
51
- 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -1,79 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ChatHFD
3
- Version: 0.1.0
4
- Summary: ChatHFD: ChatArch Hugging Face Download tooling package
5
- Author-email: ChatArch <1073853456@qq.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/ChatArch/ChatHFD
8
- Project-URL: Repository, https://github.com/ChatArch/ChatHFD
9
- Project-URL: Documentation, https://ChatArch.github.io/ChatHFD
10
- Keywords: chathfd,chatarch,cli
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.10
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: click>=8.0
17
- Requires-Dist: chatstyle<0.2.0,>=0.1.0
18
- Requires-Dist: chatenv<0.3.0,>=0.2.0
19
- Provides-Extra: dev
20
- Requires-Dist: build; extra == "dev"
21
- Requires-Dist: pytest; extra == "dev"
22
- Requires-Dist: twine; extra == "dev"
23
- Provides-Extra: docs
24
- Requires-Dist: mkdocs>=1.4.0; extra == "docs"
25
- Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
26
- Requires-Dist: mike>=2.0.0; extra == "docs"
27
- Dynamic: license-file
28
-
29
- <div align="center">
30
- <a href="https://pypi.python.org/pypi/ChatHFD">
31
- <img src="https://img.shields.io/pypi/v/ChatHFD.svg" alt="PyPI version" />
32
- </a>
33
- <a href="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml">
34
- <img src="https://github.com/ChatArch/ChatHFD/actions/workflows/ci.yml/badge.svg" alt="Tests" />
35
- </a>
36
- <a href="https://ChatArch.github.io/ChatHFD">
37
- <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
38
- </a>
39
- </div>
40
-
41
- <div align="center">
42
-
43
- [English](README.en.md) | [简体中文](README.md)
44
- </div>
45
-
46
- # ChatHFD
47
-
48
- ChatHFD: ChatArch Hugging Face Download tooling package
49
-
50
- ## 快速开始
51
-
52
- ```bash
53
- pip install -e ".[dev]"
54
- chathfd --help
55
- chathfd --version
56
- python -m pytest -q
57
- python -m build
58
- ```
59
-
60
- ## CLI 规范
61
-
62
- 这个模板默认依赖 `chatstyle>=0.1.0,<0.2.0` 和 `chatenv>=0.2.0,<0.3.0`,新的命令应优先使用:
63
-
64
- - `CommandSchema` / `CommandField` 描述输入。
65
- - `add_interactive_option()` 提供统一 `-i/-I`。
66
- - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
67
- - 默认生成 `config.py` 和 `chatenv.configs` entry point,使包可被 ChatEnv 发现;只有明确不需要 ChatEnv 接入时才使用 `--without-chatenv-provider`。
68
-
69
- ## 目录结构
70
-
71
- - `src/`:包源码
72
- - `tests/code-tests/`:代码测试和历史测试迁移
73
- - `tests/cli-tests/`:真实 CLI 测试,doc-first
74
- - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
75
- - `docs/`:长期维护文档,由 mkdocs 构建
76
-
77
- ## 开发说明
78
-
79
- 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -1,13 +0,0 @@
1
- click>=8.0
2
- chatstyle<0.2.0,>=0.1.0
3
- chatenv<0.3.0,>=0.2.0
4
-
5
- [dev]
6
- build
7
- pytest
8
- twine
9
-
10
- [docs]
11
- mkdocs>=1.4.0
12
- mkdocs-material>=9.0.0
13
- mike>=2.0.0
@@ -1,17 +0,0 @@
1
- """CLI entrypoint for chathfd."""
2
-
3
- import click
4
-
5
- from chathfd import __version__
6
-
7
-
8
- @click.group()
9
- @click.version_option(__version__, prog_name="chathfd")
10
- def main() -> None:
11
- """chathfd command line interface."""
12
- # Add package-specific commands here. Prefer ChatStyle helpers for
13
- # interactive input when a command needs recoverable user input.
14
-
15
-
16
- if __name__ == "__main__":
17
- main()
@@ -1,11 +0,0 @@
1
- from click.testing import CliRunner
2
-
3
- from chathfd import __version__
4
- from chathfd.cli import main
5
-
6
-
7
- def test_version_option_reports_package_version():
8
- result = CliRunner().invoke(main, ["--version"])
9
-
10
- assert result.exit_code == 0
11
- assert f"chathfd, version {__version__}" in result.output
File without changes
File without changes
File without changes