diff --git a/pyproject.toml b/pyproject.toml index 3496de0..35f0590 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "write-githubstat" packages = [ { include = "writegithubstat", from = "src" }, ] -version = "0.1.4" +version = "0.1.5" readme = "README.md" description = "write-githubstat makes it easy to collect, filter and save github statistics to csv files." license = "Apache 2.0" diff --git a/src/writegithubstat/githubstat.py b/src/writegithubstat/githubstat.py index b312b0a..e5c35fd 100644 --- a/src/writegithubstat/githubstat.py +++ b/src/writegithubstat/githubstat.py @@ -197,11 +197,18 @@ def date(self) -> str: def write_stat(self, stat_type: GithubStatType, csv: Path) -> None: os.makedirs(csv.parent, exist_ok=True) stats = self._get_stats(stat_type) - logging.info(stats) + WriteGithubStat._log_df(stats) stored_stats = self._get_stored_stats(csv) merged_stats = self._merge_stats(stored_stats, stats) merged_stats.to_csv(csv, index=False) + @staticmethod + def _log_df(df) -> None: + with pd.option_context('display.max_columns', None, + 'display.max_rows', None, + 'display.width', None): + logging.info(df) + def _get_stats(self, stat_type: GithubStatType) -> pd.DataFrame: stat = GithubStatAPI.get_stat(stat_type, self._auth.header) if stat.empty: