{"id":15600662,"url":"https://github.com/borda/pyrepostats","last_synced_at":"2025-04-28T16:24:20.491Z","repository":{"id":42466193,"uuid":"308871393","full_name":"Borda/pyRepoStats","owner":"Borda","description":"Simple repository contribution statistics","archived":false,"fork":false,"pushed_at":"2025-04-07T17:00:19.000Z","size":620,"stargazers_count":13,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T17:44:28.793Z","etag":null,"topics":["contribution","contributors","issues","prs","repository","statistics"],"latest_commit_sha":null,"homepage":"https://borda.github.io/pyRepoStats","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Borda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-31T11:57:29.000Z","updated_at":"2025-02-02T23:52:09.000Z","dependencies_parsed_at":"2023-11-18T15:30:56.697Z","dependency_job_id":"80beb28a-3a1b-4549-86e7-bc49f064611a","html_url":"https://github.com/Borda/pyRepoStats","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Borda%2FpyRepoStats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Borda%2FpyRepoStats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Borda%2FpyRepoStats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Borda%2FpyRepoStats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Borda","download_url":"https://codeload.github.com/Borda/pyRepoStats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251343635,"owners_count":21574399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contribution","contributors","issues","prs","repository","statistics"],"created_at":"2024-10-03T02:05:22.939Z","updated_at":"2025-04-28T16:24:20.472Z","avatar_url":"https://github.com/Borda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repository Stats\n\n[![CI testing](https://github.com/Borda/pyRepoStats/actions/workflows/ci_testing.yml/badge.svg?event=push)](https://github.com/Borda/pyRepoStats/actions/workflows/ci_testing.yml)\n[![codecov](https://codecov.io/gh/Borda/pyRepoStats/branch/main/graph/badge.svg?token=09H9MDJMXG)](https://codecov.io/gh/Borda/pyRepoStats)\n[![CodeFactor](https://www.codefactor.io/repository/github/borda/pyrepostats/badge)](https://www.codefactor.io/repository/github/borda/pyrepostats)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Borda/pyRepoStats/main.svg)](https://results.pre-commit.ci/latest/github/Borda/pyRepoStats/main)\n\nThis simple tool aims on open-source projects providing simple repository stats which are a bit out of scope of base Git and need some more information about issues and PRs.\n\n### Highlighted features\n\n- cumulative **caching** (no need to full download, just incremental/needed update)\n- collection of **overall user contributions** to issues/PRs\n- visualization of **aggregated timeline** of past contributions\n\n## Installation\n\nSimple install with setuptools/pip as\n\n```bash\npip install https://github.com/Borda/pyRepoStats/archive/main.zip\n```\n\nor after cloning the repository\n\n```bash\npython setup.py install\n```\n\n## Sample usage\n\nLet's show how to pull data from Github repository, use of the following calls\n\n- if you just clone this repo without installation, you need to install dependencies and call script\n  ```bash\n  pip install -r requirements.txt\n  python src/repo_stats/__main__.py -gh PyTorchLightning/pytorch-lightning-bolts\n  ```\n- if you have already installed the package with `pip` or with `setup.py` you can call executable\n  ```bash\n  repostat -gh PyTorchLightning/pytorch-lightning-bolts -t \u003cyour-personal-token\u003e\n  ```\n  or package with a pythonic way\n  ```bash\n  python -m repo_stats -gh PyTorchLightning/pytorch-lightning-bolts\n  ```\n  just note that with this way usage should also consider passing `-o` argument for output path, otherwise all caches and results will be saved in installation folder, most likely _site-packages_\n\nTo simplify the token passing in each call, you can export the token to environment variables `export GH_API_TOKEN=\u003cyour-personal-token\u003e` for Github.\n\n### Github use-case\n\nFor GitHub users we recommend using your personal GitHub token which significantly increases [request limit](https://developer.github.com/v3/#rate-limiting) per hour.\n\n### Extra options\n\nThe calls above just pull the data, to get/show some results check available options `python -m repo_stats.cli --help`\n\n- To see following summary table use `--users_summary \"merged PRs\" \"commented PRs\" \"opened issues\" \"commented issues\"` where the fist column is used for sorting rows with users:\n\n  | user                                              | merged PRs | commented PRs | opened issues | commented issues |\n  | :------------------------------------------------ | ---------: | ------------: | ------------: | ---------------: |\n  | [williamFalcon](https://github.com/williamFalcon) |         74 |            21 |            14 |                8 |\n  | [Borda](https://github.com/Borda)                 |         42 |            35 |             4 |               18 |\n  | [akihironitta](https://github.com/akihironitta)   |         17 |             1 |             5 |                5 |\n  | [ananyahjha93](https://github.com/ananyahjha93)   |         14 |             2 |             6 |               21 |\n  | [annikabrundyn](https://github.com/annikabrundyn) |         12 |             0 |             0 |                2 |\n  | [djbyrne](https://github.com/djbyrne)             |         11 |             2 |             4 |                4 |\n  | [nateraw](https://github.com/nateraw)             |          9 |             1 |             6 |                8 |\n  | [teddykoker](https://github.com/teddykoker)       |          3 |             2 |             0 |                0 |\n\n- With `--min_contribution N` you can a simple filter what is the minimal number of contribution to  show users in Table or Figures.\n\n- You can also define a time frame with `--date_from` and `--date_to` for filtering events - created issues, merged PRs and comments/reviews.\n\n- We also offer showing some contribution aggregation over time such as Day/Week/Month/Year, to do you use option `--user_comments W` which draw following double chart: (a) cumulative aggregation over all users and (b) heatmap like image with time in Y and user in X axis.\n  Moreover, you can also specify type such as issue or PR; so with `--user_comments W issue pr` you can simply get two figures - one with weekly aggregation for issue and another for PRs.\n  The very same way you can specify multiple time sampling `--user_comments W M` for weekly and monthly aggregations.\n\n  ![User-comments-aggregation](./assets/user-comments-aggregation.png)\n\nTo deny showing figures set environment variable `export SHOW_FIGURES=0`.\n\n## Contribution\n\nAny help or suggestions are welcome, pls use Issues :\\]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborda%2Fpyrepostats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborda%2Fpyrepostats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborda%2Fpyrepostats/lists"}