Skip to content

Commit

Permalink
made print statements optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra DeLucia committed Jan 28, 2021
1 parent 4d8a14c commit fb685fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions littlebird/tweet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def __init__(self, filename: str):
def read_tweets(self,
skip_deleted: bool = True,
skip_withheld: bool = True,
skip_retweeted_and_quoted: bool = False
skip_retweeted_and_quoted: bool = False,
print_stats: bool = False
) -> Iterable[Any]:
# Initialize counters
count_total = 0
Expand Down Expand Up @@ -84,7 +85,8 @@ def read_tweets(self,
# Close file
self.f.close()
# Print stats
logging.warning(f"""
if print_stats:
logging.warning(f"""
Total iterated tweets: {count_total:,}
Remaining tweets: {count_total - (count_deleted + count_withheld + count_retweeted):,}
Skipped tweets:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="littlebird",
version="0.0.1",
version="0.0.2",
author="Alexandra DeLucia",
author_email="aadelcuia@jhu.edu",
description="Utilities for opening and processing Tweets",
Expand Down

0 comments on commit fb685fd

Please sign in to comment.