UbuntuGrok

Differences between revisions 19 and 20
Revision 19 as of 2008-10-03 05:07:38
Size: 1339
Editor: 190
Comment:
Revision 20 as of 2008-10-03 05:17:42
Size: 2135
Editor: 190
Comment:
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
  * src/viejo/models.py -> Stores the models of our application. See the [[http://en.wikipedia.org/wiki/Model-view-controller|Model-view-controller]] for more   * src/viejo/models.py -> Stores the '''models''' of our application. See the [[http://en.wikipedia.org/wiki/Model-view-controller|Model-view-controller]] for more
Line 24: Line 24:
  * src/viejo/tests/models.txt -> Unit doctests for our models.py module
Line 25: Line 26:
  * src/viejo/ftests/viejo.txt -> Functional doctests for our application

For every change we do to the application we always have to run {{{Viejo/bin/test}}} to check we don't break anything.

Some useful bzr commands we will need:
  * bzr status -> it will tell us which files have been changed, deleted or are about to be added to our branch. Always use {{{bzr status}}} before doing a check in. Maybe our local setup works, and we have to make sure launchpad get all the files we want
  * bzr add <filename> -> Makes bzr knows about our new file
  * bzr revert <filename> -> Restore <filename> to be the one we checked out
  * bzr ci -m "Some descriptive message" -> Checks changes back into launchpad

This documents the procedure I used to setup a Grok virtual environment for working on the Viejo content management system. Note that as of September 29th, grokproject 0.9 and grok 0.14 work on python2.5. So the easy_install-2.4 can be omitted.

  • sudo apt-get install build-essential python-dev python-setuptools subversion bzr

  • sudo easy_install virtualenv

  • mkdir viejo_virtualenv

  • cd viejo_virtualenv

  • virtualenv --no-site-packages virtualgrok

  • source virtualgrok/bin/activate

  • easy_install grokproject

  • grokproject Viejo

  • cd Viejo

  • rm -rf setup.py buildout.cfg src

  • bzr checkout lp:~viejo-team/viejo-code/yagni .

  • ./bin/buildout

  • ./bin/test

Now, we're good to go TDD. The main files and directories of our project are:

  • setup.py -> Mostly to include packages required for our project to work

  • buildout.cfg -> Configuration for our instance

  • src/viejo/models.py -> Stores the models of our application. See the Model-view-controller for more

  • src/viejo/tests -> Directory to store our unit doctests

  • src/viejo/tests/models.txt -> Unit doctests for our models.py module

  • src/viejo/ftests -> Directory to store our functional doctests

  • src/viejo/ftests/viejo.txt -> Functional doctests for our application

For every change we do to the application we always have to run Viejo/bin/test to check we don't break anything.

Some useful bzr commands we will need:

  • bzr status -> it will tell us which files have been changed, deleted or are about to be added to our branch. Always use bzr status before doing a check in. Maybe our local setup works, and we have to make sure launchpad get all the files we want

  • bzr add <filename> -> Makes bzr knows about our new file

  • bzr revert <filename> -> Restore <filename> to be the one we checked out

  • bzr ci -m "Some descriptive message" -> Checks changes back into launchpad

UbuntuGrok (last edited 2009-02-05 15:36:28 by 158)