gitlogstats 1.0.7__tar.gz → 1.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/PKG-INFO +42 -13
  2. gitlogstats-1.0.9/Pipfile.lock +751 -0
  3. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/README.md +38 -9
  4. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/docs/SPEC.md +9 -3
  5. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/pyproject.toml +4 -4
  6. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/scripts/board/config.mjs +1 -1
  7. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/scripts/board/manifest.yaml +36 -12
  8. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/src/gitlogstats/__main__.py +3 -1
  9. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/src/gitlogstats/git_logs_parser.py +98 -29
  10. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/tests/test_git_logs_parser.py +111 -21
  11. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/tests/test_integration.py +383 -18
  12. gitlogstats-1.0.7/Pipfile.lock +0 -579
  13. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/CLAUDE.md +0 -0
  14. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/agents/developer-agent.md +0 -0
  15. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/agents/spec-reviewer.md +0 -0
  16. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/hooks/format-edited.sh +0 -0
  17. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/hooks/guard-paths.sh +0 -0
  18. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/hooks/guard-paths.test.mjs +0 -0
  19. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/hooks/verify.sh +0 -0
  20. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/settings.json +0 -0
  21. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/skills/phase-handoff/SKILL.md +0 -0
  22. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.claude/skills/stale-check/SKILL.md +0 -0
  23. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.github/workflows/build.yaml +0 -0
  24. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.gitignore +0 -0
  25. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/.prettierrc.json +0 -0
  26. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/LICENSE +0 -0
  27. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/Pipfile +0 -0
  28. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/package-lock.json +0 -0
  29. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/package.json +0 -0
  30. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/repos.txt +0 -0
  31. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/requirements.txt +0 -0
  32. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/scripts/board/derive.mjs +0 -0
  33. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/scripts/board/derive.test.mjs +0 -0
  34. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/scripts/board/sync.mjs +0 -0
  35. {gitlogstats-1.0.7 → gitlogstats-1.0.9}/src/gitlogstats/__init__.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gitlogstats
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Track developers' contributions to one or more git repositories within a particular time range.
5
- Project-URL: Homepage, https://github.com/bloombar/git-developer-contribution-analysis
6
- Project-URL: Repository, https://github.com/bloombar/git-developer-contribution-analysis.git
7
- Project-URL: Bug Tracker, https://github.com/bloombar/git-developer-contribution-analysis/issues
5
+ Project-URL: Homepage, https://github.com/bloombar/gitlogstats
6
+ Project-URL: Repository, https://github.com/bloombar/gitlogstats.git
7
+ Project-URL: Bug Tracker, https://github.com/bloombar/gitlogstats/issues
8
8
  Author-email: Tobody Tothing <nobody.nothing@nowhere.com>
9
9
  License: GNU GENERAL PUBLIC LICENSE
10
10
  Version 3, 29 June 2007
@@ -695,7 +695,7 @@ Requires-Dist: pytest-cov; extra == 'dev'
695
695
  Requires-Dist: twine; extra == 'dev'
696
696
  Description-Content-Type: text/markdown
697
697
 
