Skip to content
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

Add and update commit frequency metrics #173

Merged
merged 10 commits into from
Nov 21, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Nov 12, 2024

Description

This PR adds metrics surrounding commits and commit frequency. Along the journey towards this work I found that some functionality wasn't working as expected (or maybe wasn't labeled clearly in the context of these changes). As a result I took time to fix things and evolve the work towards consistency. This also included making modifications to a few tests and the repo_setup function, which is becoming more and more important to creating and implementing tests for these changes.

For commit frequency I used commits per day as a calculation to help avoid inconsistencies when it comes to weeks, months and years. I could also see how it might be better to perform a different type of calculation here, let me know if something seems more useful here.

Closes #157
Closes #158

What is the nature of your change?

  • Content additions or updates (adds or updates content)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own contributions.
  • I have commented my content, particularly in hard-to-understand areas.
  • I have made corresponding changes to related documentation (outside of book content).
  • My changes generate no new warnings.
  • New and existing tests pass locally with my changes.
  • I have added tests that prove my additions are effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

@d33bs d33bs marked this pull request as ready for review November 12, 2024 22:28
src/almanack/git.py Outdated Show resolved Hide resolved
Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

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

This all looks really neat; kudos! I left two comments, only one of which (the count_files() one) I think needs to be considered.

src/almanack/git.py Show resolved Hide resolved
tests/data/almanack/repo_setup/create_repo.py Outdated Show resolved Hide resolved
@d33bs
Copy link
Member Author

d33bs commented Nov 21, 2024

Thank you @gwaybio and @falquaddoomi ! Merging this in after making a few changes.

@d33bs d33bs merged commit c06376b into software-gardening:main Nov 21, 2024
11 checks passed
@d33bs d33bs deleted the commit-metrics branch November 21, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants