atomgit 1.0.12__tar.gz → 1.0.13__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.
- {atomgit-1.0.12 → atomgit-1.0.13}/PKG-INFO +1 -1
- {atomgit-1.0.12 → atomgit-1.0.13}/__init__.py +6 -1
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/PKG-INFO +1 -1
- {atomgit-1.0.12 → atomgit-1.0.13}/cli.py +17 -1
- {atomgit-1.0.12 → atomgit-1.0.13}/setup.py +1 -1
- {atomgit-1.0.12 → atomgit-1.0.13}/MANIFEST.in +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/README.md +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/__main__.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/api.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/SOURCES.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/dependency_links.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/entry_points.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/requires.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/top_level.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/atomgit_hub.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/config.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/rate_limiter.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/requirements.txt +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/setup.cfg +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_download_real.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_endpoint_config.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_repo_id_normalize.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_repo_name_validation.py +0 -0
- {atomgit-1.0.12 → atomgit-1.0.13}/utils.py +0 -0
|
@@ -8,7 +8,12 @@ AtomGit CLI - 基于Transformers和Hugging Face Hub的模型文件上传下载
|
|
|
8
8
|
支持模型和数据集的上传、下载等操作。
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
try:
|
|
12
|
+
from importlib.metadata import version as _pkg_version
|
|
13
|
+
|
|
14
|
+
__version__ = _pkg_version("atomgit")
|
|
15
|
+
except Exception: # 源码运行且未安装时
|
|
16
|
+
__version__ = '0.0.0+source'
|
|
12
17
|
__author__ = 'AtomGit CLI Team'
|
|
13
18
|
__description__ = 'AtomGit模型文件上传下载CLI工具'
|
|
14
19
|
|
|
@@ -38,8 +38,24 @@ except ImportError:
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
def _resolve_cli_version() -> str:
|
|
42
|
+
"""版本号以安装元数据为准,源码环境回退到 __init__ 中的值。"""
|
|
43
|
+
try:
|
|
44
|
+
from importlib.metadata import version as _pkg_version
|
|
45
|
+
|
|
46
|
+
return _pkg_version("atomgit")
|
|
47
|
+
except Exception:
|
|
48
|
+
pass
|
|
49
|
+
try:
|
|
50
|
+
from . import __version__ as _version
|
|
51
|
+
|
|
52
|
+
return _version
|
|
53
|
+
except ImportError:
|
|
54
|
+
return '0.0.0+source'
|
|
55
|
+
|
|
56
|
+
|
|
41
57
|
@click.group()
|
|
42
|
-
@click.version_option(version='
|
|
58
|
+
@click.version_option(version=_resolve_cli_version(), prog_name='atomgit')
|
|
43
59
|
def cli():
|
|
44
60
|
"""AtomGit CLI - 基于Transformers和Hugging Face Hub的AtomGit平台模型文件上传下载工具"""
|
|
45
61
|
pass
|
|
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
|