Commit 2a30ff9a8d9b15c62eeab9d7e9207d063cee1d55

Authored by Sergio Oliveira
2 parents eae398a9 77fd4a8f

Merge pull request #64 from colab/update_readme

Update development environment stuff in README
Showing 1 changed file with 44 additions and 8 deletions   Show diff stats
@@ -50,8 +50,18 @@ First install the dependencies and than the project it self: @@ -50,8 +50,18 @@ First install the dependencies and than the project it self:
50 50
51 .. code-block:: 51 .. code-block::
52 52
53 - pip install -r requirements.txt  
54 - pip install . 53 + pip install -e .
  54 +
  55 +Development environment
  56 +-----------------------
  57 +
  58 +You must install vagrant to set up the development environment. With vagrant available you should run:
  59 +
  60 +.. code-block::
  61 +
  62 + vagrant up
  63 +
  64 +During the process you should choose the vagrant box that you want to use. In the end you should have a virtual machine with development environment set up.
55 65
56 66
57 67
@@ -60,13 +70,17 @@ Running Colab @@ -60,13 +70,17 @@ Running Colab
60 70
61 To run Colab with development server you will have to: 71 To run Colab with development server you will have to:
62 72
63 -1- Create the example configuration file: 73 +1- Log in virtual machine:
64 74
65 .. code-block:: 75 .. code-block::
66 76
67 - colab-admin initconfig > /etc/colab/settings.py 77 + vagrant ssh
68 78
69 -2- Edit the configuration file. Make sure you set everything you need including **database** credentials. 79 +2- Use colab virtualenv:
  80 +
  81 +.. code-block::
  82 +
  83 + workon colab
70 84
71 3- Run the development server: 85 3- Run the development server:
72 86
@@ -74,6 +88,7 @@ To run Colab with development server you will have to: @@ -74,6 +88,7 @@ To run Colab with development server you will have to:
74 88
75 colab-admin runserver 0.0.0.0:8000 89 colab-admin runserver 0.0.0.0:8000
76 90
  91 +Now you can access colab in your browser via http://localhost:8000
77 92
78 **NOTE**: In case you want to keep the configuration file else where just set the 93 **NOTE**: In case you want to keep the configuration file else where just set the
79 desired location in environment variable **COLAB_SETTINGS**. 94 desired location in environment variable **COLAB_SETTINGS**.
@@ -84,12 +99,33 @@ About test @@ -84,12 +99,33 @@ About test
84 How to write a test 99 How to write a test
85 -------------------- 100 --------------------
86 Inside of each folder on /vagrant/colab/<folder> you can create a folder called 101 Inside of each folder on /vagrant/colab/<folder> you can create a folder called
87 -"tests", and inside of it implements the code for test each file. 102 +"tests" and inside of it implements the code for test each file. Remember that you should create __init__.py file.
88 103
89 How to run the tests 104 How to run the tests
90 -------------------- 105 --------------------
91 106
92 Follow the steps below: 107 Follow the steps below:
93 108
94 -* Go to vagrant/colab/  
95 -* run: ./runtests.sh 109 +1- Log in virtual machine:
  110 +
  111 +.. code-block::
  112 +
  113 + vagrant ssh
  114 +
  115 +2- Use colab virtualenv:
  116 +
  117 +.. code-block::
  118 +
  119 + workon colab
  120 +
  121 +3- Enter into colab source code directory:
  122 +
  123 +.. code-block::
  124 +
  125 + cd /vagrant
  126 +
  127 +4- Run tests with setup.py:
  128 +
  129 +.. code-block::
  130 +
  131 + python setup.py test