gitlogstats 0.1.7__tar.gz → 1.0.0__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.
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlogstats
3
- Version: 0.1.7
3
+ Version: 1.0.0
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/git-developer-contribution-analysis
6
6
  Project-URL: Repository, https://github.com/bloombar/git-developer-contribution-analysis.git
@@ -734,6 +734,7 @@ optional arguments:
734
734
  -f {csv,json,markdown}, --format {csv,json,markdown}
735
735
  The format in which to output the results
736
736
  -v, --verbose Whether to output debugging info
737
+ -c, --clean Remove contributors without any contribuition
737
738
  ```
738
739
 
739
740
  In case `gitlogstats` is not found as a command, even after installing, try `python -m gitlogstats` or `python3 -m gitlogstats` instead.
File without changes
File without changes
@@ -41,6 +41,7 @@ optional arguments:
41
41
  -f {csv,json,markdown}, --format {csv,json,markdown}
42
42
  The format in which to output the results
43
43
  -v, --verbose Whether to output debugging info
44
+ -c, --clean Remove contributors without any contribuition
44
45
  ```
45
46
 
46
47
  In case `gitlogstats` is not found as a command, even after installing, try `python -m gitlogstats` or `python3 -m gitlogstats` instead.
@@ -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 = "0.1.7"
8
+ version = "1.0.0"
9
9
  authors = [
10
10
  { name="Foo Barstein", email="foo.barstein@onepotcooking.com" },
11
11
  ]
File without changes
@@ -86,12 +86,12 @@ class GitLogsParser:
86
86
  'files': 0
87
87
  }
88
88
  # find all number of files changed, lines inserted, lines deleted:
89
- pattern = re.compile('(\d*) files? changed.* (\d*) insertions?.* (\d*) deletions?.*\n')
89
+ pattern = re.compile(r"commit ([a-zA-Z0-9]+).*\nAuthor:\s(.*)\s<((.*))>.*\nDate:\s(.*)\n\n(.*)\n\n(.*?(\d+) file[s]? changed)?(.*?(\d+) insertion[s]?)?(.*?(\d+) deletion[s]?)?")
90
90
  for match in re.finditer(pattern, logs):
91
91
  # print(str(match.groups()))
92
- entry['files'] += int(match.group(1))
93
- entry['insertions'] += int(match.group(2))
94
- entry['deletions'] += int(match.group(3))
92
+ entry['files'] += int(match.group(8)) if match.group(8) else 0
93
+ entry['insertions'] += int(match.group(10)) if match.group(10) else 0
94
+ entry['deletions'] += int(match.group(12)) if match.group(12) else 0
95
95
  # add this user's stats to the list
96
96
  if(self.clean and (entry['merges'] == 0 and entry['commits'] == 0 and entry['insertions'] == 0 and entry['deletions'] == 0 and entry['files'] == 0)):
97
97
  pass