GitCensus is a set of tool to cache and generate statistics about your project's community. The tools use the excellent PyGitHub library to obtain GitHub information.
The object with the code is to be simple and easy to understand that can by updated by people who are not experts in Python. I only dabble in Python, so please forgive anything that's not done in the correct Python way.
Feedback and pull requests are welcome!
Python 3.9 PyGithub 2.4.0
Most of the scripts work off a cache of the GitHub information so that they are quick to run, and you don't encounter issues with GitHub's request limits.
First off you need to set up some environment variables to define what repository you will be analysing.
export GC_REPO_NAME=<your repo>
export GC_REPO_BRANCH=<branch>
You can access the repository via a GitHub token like so:
export GC_REPO_TOKEN=<GitHub token>
Or via a user name and password:
export GC_LOGIN=<your GitHub login>
export GC_PASSWORD=<your GitHub password>
You then need to initialise the pickle databases:
python3 init_db.py
And read and cache the GitHub information you are interested you.
If you are interested in PR, issues and comments run:
python3 cache_github.py
If you are interested in users organisations and locations run:
python3 github_orgs_and_locs.py
Finally you can run some scripts to look at the cached data:
To see weekly activity on the project by contributors run:
python3 activity_by_week.py
To see locations of contributors:
python3 locations.py
To see organisations of contributors:
python3 organisations.py
Contributions to this project of any kind are welcome.