refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
将 4 个根目录核心模块迁移到合理位置: - path_config.py -> douyin/core/path_config.py - version.py -> douyin/core/version.py - Underlying_Operations.py -> douyin/core/underlying_operations.py - unified_logger.py -> douyin/logging/unified_logger.py 配套更新所有 import: - path_config: 41 处 import 改为 douyin.core.path_config - version: 4 处改为 douyin.core.version - unified_logger: 5 处改为 douyin.logging.unified_logger - Underlying_Operations: 14 处改为 douyin.core.underlying_operations 修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。 验证:python -m compileall 全项目通过。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3e399da70
commit
8fe7ff0585
51 files changed
+136
-132
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""版本信息(统一入口)。
|
||||
|
||||
说明:
|
||||
- APP_VERSION: 语义化版本号(含前缀 V)
|
||||
- APP_BUILD_DATE: 构建/发布日期(YYYY-MM-DD)
|
||||
|
||||
运行前打印版本号的入口统一用 print_version_banner()。
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
APP_NAME = "douyin_guaji"
|
||||
APP_VERSION = "V3.3.3"
|
||||
APP_BUILD_DATE = "2025-12-28"
|
||||
|
||||
# 兼容旧代码与测试:提供 VERSION / RELEASE_DATE 别名
|
||||
# tests 期望: from version import VERSION, RELEASE_DATE, print_version_banner
|
||||
# VERSION 应该是纯数字的 x.y.z 形式,这里去掉前缀 V
|
||||
VERSION = APP_VERSION.lstrip("Vv")
|
||||
RELEASE_DATE = APP_BUILD_DATE
|
||||
|
||||
|
||||
def get_version_string() -> str:
|
||||
return f"{APP_VERSION} ({APP_BUILD_DATE})"
|
||||
|
||||
|
||||
def print_version_banner(app_name: Optional[str] = None) -> str:
|
||||
name = (app_name or APP_NAME).strip() or APP_NAME
|
||||
s = f"{name} 版本:{get_version_string()}"
|
||||
print(s)
|
||||
return s
|
||||
Reference in new issue
Block a user