Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gittensor/validator/oss_contributions/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ def calculate_base_score(
pr.leaf_count = scoring_result.score_breakdown.leaf_count
pr.leaf_score = scoring_result.score_breakdown.leaf_score

# Calculate total lines changed across all files
total_lines = sum(f.total_lines for f in scoring_result.file_results)
# Calculate total lines changed across scored files (exclude deleted files which
# contribute 0 to token_score but would artificially deflate code_density)
total_lines = sum(f.total_lines for f in scoring_result.file_results if f.scoring_method != 'skipped')

# Check minimum token score threshold for base score. PRs below threshold get 0 base score
if pr.token_score < MIN_TOKEN_SCORE_FOR_BASE_SCORE:
Expand Down