Skip to content

Commit

Permalink
adding danker version output
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Jun 18, 2024
1 parent b2a1306 commit f9faeca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions danker/danker.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
import time
import datetime
import argparse
from importlib.metadata import version

# import memory_profiler

Expand Down Expand Up @@ -333,7 +334,7 @@ def _main():
parser.print_help(sys.stderr)
sys.exit(1)
print(
f"danker: starting computation of PageRank on '{args.left_sorted}' with parameters\n\t"
f"danker ({version('danker')}): starting computation of PageRank on '{args.left_sorted}' with parameters\n\t"
f"{param_out} ({datetime.datetime.now()})",
file=sys.stderr,
)
Expand All @@ -357,7 +358,7 @@ def _main():
danker_bigmem(dictionary, args.iterations, args.damping)

print(
"danker: PageRank computation took "
f"danker ({version('danker')}): PageRank computation took "
f"{time.time() - start:.2f} seconds ({datetime.datetime.now()}).",
file=sys.stderr,
)
Expand Down

0 comments on commit f9faeca

Please sign in to comment.