Skip to content

Fix code coverage CI job #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 30, 2025
Merged

Fix code coverage CI job #79

merged 4 commits into from
Jan 30, 2025

Conversation

mohsen1
Copy link
Collaborator

@mohsen1 mohsen1 commented Jan 30, 2025

  • Modified compute_recentness_boost to handle files with identical timestamps

  • Files with same commit time now receive identical boost values

  • Fixed failing test_recentness_boost_same_time test

- Modified compute_recentness_boost to handle files with identical timestamps

- Files with same commit time now receive identical boost values

- Fixed failing test_recentness_boost_same_time test
@mohsen1 mohsen1 marked this pull request as ready for review January 30, 2025 16:00
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR improves test coverage and fixes timestamp handling in the priority boost calculation system, ensuring consistent behavior for files with identical commit times.

  • Modified src/priority.rs to ensure files with identical commit timestamps receive equal boost values by grouping them together
  • Added comprehensive test coverage in tests/priority_test.rs for priority rules and recentness boost edge cases
  • Updated CI workflow in .github/workflows/ci.yml to use covdir format for coverage reporting
  • Fixed test_recentness_boost_same_time test to verify equal boost values for same-timestamp files

3 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +346 to +347
// Files with same timestamp should get same boost
assert_eq!(boosts["file1.rs"], boosts["file2.rs"]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: test_recentness_boost_same_time should also verify the actual boost value, not just equality between files

Suggested change
// Files with same timestamp should get same boost
assert_eq!(boosts["file1.rs"], boosts["file2.rs"]);
// Files with same timestamp should get same boost and both should be 0
assert_eq!(boosts["file1.rs"], 0);
assert_eq!(boosts["file2.rs"], 0);

@mohsen1 mohsen1 added this pull request to the merge queue Jan 30, 2025
Merged via the queue into main with commit 28c2af6 Jan 30, 2025
24 checks passed
@mohsen1 mohsen1 deleted the fix-coverage branch February 1, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant