Skip to content

Commit a3fb4a7

Browse files
committed
Enhance README and code structure for GitHub Stats Analyzer
- Updated the README files (English and Chinese) to clarify the default behavior of access levels when no token is provided. - Improved code structure by ensuring consistent formatting and organization across various modules, including the addition of missing newlines. - Refactored the GitHubStatsAnalyzer to better handle statistics and improve output clarity, including enhanced logging and error handling. - Added new statistics for filtered code changes and improved the handling of repository data, ensuring more accurate analysis results. - Enhanced tests to cover new features and ensure robust validation of the analyzer's functionality.
1 parent e27eeb5 commit a3fb4a7

File tree

17 files changed

+646
-541
lines changed

17 files changed

+646
-541
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ github-stats <github_username> [--debug] [--include-all] [--access-level {basic|
133133
- `--debug`: Enable debug output for more detailed logging
134134
- `--include-all`: Include all languages in statistics (don't exclude any)
135135
- `--access-level`: Choose access level (basic or full)
136-
- `basic`: Limited data without token (default)
137-
- `full`: Full data with token
136+
- `basic`: Limited data without token (default when no token is available)
137+
- `full`: Full data with token (default)
138138
- `--token`: GitHub Personal Access Token (can also be set via GITHUB_TOKEN environment variable)
139139
- `--max-repos`: Maximum number of repositories to analyze
140140
- `--max-commits`: Maximum number of commits to analyze per repository

README_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ github-stats <github_username> [--debug] [--include-all] [--access-level {basic|
131131
- `--debug`:启用调试输出,获取更详细的日志
132132
- `--include-all`:在统计中包含所有语言(不排除任何语言)
133133
- `--access-level`:选择访问级别(basic 或 full)
134-
- `basic`:无 token 的有限数据(默认
135-
- `full`:有 token 的完整数据
134+
- `basic`:无 token 的有限数据(当没有 token 时默认
135+
- `full`:有 token 的完整数据(默认)
136136
- `--token`:GitHub 个人访问令牌(也可以通过 GITHUB_TOKEN 环境变量设置)
137137
- `--max-repos`:要分析的最大仓库数量
138138
- `--max-commits`:每个仓库要分析的最大提交数量

github_stats_analyzer/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
__version__ = "0.1.0"
99

10-
# Import main classes and functions for easier access
11-
from github_stats_analyzer.models import AccessLevel
1210
from github_stats_analyzer.analyzer import GitHubStatsAnalyzer
1311
from github_stats_analyzer.api import GitHubAPIClient
12+
# Import main classes and functions for easier access
13+
from github_stats_analyzer.models import AccessLevel
1414

1515
__all__ = ['GitHubStatsAnalyzer', 'GitHubAPIClient']
1616

1717
try:
1818
from ._version import version as __version__
1919
except ImportError:
20-
__version__ = "unknown"
20+
__version__ = "unknown"

0 commit comments

Comments
 (0)