From b62fb923f086f3388b77f2ae38e32f86bcaa4f7e Mon Sep 17 00:00:00 2001 From: David Vegh <61405792+veghdev@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:43:00 +0200 Subject: [PATCH 1/2] Log untruncated dataframes fix #14 --- src/writegithubstat/githubstat.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: From b5cbf5fb77de201a54bda3c4b0ebb92ad590e580 Mon Sep 17 00:00:00 2001 From: David Vegh <61405792+veghdev@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:43:42 +0200 Subject: [PATCH 2/2] Increase version number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"