gitlogstats 1.4.0__tar.gz → 1.4.1__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 (48) hide show
  1. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/PKG-INFO +14 -12
  2. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/README.md +13 -11
  3. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/pyproject.toml +1 -1
  4. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/CLAUDE.md +0 -0
  5. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/agents/developer-agent.md +0 -0
  6. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/agents/spec-reviewer.md +0 -0
  7. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/hooks/format-edited.sh +0 -0
  8. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/hooks/guard-paths.sh +0 -0
  9. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/hooks/guard-paths.test.mjs +0 -0
  10. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/hooks/verify.sh +0 -0
  11. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/settings.json +0 -0
  12. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/skills/phase-handoff/SKILL.md +0 -0
  13. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.claude/skills/stale-check/SKILL.md +0 -0
  14. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.github/workflows/build.yaml +0 -0
  15. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.gitignore +0 -0
  16. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/.prettierrc.json +0 -0
  17. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/LICENSE +0 -0
  18. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/Pipfile +0 -0
  19. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/Pipfile.lock +0 -0
  20. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/docs/SPEC.md +0 -0
  21. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/package-lock.json +0 -0
  22. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/package.json +0 -0
  23. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/repos.txt +0 -0
  24. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/requirements.txt +0 -0
  25. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/scripts/board/config.mjs +0 -0
  26. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/scripts/board/derive.mjs +0 -0
  27. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/scripts/board/derive.test.mjs +0 -0
  28. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/scripts/board/manifest.yaml +0 -0
  29. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/scripts/board/sync.mjs +0 -0
  30. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/__init__.py +0 -0
  31. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/__main__.py +0 -0
  32. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/git_logs_parser.py +0 -0
  33. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/github.py +0 -0
  34. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/github_stats.py +0 -0
  35. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/src/gitlogstats/identity.py +0 -0
  36. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fake_gh.py +0 -0
  37. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/commit_linked.json +0 -0
  38. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/commit_unlinked.json +0 -0
  39. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/contributors.json +0 -0
  40. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/contributors_page2.json +0 -0
  41. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/pulls_page1.json +0 -0
  42. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/pulls_page2.json +0 -0
  43. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/user_full.json +0 -0
  44. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/fixtures/github/user_private.json +0 -0
  45. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/test_git_logs_parser.py +0 -0
  46. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/test_github.py +0 -0
  47. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/test_identity.py +0 -0
  48. {gitlogstats-1.4.0 → gitlogstats-1.4.1}/tests/test_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gitlogstats
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: Track developers' contributions to one or more git repositories within a particular time range.
5
5
  Project-URL: Homepage, https://github.com/bloombar/gitlogstats
6
6
  Project-URL: Repository, https://github.com/bloombar/gitlogstats.git
@@ -709,7 +709,7 @@ This script calculates the following, for each developer in each repository:
709
709
  - number of **files changed**
710
710
  - number of **merges** into the analyzed branch
711
711
 
