git-lines-graph 2.2.0__tar.gz → 2.3.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.
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/PKG-INFO +1 -1
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/pyproject.toml +1 -1
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/src/git_lines_graph/__init__.py +7 -3
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/.gitignore +0 -0
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/LICENSE +0 -0
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/README.md +0 -0
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/example.png +0 -0
- {git_lines_graph-2.2.0 → git_lines_graph-2.3.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-lines-graph
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Git commit lines graph
|
|
5
5
|
Project-URL: Repository, https://github.com/danielfleischer/git-commits-lines-graph
|
|
6
6
|
Project-URL: Issues, https://github.com/danielfleischer/git-commits-lines-graph/issues
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import os
|
|
3
|
+
import logging
|
|
3
4
|
|
|
4
5
|
import git
|
|
5
6
|
import matplotlib as mpl
|
|
6
7
|
import matplotlib.pyplot as plt
|
|
7
8
|
import pandas as pd
|
|
8
9
|
|
|
10
|
+
logging.getLogger("matplotlib").setLevel(logging.ERROR)
|
|
11
|
+
|
|
9
12
|
|
|
10
13
|
def main():
|
|
11
14
|
parser = argparse.ArgumentParser()
|
|
@@ -22,7 +25,7 @@ def main():
|
|
|
22
25
|
|
|
23
26
|
try:
|
|
24
27
|
repo = git.Repo(args.git_dir, search_parent_directories=True)
|
|
25
|
-
except git.exc.InvalidGitRepositoryError
|
|
28
|
+
except git.exc.InvalidGitRepositoryError:
|
|
26
29
|
print("Not part of a valid git project: {}".format(args.git_dir))
|
|
27
30
|
exit()
|
|
28
31
|
|
|
@@ -34,11 +37,12 @@ def main():
|
|
|
34
37
|
data = pd.DataFrame(data, columns=["date", "add", "remove"])
|
|
35
38
|
data["delta"] = data["add"] - data["remove"]
|
|
36
39
|
data["total"] = data.delta.cumsum()
|
|
37
|
-
data.date = pd.to_datetime(data.date)
|
|
40
|
+
data.date = pd.to_datetime(data.date, utc=True)
|
|
38
41
|
data.set_index(["date"], inplace=True)
|
|
39
42
|
|
|
40
43
|
with plt.xkcd():
|
|
41
|
-
plt.figure(
|
|
44
|
+
plt.figure()
|
|
45
|
+
plt.title("Code Lines Progress in project {}".format(os.path.basename(repo.working_tree_dir)), pad=10)
|
|
42
46
|
plt.ylabel("# of lines")
|
|
43
47
|
ax = data["total"].plot()
|
|
44
48
|
ax.yaxis.set_major_formatter(mpl.ticker.StrMethodFormatter("{x:,.0f}"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|