Skip to content

Commit 3c54782

Browse files
committed
feat: add progress indicator
1 parent afede49 commit 3c54782

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

git_commits_graph/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from git_commits_graph.plotters import plot_changes_px
1010
from git_commits_graph.plotters import plot_total_lines
1111
from git_commits_graph.plotters import plot_total_lines_px
12-
12+
from tqdm.auto import tqdm
1313

1414
@click.command()
1515
@click.argument("git_dir", required=True)
@@ -155,7 +155,7 @@ def fetch_commits(branch, repo):
155155
"""Fetch commits from the git repository."""
156156
commits = []
157157
try:
158-
for i in reversed(list(repo.iter_commits(rev=branch))):
158+
for i in tqdm(reversed(list(repo.iter_commits(rev=branch)))):
159159
stat = i.stats.total
160160
commits.append(
161161
[

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "git-commits-graph"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
description = "Display graph of changes in number of lines in project or changed lines"
9-
authors = [{name="Krystian Safjan", email="ksafjan@gmail.com"}]
10-
#authors = ["Krystian Safjan <ksafjan@gmail.com>"]
11-
license = { text = "MIT" }
12-
#license = "MIT"
9+
#authors = [{name="Krystian Safjan", email="ksafjan@gmail.com"}]
10+
authors = ["Krystian Safjan <ksafjan@gmail.com>"]
11+
#license = { text = "MIT" }
12+
license = "MIT"
1313
readme = "README.md"
1414

1515
[tool.poetry.scripts]
@@ -22,6 +22,7 @@ click = "^8.1.3"
2222
pandas = "^1.5.3"
2323
matplotlib = "^3.7.1"
2424
plotly = "^5.14.0"
25+
tqdm = "^4.65.0"
2526

2627
[tool.poetry.dev-dependencies]
2728
pytest = "^7.2.2"

0 commit comments

Comments
 (0)