branch | status |
---|---|
master | |
dev |
GHData is a Python library and REST server that provides data related to GitHub repositories. Hosting the GHData project requires a copy of the GHTorrent database.
GHData is under heavy development; expect frequent backwards-incompatible changes until a 1.x.x release!
Our technical, outreach, and academic goals roadmap.
Copyright © 2017 University of Nebraska at Omaha and the University of Missouri
GHData is free software: you can redistribute it and/or modify it under the terms of the MIT License as published by the Open Source Initiative. See the file LICENSE for more details.
All associated documentation is licensed under the terms of the Creative Commons Attribution Share-Alike 4.0 license. See the file CC-BY-SA-4.0 for more details.
- Python 3.4.x and
pip
- MySQL 5.x or later with the GHTorrent database MSR14 dataset for testing
First, install ghdata
- Stable:
pip install --upgrade https://github.com/OSSHealth/ghdata/archive/master.zip
- Development:
git clone -b dev https://github.com/OSSHealth/ghdata/ && pip install --upgrade ./ghdata/
Then, run ghdata
to create a new config file. Edit the generated ghdata.cfg
file with your database settings.
Run ghdata
again. For development, use make run-debug
, that will start the server with Werkzeug's debugging on.
To run GHData as a server:
- Type
ghdata
in a terminal. A config file named ghdata.cfg will be generated. - Edit the ghdata.cfg file with your database settings.
- Type
ghdata
again to start the server.
To use as a Python package:
from ghdata import GHData
client = GHData('mysql+pymysql://<user>:<pass>@<host>:<port>/<database name>')
railsID = client.repoid(owner='rails', repo='rails')
railsStars = client.stargazers(railsID)
To uninstall, run pip uninstall ghdata
TODO: More/Better API documentation
DFD Image Here
(This work has been funded through the Alfred P. Sloan Foundation)