Skip to content

Commit bac19b9

Browse files
authored
Merge pull request #15 from veghdev/log_df
Fixed: log dataframes without truncation
2 parents 57b3d10 + b5cbf5f commit bac19b9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "write-githubstat"
77
packages = [
88
{ include = "writegithubstat", from = "src" },
99
]
10-
version = "0.1.4"
10+
version = "0.1.5"
1111
readme = "README.md"
1212
description = "write-githubstat makes it easy to collect, filter and save github statistics to csv files."
1313
license = "Apache 2.0"

Diff for: src/writegithubstat/githubstat.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,18 @@ def date(self) -> str:
197197
def write_stat(self, stat_type: GithubStatType, csv: Path) -> None:
198198
os.makedirs(csv.parent, exist_ok=True)
199199
stats = self._get_stats(stat_type)
200-
logging.info(stats)
200+
WriteGithubStat._log_df(stats)
201201
stored_stats = self._get_stored_stats(csv)
202202
merged_stats = self._merge_stats(stored_stats, stats)
203203
merged_stats.to_csv(csv, index=False)
204204

205+
@staticmethod
206+
def _log_df(df) -> None:
207+
with pd.option_context('display.max_columns', None,
208+
'display.max_rows', None,
209+
'display.width', None):
210+
logging.info(df)
211+
205212
def _get_stats(self, stat_type: GithubStatType) -> pd.DataFrame:
206213
stat = GithubStatAPI.get_stat(stat_type, self._auth.header)
207214
if stat.empty:

0 commit comments

Comments
 (0)