Skip to content
This repository was archived by the owner on Apr 11, 2018. It is now read-only.

Getting Started with Development

rzhw edited this page Feb 19, 2013 · 5 revisions

So you're interested in checking out the bark-core project, but have no idea how? That's alright, things are pretty easy.

  • Make sure you've got Git, python2.7 and virtualenv installed

$ sudo apt-get install git python2.7 python-virtualenv

  • In the directory where you'd like the project folder to be downloaded, use git to clone the project

$ git clone git@github.com:csesoc/bark-core

  • Use virtualenv to create an environment to work in. This just makes sure all the dependencies for the project are separate from the system ones, making everyone's lives easier.

$ virtualenv bark-core-env

  • Activate your environment by sourcing the activation script

$ source bark-core-env/bin/activate

You should source this script every time you work on the project.

And you're done!


Alternate guide

Excuse the shit formatting.

Clone the repo from Github. YMMV, but the easiest way to do it for now is to fork it on Github to your own account first, there's a button in top right corner labelled "Fork". Once that's done, you will have your own copy of the repo to which you can push changes, etc.

If you need to install git, sudo apt-get install git or whatever your distro takes.

Clone the repo into your csesoc-bark virtualenv: cd ~/csesoc-bark; git clone git@github.com:csesoc/bark-core.git [If that fucks up, you haven't set up your SSH key on your Github account. Do so, or just forfeit your ability to push changes for now, and use git clone git://github.com/csesoc/bark-core.git instead]

Change to that bark-code dir. Activate the virtualenv: . ~/csesoc-dev/bin/activate Install the required packages: pip install -r requirements.txt

If that succeeds, you can now run the Bark core by running python runserver.py. There is no webpage to which you can go, but we have a couple of utils to interact with the server, run python utils/mock-auth.py to start one. It will show you the response from the server, and you can see the server print out a few lines about what requests it received, etc.


Note for people who use Cygwin for some strange reason

http://cygwin.com/ml/cygwin/2012-12/msg00141.html

If you're used to
  pip install virtualenv
  virtualenv foo
working, but it recently started failing with
  ...
  File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1506, in
install_python
  raise e
  OSError: [Errno 2] No such file or directory
you may be suffering from
  https://github.com/pypa/virtualenv/issues/373

A workaround that worked for me was to roll back virtualenv from 1.8.4
to 1.8.2, e.g.
$ pip uninstall virtualenv
$ pip install virtualenv==1.8.2
Clone this wiki locally