git-achievements
git-achievements copied to clipboard
Earn achievements using Github
Git Achievements
Using Git Achievements
- Register through OAuth.
- Add
services/hooks/webas a webhook in your repository. - Done
Development Setup
- Set up a virtual environment for the project.
- Enable the virtual environment and run
pip install -r requirements/dev.txtfrom the project directory. - Run
python manage.py syncdbto initialize the database. - Run
python manage.py migrateto forward the database. - Run
python manage.py add_sample_datato load the initial data. - Run
python manage.py runserverto launch the server. - Add social auth key/secret pair if you want to login as your Github profile, otherwise you can login via the admin page
/admin, then navigate to the root. - Set up a watcher to convert all SCSS files to CSS files.
- Download coffee and set it as a watcher
coffee -cw app/**/*.coffeeto compile all coffeescript that you may make changes to.
Getting set up (Production or Team Server)
The following two resources provide excellent information on how to get up and running with your Django application:
- Digital Ocean's Configuring Nginx, Gunicorn and Django
- Michal Karzynski's Django, Nginx, Gunicorn, Virtualenv, and Supervisor
Besides those two guides, if you're familiar with setting up a Django application on your server, the steps to getting your own local instance up and running aren't that bad:
- Set up a virtual environment for the project.
- Run
pip install -r requirements/web.txtin the virtual environment to install the web requirements - You need to have
psycopg2,python-devandnginxinstalled which you should have from prior steps (if on Mac, you can replacesudo apt-get installwithbrew installusing brew). - Generate a secret key/id pair by registering a new application on Github.
- Copy the
samples/settings/custom.pysettings file togitachievements/settings/custom.pyand fill it in the with the relevant information you obtained from the above steps. - Run
python manage.py syncdbto initialize the database. - Run
python manage.py migrateto migrate forward the database. - If you want to have initial data, then run
python manage.py add_sample_dataas well. - You will need
coffeeandsassto compile the.coffeescriptand.scss, you can install coffeescript via npm and sass via gem - A convenience script in included in
samples/bincalledgunicorn_start, you can fill that in and give it as passenger's command.
Contributing
Contributing to Git Achievements is simple; fork the repository, make your changes, and submit a pull request. To help your pull request make it easily into the repository, add tests, describe in full what issue your pull request addresses, and list the major changes. In addition, we use the following coding style:
- CoffeeScript is indented with
4spaces as opposed to the traditional2. - Camel-casing for CoffeeScript.
- Underscores for function names in Python (e.g.
get_last_objectinstead ofgetLastObjectorgetlastobject) - Avoid JavaScript if at all possible, instead favour CoffeeScript.
- Avoid CSS instead write a SCSS file and include as a mixin (styles should be as specific as possible unless intended to be global).
Contributors
Ford P, hkpeprah - Code + Design
Nicholas Terwoord, nt3rp - Idea
Brian L, 1337 - Code + Idea
License
GPL v2