698
- ![build](https://github.com/bloombar/git-developer-contribution-analysis/actions/workflows/build.yaml/badge.svg)
698
+ ![build](https://github.com/bloombar/gitlogstats/actions/workflows/build.yaml/badge.svg)
699
699
 
700
700
  # Git Developer Contributions Analysis
701
701
 
@@ -707,6 +707,7 @@ This script calculates the following, for each developer in each repository:
707
707
  - number of **lines added**
708
708
  - number of **lines deleted**
709
709
  - number of **files changed**
710
+ - number of **merges** into the analyzed branch
710
711
 
711
712
  The results can be formatted as `csv`, `json`, or `markdown`.
712
713
 
@@ -734,7 +735,7 @@ optional arguments:
734
735
  Start date in mm/dd/yyyy format
735
736
  -e END, --end END End date in mm/dd/yyyy format
736
737
  -x EXCLUSIONS, --exclusions EXCLUSIONS
737
- A comma-separated string of files to exclude, e.g. --excusions "foo.zip, *.jpg, *.json"
738
+ A comma-separated list of files, patterns or directories to exclude, e.g. --exclusions "foo.zip, *.jpg, vendor". Replaces the default list; use "" to exclude nothing
738
739
  -f {csv,json,markdown}, --format {csv,json,markdown}
739
740
  The format in which to output the results
740
741
  -b BRANCH, --branch BRANCH
@@ -754,7 +755,7 @@ The `-r` and `-rf` flags control whether the script looks at a single repository
754
755
  Output the contributions of all developers to a single repository:
755
756
 
756
757
  ```bash
757
- gitlogstats -r https://github.com/bloombar/git-developer-contribution-analysis.git
758
+ gitlogstats -r https://github.com/bloombar/gitlogstats.git
758
759
  ```
759
760
 
760
761
  Output the contributions of all developers to a set of repositories stored in a file named `repos.txt`, one URL per line (see [example file](./repos.txt)). Blank lines and lines starting with `#` are ignored. The results for all repositories are combined into a single table:
@@ -770,7 +771,7 @@ By default, the statistics of all contributors are calculated. The `-u` flag can
770
771
  Output the contributions of only the contributor named `bloombar` to a single repository:
771
772
 
772
773
  ```bash
773
- gitlogstats -u bloombar -r https://github.com/bloombar/git-developer-contribution-analysis.git
774
+ gitlogstats -u bloombar -r https://github.com/bloombar/gitlogstats.git
774
775
  ```
775
776
 
776
777
  The same, but to a batch of repositories listed in the `repos.txt` file:
@@ -786,7 +787,7 @@ By default, contributions from a year ago until today are analyzed. Use the `-s`
786
787
  Output the contributions to a single repository for a specific date range, inclusive.
787
788
 
788
789
  ```bash
789
- gitlogstats -s 11/15/2021 -e 12/15/2021 -r https://github.com/bloombar/git-developer-contribution-analysis.git
790
+ gitlogstats -s 11/15/2021 -e 12/15/2021 -r https://github.com/bloombar/gitlogstats.git
790
791
  ```
791
792
 
792
793
  The same, but to a batch of repositories listed in the `repos.txt` file:
@@ -795,6 +796,24 @@ The same, but to a batch of repositories listed in the `repos.txt` file:
795
796
  gitlogstats -s 11/15/2021 -e 12/15/2021 -rf repos.txt
796
797
  ```
797
798
 
799
+ ### Excluding files
800
+
801
+ By default, common generated and binary files are left out of the analysis: `package.json`, `package-lock.json`, `Pipfile`, `Pipfile.lock`, `requirements.txt`, `*.jpg`, `*.png`, `*.gif`, `*.svg`, `*.pdf`, `*.zip`, `*.gz`, `*.tar`, `*.csv` and `*.json`. Use `-x` to give your own comma-separated list instead. It replaces the default list rather than adding to it.
802
+
803
+ Each item can be a file name, a glob pattern or a directory, and is matched in any directory of the repository. A directory name, such as `vendor` or `vendor/`, excludes everything inside it. A path such as `docs/*.md` matches only inside directories with that name.
804
+
805
+ ```
806
+ gitlogstats -rf repos.txt -x "*.json, *.lock, vendor, docs/*.md"
807
+ ```
808
+
809
+ Exclude nothing:
810
+
811
+ ```
812
+ gitlogstats -rf repos.txt -x ""
813
+ ```
814
+
815
+ Excluded files are left out of the commit, line and file counts. A commit that only touches excluded files is not counted at all. Exclusions do not affect the merge count.
816
+
798
817
  ### Filter Contributors
799
818
 
800
819
  By default, every contributor in a repository's history is listed, with zeros for those who were inactive in the date range. Use `-c` to show only contributors with activity.
@@ -816,7 +835,7 @@ gitlogstats -s 11/15/2021 -e 12/15/2021 -rf repos.txt -f markdown
816
835
  Flags can be combined to provide more targeted analysis, e.g. a specific contributor over a specific date range
817
836
 
818
837
  ```
819
- gitlogstats -u bloombar -s 11/15/2021 -e 12/15/2021 -r https://github.com/bloombar/git-developer-contribution-analysis.git -f json
838
+ gitlogstats -u bloombar -s 11/15/2021 -e 12/15/2021 -r https://github.com/bloombar/gitlogstats.git -f json
820
839
  ```
821
840
 
822
841
  The same, but to a batch of repositories listed in the `repos.txt` file:
@@ -831,11 +850,21 @@ Use `-v` to print debugging information. It is written to standard error, so the
831
850
 
832
851
  ## How statistics are counted
833
852
 
834
- - **commits** — commits authored by the contributor in the date range, including merge commits. Commits that change no files, or only excluded files (`-x`), are not counted.
835
- - **insertions** / **deletions** — lines added and removed, as reported by `git log --shortstat`. Binary files and merge commits add no lines, so merged work is never counted twice.
853
+ - **commits** — non-merge commits authored by the contributor in the date range. Commits that change no files, or only excluded files (`-x`), are not counted. Merge commits are counted under **merges** instead.
854
+ - **insertions** / **deletions** — lines added and removed, as reported by `git log --shortstat`. Binary files add no lines, and merges add none either, so merged work is never counted twice.
836
855
  - **files** — the number of files each commit changed, summed over the contributor's commits.
856
+ - **merges** — merge commits the contributor made directly on the analyzed branch in the date range. The author of a merge commit is the person who merged, so this covers merges made locally and pushed, and pull requests merged on GitHub, GitLab or Bitbucket with a merge commit.
857
+
858
+ Some merges are not counted:
859
+
860
+ - Merges that leave no merge commit: fast-forward merges, and pull requests merged with "Squash and merge" or "Rebase and merge". A squash commit counts as an ordinary commit by whoever made it.
861
+ - Merges made inside another branch, such as merging `main` into a feature branch with `git pull` or GitHub's "Update branch" button. These keep a branch up to date rather than merge work into it.
862
+ - Merges on other branches, unless that branch is analyzed with `-b`.
863
+ - Local merges that were never pushed.
864
+
865
+ A merge made on GitHub uses the person's GitHub profile name and email, which may differ from their local git settings. They can then appear under two names (see [Redundant usernames](#redundant-usernames)).
837
866
 
838
- Each commit is credited to its author's name, after applying the repository's `.mailmap` if it has one. Commit messages are never read, so statistics are the same whether messages are one line, many lines, or empty.
867
+ Each commit is credited to its author's name, after applying the repository's `.mailmap` if it has one. Merges are credited the same way. Commit messages are never read, so statistics are the same whether messages are one line, many lines, or empty.
839
868
 
840
869
  ## Development
841
870