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.
Files changed (24) hide show
  1. {atomgit-1.0.12 → atomgit-1.0.13}/PKG-INFO +1 -1
  2. {atomgit-1.0.12 → atomgit-1.0.13}/__init__.py +6 -1
  3. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/PKG-INFO +1 -1
  4. {atomgit-1.0.12 → atomgit-1.0.13}/cli.py +17 -1
  5. {atomgit-1.0.12 → atomgit-1.0.13}/setup.py +1 -1
  6. {atomgit-1.0.12 → atomgit-1.0.13}/MANIFEST.in +0 -0
  7. {atomgit-1.0.12 → atomgit-1.0.13}/README.md +0 -0
  8. {atomgit-1.0.12 → atomgit-1.0.13}/__main__.py +0 -0
  9. {atomgit-1.0.12 → atomgit-1.0.13}/api.py +0 -0
  10. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/SOURCES.txt +0 -0
  11. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/dependency_links.txt +0 -0
  12. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/entry_points.txt +0 -0
  13. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/requires.txt +0 -0
  14. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit.egg-info/top_level.txt +0 -0
  15. {atomgit-1.0.12 → atomgit-1.0.13}/atomgit_hub.py +0 -0
  16. {atomgit-1.0.12 → atomgit-1.0.13}/config.py +0 -0
  17. {atomgit-1.0.12 → atomgit-1.0.13}/rate_limiter.py +0 -0
  18. {atomgit-1.0.12 → atomgit-1.0.13}/requirements.txt +0 -0
  19. {atomgit-1.0.12 → atomgit-1.0.13}/setup.cfg +0 -0
  20. {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_download_real.py +0 -0
  21. {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_endpoint_config.py +0 -0
  22. {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_repo_id_normalize.py +0 -0
  23. {atomgit-1.0.12 → atomgit-1.0.13}/tests/test_repo_name_validation.py +0 -0
  24. {atomgit-1.0.12 → atomgit-1.0.13}/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomgit
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: AtomGit模型文件上传下载CLI工具
5
5
  Home-page: https://atomgit.com/gitcode-ai/atomgit_cli
6
6
  Author: AtomGit CLI Team
@@ -8,7 +8,12 @@ AtomGit CLI - 基于Transformers和Hugging Face Hub的模型文件上传下载
8
8
  支持模型和数据集的上传、下载等操作。
9
9
  """
10
10
 
11
- __version__ = '1.0.5'
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomgit
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: AtomGit模型文件上传下载CLI工具
5
5
  Home-page: https://atomgit.com/gitcode-ai/atomgit_cli
6
6
  Author: AtomGit CLI Team
@@ -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='1.0.5')
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
@@ -31,7 +31,7 @@ def read_requirements():
31
31
 
32
32
  setup(
33
33
  name='atomgit',
34
- version='1.0.12',
34
+ version='1.0.13',
35
35
  author='AtomGit CLI Team',
36
36
  author_email='sa@atomgit.com',
37
37
  description='AtomGit模型文件上传下载CLI工具',
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