712
- With `--github`, it also reports each developer's GitHub **pull requests** opened, merged, closed without merging and merged by themselves, their **pushes** to the analyzed branch and their commits made on GitHub's **website** (see [GitHub pull requests](#github-pull-requests)).
712
+ With `--github`, it also reports each developer's GitHub **pull requests** opened, merged, closed without merging and merged by themselves, their **pushes** to the analyzed branch, their commits made on GitHub's **website**, and their **git and GitHub email addresses**. It matches each GitHub account to the developer's git names and combines a developer who committed under several names into one row (see [GitHub statistics](#github-statistics)).
713
713
 
714
714
  The results can be formatted as `csv`, `json`, or `markdown`.
715
715
 
@@ -837,9 +837,9 @@ By default, every contributor in a repository's history is listed, with zeros fo
837
837
  gitlogstats -rf repos.txt -c
838
838
  ```
839
839
 
840
- ### GitHub pull requests
840
+ ### GitHub statistics
841
841
 
842
- Add `--github` to also count each contributor's pull requests, pushes and website commits. Nine columns are appended to every output format:
842
+ Add `--github` to also report each contributor's pull requests, pushes, website commits and email addresses. Nine columns are appended to every output format:
843
843
 
844
844
  | Column | Meaning |
845
845
  | --------------------- | ------------------------------------------------------------------------------------------------------- |
@@ -864,7 +864,7 @@ gitlogstats: --github needs the GitHub CLI (gh), which is not installed. Install
864
864
  gitlogstats: --github needs the GitHub CLI (gh) to be signed in. Run 'gh auth login', or run without --github.
865
865
  ```
866
866
 
867
- **Empty versus zero.** A zero means GitHub was asked and the person has none. An empty value (`null` in JSON) means GitHub could not be asked for that repository: it is not on github.com, or the request failed (no network, rate limit, a private repository you cannot see). The git statistics are still reported, the reason is printed to standard error, and the other repositories carry on. A contributor with no GitHub account matched has an empty `github_username` and zero pull requests. A GitHub user who opened pull requests but has no commits is listed in a row of their own with an empty `username` and zero git statistics. When GitHub could not be asked, `git_email` is still filled in and `github_email` is empty. The emails come from the whole history of the branch, not only from commits in the date range.
867
+ **Empty versus zero.** A zero means GitHub was asked and the person has none. An empty value (`null` in JSON) means GitHub could not be asked for that repository: it is not on github.com, or the request failed (no network, rate limit, a private repository you cannot see). The git statistics are still reported, the reason is printed to standard error, and the other repositories carry on. A contributor with no GitHub account matched has an empty `github_username` and zero pull requests. A GitHub user who opened pull requests or pushed but has no commits is listed in a row of their own with an empty `username` and zero git statistics. When GitHub could not be asked, `git_email` is still filled in and `github_email` is empty. The emails come from the whole history of the branch, not only from commits in the date range.
868
868
 
869
869
  **Limits of pushes and website commits.** Pushes come from GitHub's repository activity record, which starts in September 2023: earlier pushes are not counted, however old the date range. A file edited on the website directly on the analyzed branch is recorded by GitHub as a push too, so it counts in both `pushes_to_default` and `web_commits`. Reading it works for any public repository you can see; for a private one you need access to it, and if GitHub refuses, the repository's GitHub columns are empty with the reason on standard error, as above. A push is credited to the GitHub user who pushed it, so a person who only pushes (and has no commits or pull requests in the range) still gets a row of their own. Pushes made while a tag or commit (not a branch) is checked out with `-b` are not counted. Website commits are recognised by GitHub being the committer, so commits made through GitHub's API, for example in the `github.dev` editor, are counted as website commits too, and so is the first commit GitHub creates when a repository is created on the website. Website commits follow `commits`: the same date range, exclusions (`-x`) and branch, credited to the commit's author and added up when names are combined into one row.
870
870
 
@@ -878,11 +878,11 @@ If a step finds several users it is skipped as ambiguous and the next is tried.
878
878
 
879
879
  **How the other options apply.**
880
880
 
881
- - `-s` / `-e`: each pull request count uses its own timestamp (opened, merged or closed) against the same inclusive local-time range as commits.
882
- - `-b`: only pull requests whose base branch is that branch are counted; without `-b`, all pull requests count.
881
+ - `-s` / `-e`: each pull request count uses its own timestamp (opened, merged or closed), and each push its push time, against the same inclusive local-time range as commits.
882
+ - `-b`: only pull requests whose base branch is that branch are counted (without `-b`, all pull requests count), and pushes and website commits are counted on that branch instead of the default branch.
883
883
  - `-u`: selects the combined row whose author names or emails equal the value exactly, or whose GitHub username equals it ignoring case. The whole combined row is reported, so `-u` with one email address also includes the person's commits under their other names and emails, and a value that matches nobody prints no row.
884
- - `-c`: removes only rows with no git activity and no pull requests.
885
- - `-x`: has no effect on pull requests.
884
+ - `-c`: removes only rows with no git activity, no pull requests and no pushes. Email addresses do not count as activity.
885
+ - `-x`: has no effect on pull requests or pushes; it does apply to `web_commits`, which only counts commits that `commits` counts.
886
886
 
887
887
  ### Formatting the results
888
888
 
@@ -924,7 +924,7 @@ Some merges are not counted:
924
924
  - Merges on other branches, unless that branch is analyzed with `-b`.
925
925
  - Local merges that were never pushed.
926
926
 
927
- 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)).
927
+ 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; `--github` combines them into one row (see [Redundant usernames](#redundant-usernames)).
928
928
 
929
929
  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.
930
930
 
@@ -949,6 +949,8 @@ Most likely, the contributor has failed to update their version control settings
949
949
 
950
950
  ### Redundant usernames
951
951
 
952
- The output of the script sometimes lists the same individual contributor under more than one git username... This is most likely due to different username settings for various git and GitHub clients.
952
+ The output of the script sometimes lists the same individual contributor under more than one git username. This is most likely due to different username settings for various git and GitHub clients: for example, a merge made on GitHub's website uses the person's GitHub display name, while their own commits use their local `user.name`.
953
953
 
954
- If a single developer has multiple usernames that all show the same statistics, then only count those stats once. Otherwise, if a single developer has multiple usernames that show different statistics, then add them together to come up with the total for that developer.
954
+ With `--github`, names that belong to the same GitHub account are combined into one row automatically, with their statistics added up (see [GitHub statistics](#github-statistics)). Check the `github_username` and `git_email` columns to see which names were combined. A name GitHub cannot link to any account, for example one whose email is a laptop's default address, keeps a row of its own; add the two names to a `.mailmap` file to combine them.
955
+
956
+ Without `--github`, or for a repository not on GitHub, add up the rows of a developer who appears under several names yourself, or map the names together in a `.mailmap` file.
@@ -12,7 +12,7 @@ This script calculates the following, for each developer in each repository:
12
12
  - number of **files changed**
13
13
  - number of **merges** into the analyzed branch
14
14
 
15
- With `--github`, it also reports each developer's GitHub **pull requests** opened, merged, closed without merging and merged by themselves, their **pushes** to the analyzed branch and their commits made on GitHub's **website** (see [GitHub pull requests](#github-pull-requests)).
15
+ With `--github`, it also reports each developer's GitHub **pull requests** opened, merged, closed without merging and merged by themselves, their **pushes** to the analyzed branch, their commits made on GitHub's **website**, and their **git and GitHub email addresses**. It matches each GitHub account to the developer's git names and combines a developer who committed under several names into one row (see [GitHub statistics](#github-statistics)).
16
16
 
17
17
  The results can be formatted as `csv`, `json`, or `markdown`.
18
18
 
@@ -140,9 +140,9 @@ By default, every contributor in a repository's history is listed, with zeros fo
140
140
  gitlogstats -rf repos.txt -c
141
141
  ```
142
142
 
143
- ### GitHub pull requests
143
+ ### GitHub statistics
144
144
 
145
- Add `--github` to also count each contributor's pull requests, pushes and website commits. Nine columns are appended to every output format:
145
+ Add `--github` to also report each contributor's pull requests, pushes, website commits and email addresses. Nine columns are appended to every output format:
146
146
 
147
147
  | Column | Meaning |
148
148
  | --------------------- | ------------------------------------------------------------------------------------------------------- |
@@ -167,7 +167,7 @@ gitlogstats: --github needs the GitHub CLI (gh), which is not installed. Install
167
167
  gitlogstats: --github needs the GitHub CLI (gh) to be signed in. Run 'gh auth login', or run without --github.
168
168
  ```
169
169
 
170
- **Empty versus zero.** A zero means GitHub was asked and the person has none. An empty value (`null` in JSON) means GitHub could not be asked for that repository: it is not on github.com, or the request failed (no network, rate limit, a private repository you cannot see). The git statistics are still reported, the reason is printed to standard error, and the other repositories carry on. A contributor with no GitHub account matched has an empty `github_username` and zero pull requests. A GitHub user who opened pull requests but has no commits is listed in a row of their own with an empty `username` and zero git statistics. When GitHub could not be asked, `git_email` is still filled in and `github_email` is empty. The emails come from the whole history of the branch, not only from commits in the date range.
170
+ **Empty versus zero.** A zero means GitHub was asked and the person has none. An empty value (`null` in JSON) means GitHub could not be asked for that repository: it is not on github.com, or the request failed (no network, rate limit, a private repository you cannot see). The git statistics are still reported, the reason is printed to standard error, and the other repositories carry on. A contributor with no GitHub account matched has an empty `github_username` and zero pull requests. A GitHub user who opened pull requests or pushed but has no commits is listed in a row of their own with an empty `username` and zero git statistics. When GitHub could not be asked, `git_email` is still filled in and `github_email` is empty. The emails come from the whole history of the branch, not only from commits in the date range.
171
171
 
172
172
  **Limits of pushes and website commits.** Pushes come from GitHub's repository activity record, which starts in September 2023: earlier pushes are not counted, however old the date range. A file edited on the website directly on the analyzed branch is recorded by GitHub as a push too, so it counts in both `pushes_to_default` and `web_commits`. Reading it works for any public repository you can see; for a private one you need access to it, and if GitHub refuses, the repository's GitHub columns are empty with the reason on standard error, as above. A push is credited to the GitHub user who pushed it, so a person who only pushes (and has no commits or pull requests in the range) still gets a row of their own. Pushes made while a tag or commit (not a branch) is checked out with `-b` are not counted. Website commits are recognised by GitHub being the committer, so commits made through GitHub's API, for example in the `github.dev` editor, are counted as website commits too, and so is the first commit GitHub creates when a repository is created on the website. Website commits follow `commits`: the same date range, exclusions (`-x`) and branch, credited to the commit's author and added up when names are combined into one row.
173
173
 
@@ -181,11 +181,11 @@ If a step finds several users it is skipped as ambiguous and the next is tried.
181
181
 
182
182
  **How the other options apply.**
183
183
 
184
- - `-s` / `-e`: each pull request count uses its own timestamp (opened, merged or closed) against the same inclusive local-time range as commits.
185
- - `-b`: only pull requests whose base branch is that branch are counted; without `-b`, all pull requests count.
184
+ - `-s` / `-e`: each pull request count uses its own timestamp (opened, merged or closed), and each push its push time, against the same inclusive local-time range as commits.
185
+ - `-b`: only pull requests whose base branch is that branch are counted (without `-b`, all pull requests count), and pushes and website commits are counted on that branch instead of the default branch.
186
186
  - `-u`: selects the combined row whose author names or emails equal the value exactly, or whose GitHub username equals it ignoring case. The whole combined row is reported, so `-u` with one email address also includes the person's commits under their other names and emails, and a value that matches nobody prints no row.
187
- - `-c`: removes only rows with no git activity and no pull requests.
188
- - `-x`: has no effect on pull requests.
187
+ - `-c`: removes only rows with no git activity, no pull requests and no pushes. Email addresses do not count as activity.
188
+ - `-x`: has no effect on pull requests or pushes; it does apply to `web_commits`, which only counts commits that `commits` counts.
189
189
 
190
190
  ### Formatting the results
191
191
 
@@ -227,7 +227,7 @@ Some merges are not counted:
227
227
  - Merges on other branches, unless that branch is analyzed with `-b`.
228
228
  - Local merges that were never pushed.
229
229
 
230
- 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)).
230
+ 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; `--github` combines them into one row (see [Redundant usernames](#redundant-usernames)).
231
231
 
232
232
  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.
233
233
 
@@ -252,6 +252,8 @@ Most likely, the contributor has failed to update their version control settings
252
252
 
253
253
  ### Redundant usernames
254
254
 
255
- The output of the script sometimes lists the same individual contributor under more than one git username... This is most likely due to different username settings for various git and GitHub clients.
255
+ The output of the script sometimes lists the same individual contributor under more than one git username. This is most likely due to different username settings for various git and GitHub clients: for example, a merge made on GitHub's website uses the person's GitHub display name, while their own commits use their local `user.name`.
256
256
 
257
- If a single developer has multiple usernames that all show the same statistics, then only count those stats once. Otherwise, if a single developer has multiple usernames that show different statistics, then add them together to come up with the total for that developer.
257
+ With `--github`, names that belong to the same GitHub account are combined into one row automatically, with their statistics added up (see [GitHub statistics](#github-statistics)). Check the `github_username` and `git_email` columns to see which names were combined. A name GitHub cannot link to any account, for example one whose email is a laptop's default address, keeps a row of its own; add the two names to a `.mailmap` file to combine them.
258
+
259
+ Without `--github`, or for a repository not on GitHub, add up the rows of a developer who appears under several names yourself, or map the names together in a `.mailmap` file.
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "gitlogstats"
7
7
  description = "Track developers' contributions to one or more git repositories within a particular time range."
8
- version = "1.4.0"
8
+ version = "1.4.1"
9
9
  authors = [
10
10
  { name="Tobody Tothing", email="nobody.nothing@nowhere.com" },
11
11
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes