feat: Enhance documentation and clean up code structure

- Added comprehensive documentation for the unified screenshot and score recording process in the new markdown file.
- Improved existing markdown files by adding spacing for better readability.
- Cleaned up code by removing unnecessary blank lines across various scripts, enhancing overall code clarity.
- Updated configuration settings to reflect recent changes and ensure consistency across the project.
- Enhanced logging mechanisms to support better debugging and monitoring.
This commit is contained in:
Your Name committed 2025-12-25 16:11:25 +08:00
1 parent e68f1dd3de
commit f92933641f
61 files changed
+103695 -1485

No files matched your search

+25
View File
@@ -190,3 +190,28 @@ pytest --pdb --pdbcls=IPython.terminal.debugger:Pdb
+25
View File
@@ -27,3 +27,28 @@ __version__ = "1.0.0"
+10 -1
View File
@@ -14,7 +14,7 @@ from pathlib import Path
from typing import Generator, Dict, Any
from unittest.mock import Mock, MagicMock, patch
import pytest
import pytest # type: ignore
from PIL import Image
import numpy as np
@@ -211,6 +211,15 @@ pytest_plugins = []
+25
View File
@@ -16,3 +16,28 @@
+10 -1
View File
@@ -2,7 +2,7 @@
配置加载集成测试
"""
import pytest
import pytest # type: ignore
import json
import tempfile
from pathlib import Path
@@ -68,6 +68,15 @@ class TestConfigLoading:
+10 -1
View File
@@ -2,7 +2,7 @@
fudai_analyse初始化集成测试
"""
import pytest
import pytest # type: ignore
from douyin_fudai import fudai_analyse
@@ -53,6 +53,15 @@ class TestFudaiAnalyseInit:
+25
View File
@@ -16,3 +16,28 @@
+1 -1
View File
@@ -2,7 +2,7 @@
douyin_fudai_core模块测试
"""
import pytest
import pytest # type: ignore
import time
from unittest.mock import Mock, patch
from douyin_fudai_core import (
+10 -1
View File
@@ -2,7 +2,7 @@
douyin_text_utils模块测试
"""
import pytest
import pytest # type: ignore
from douyin_text_utils import (
extract_fudai_content,
extract_fudai_countdown,
@@ -107,6 +107,15 @@ class TestExtractParticipantsCount:
+10 -1
View File
@@ -2,7 +2,7 @@
douyin_utils模块测试
"""
import pytest
import pytest # type: ignore
from douyin_utils import normalize_countdown_text, parse_countdown_seconds
@@ -78,6 +78,15 @@ class TestParseCountdownSeconds:
+1 -1
View File
@@ -2,7 +2,7 @@
gui_core模块测试
"""
import pytest
import pytest # type: ignore
from unittest.mock import Mock, patch, MagicMock
import json
import tempfile
+10 -1
View File
@@ -3,7 +3,7 @@ path_config模块测试
"""
import os
import pytest
import pytest # type: ignore
from pathlib import Path
import path_config
@@ -41,6 +41,15 @@ class TestPathConfig:
+9 -24
View File
@@ -2,32 +2,34 @@
版本信息模块测试
"""
import pytest
import pytest # type: ignore[import-untyped]
from version import VERSION, RELEASE_DATE, print_version_banner
class TestVersion:
"""版本信息测试类"""
def test_version_exists(self):
"""测试版本号存在"""
assert VERSION is not None
assert isinstance(VERSION, str)
assert len(VERSION) > 0
def test_version_format(self):
"""测试版本号格式(应该是 x.y.z 格式)"""
parts = VERSION.split(".")
assert len(parts) >= 2, "版本号应该至少包含主版本号和次版本号"
for part in parts:
assert part.isdigit() or part.replace("-", "").isdigit(), f"版本号部分 '{part}' 应该是数字"
assert (
part.isdigit() or part.replace("-", "").isdigit()
), f"版本号部分 '{part}' 应该是数字"
def test_release_date_exists(self):
"""测试发布日期存在"""
assert RELEASE_DATE is not None
assert isinstance(RELEASE_DATE, str)
assert len(RELEASE_DATE) > 0
def test_release_date_format(self):
"""测试发布日期格式(应该是 YYYY-MM-DD 格式)"""
parts = RELEASE_DATE.split("-")
@@ -35,27 +37,10 @@ class TestVersion:
assert len(parts[0]) == 4, "年份应该是4位数字"
assert len(parts[1]) == 2, "月份应该是2位数字"
assert len(parts[2]) == 2, "日期应该是2位数字"
def test_print_version_banner(self, capsys):
"""测试版本信息打印"""
print_version_banner()
captured = capsys.readouterr()
assert VERSION in captured.out
assert RELEASE_DATE in captured.out