Skip to content

Commit

Permalink
add a progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Dec 9, 2023
1 parent 56fbad1 commit aaca202
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion msys2-repo-sigstats
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ from typing import NamedTuple, Iterator
from pgpdump import BinaryData
from pgpdump.utils import PgpdumpException
from tabulate import tabulate
from fastprogress.fastprogress import progress_bar

from msys2_devtools.db import ExtTarFile

Expand Down Expand Up @@ -103,7 +104,7 @@ def get_signature_paths(root_path: str, include_all: bool) -> list[str]:


def parse_signatures(paths: list[str]) -> Iterator[tuple[str, Signature]]:
for p in paths:
for p in progress_bar(paths, leave=False):
with open(p, "rb") as h:
data = h.read()
yield (p, parse_signature(data))
Expand Down
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ zstandard = "^0.22.0"
pyyaml = "^6.0"
pydantic = "^2.0"
pgpdump = "^1.5"
fastprogress = "^1.0.3"

[tool.poetry.scripts]
msys2-srcinfo-cache = 'msys2_devtools.srcinfo_cache:run'
Expand Down

0 comments on commit aaca202

Please sign in to comment.