Skip to content

Procedure

Haegin edited this page Oct 11, 2012 · 29 revisions

Procedure

Initial Setup

  • Fork this repository to create your own copy.
  • Check out the code: git clone [email protected]:YOURUSERNAME/csbot.git; cd csbot
  • Install the python headers, usually in a python-dev package in your package manager.
  • Set up a virtual environment
    • With virtualenv:
      • virtualenv -p python2 virtualenv
      • source virtualenv/bin/activate
      • pip install -r requirements.txt
    • Or with virtualenvwrapper: (remember to add WORKON_HOME=~/PYTHONENVS to .bashrc)
      • mkvirtualenv -a $(pwd) -r requirements.txt -p $(which python2) csbot

Troubleshooting

fatal error: libxml/xmlversion.h: No such file or directory

Install libxml2 and libxslt (with the development headers). On Ubuntu this is sudo apt-get install libxml2-dev libxslt-dev.

Code

  • Branch early, branch often!
  • Commit early, commit often! With sensible commit messages!
  • Follow PEP 8 Style Guide for all Python code. Highlights:
    • 4 spaces for indentation
    • 'lower_case' for modules, functions, variables
    • 'CamelCase' for classes and exceptions
    • 'CAPITAL_LETTERS' for constants
    • pip install pep8 for a PEP 8 checker, see the Useful Hooks page for a pre-commit hook.
  • Read the API documentation.
  • See the Plugins page for plugin details, including conventions.

Distribute

  • Please write helpful git commit messages. These guidelines are recommended
  • Recommended reading: GitHub Flow
  • Always fetch and merge upstream changes first. Use git rebase to avoid unnecessary merges. Then issue a pull request to csyork/csbot:master.
Clone this wiki locally