Skip to content

Python code to cache GitHub infomation and generate insights about open source projects

License

Notifications You must be signed in to change notification settings

datastrato/GitCensus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitCensus

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!

Prerequisites

Python 3.9 PyGithub 2.4.0

Getting started

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

Contributions to this project of any kind are welcome.

About

Python code to cache GitHub infomation and generate insights about open source projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages