Skip to content

Commit daa8ea1

Browse files
committed
Introduced directory dedicated to development guidelines in documentation. Moved some existing ressources to this new directory. Introduced Debian specific install commands.
1 parent c99a2a9 commit daa8ea1

File tree

7 files changed

+218
-46
lines changed

7 files changed

+218
-46
lines changed

README.md

-46
Original file line numberDiff line numberDiff line change
@@ -22,52 +22,6 @@ Lettuce is a [BDD](http://en.wikipedia.org/wiki/Behavior_Driven_Development) too
2222
7. I like [nose](http://code.google.com/p/python-nose/), which is a unittest pythonic framework. However, as the project I work on grows, so do the tests, and it becomes harder to understand them.
2323
8. [lettuce ladies](http://www.lettuceladies.com/) :)
2424

25-
# Dependencies
26-
27-
**you will need to install these dependencies in order to** *hack* **lettuce** :)
28-
all them are used within lettuce tests
29-
30-
## you could use a virtualenv:
31-
32-
> mkvirtualenv lettuce
33-
> workon lettuce
34-
> pip install -r requirements.txt
35-
36-
## or just install manually:
37-
38-
> sudo pip install -r requirements.txt
39-
40-
## or do it really from scratch:
41-
42-
* [nose](http://code.google.com/p/python-nose/)
43-
> [sudo] pip install nose
44-
* [mox](http://code.google.com/p/pymox/)
45-
> [sudo] pip install mox
46-
* [sphinx](http://sphinx.pocoo.org/)
47-
> [sudo] pip install sphinx
48-
* [lxml](http://codespeak.net/lxml/)
49-
> [sudo] pip install lxml
50-
* [tornado](http://tornadoweb.org/)
51-
> [sudo] pip install tornado
52-
* [django](http://djangoproject.com/)
53-
> [sudo] pip install django
54-
55-
# Contributing
56-
57-
1. fork and clone the project
58-
2. install the dependencies above
59-
3. run the tests with make:
60-
> make unit functional integration doctest
61-
4. hack at will
62-
5. commit, push etc
63-
6. send a pull request
64-
65-
## keep in mind
66-
67-
![your lack of tests if disturbing the force](http://farm3.static.flickr.com/2248/2282734669_a7f431e660_o.jpg)
68-
69-
### that lettuce is a testing software, patches and pull requests must come with automated tests, and if suitable, with proper documentation.
70-
7125
# mailing list
7226

7327
## for users

docs/contents.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Lettuce documentation contents
2222
reference/languages
2323
recipes/nose
2424
recipes/django-lxml
25+
dev/index
2526

2627
Indices, glossary and tables
2728
============================

docs/dev/index.rst

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
######################
2+
Development guidelines
3+
######################
4+
5+
Synopsis
6+
========
7+
8+
1. fork and clone the project: see `lettuce repository at github.com`_
9+
2. :doc:`/dev/install`
10+
3. run the tests: see :doc:`/dev/testing`
11+
4. hack at will
12+
5. commit, push, etc...
13+
6. send a pull request
14+
15+
Table of contents
16+
=================
17+
18+
.. toctree::
19+
:maxdepth: 3
20+
21+
install
22+
testing
23+
24+
Keep in mind
25+
============
26+
27+
.. image:: http://farm3.static.flickr.com/2248/2282734669_a7f431e660_o.jpg
28+
:alt: your lack of tests if disturbing the force
29+
30+
**that lettuce is a testing software, patches and pull requests must come with
31+
automated tests, and if suitable, with proper documentation.**
32+
33+
References
34+
==========
35+
36+
.. target-notes::
37+
38+
.. _`lettuce repository at github.com`:
39+
https://github.com/gabrielfalcao/lettuce

docs/dev/install-debian-squeeze.rst

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
##############################
2+
Installation on Debian Squeeze
3+
##############################
4+
5+
Recipe to get a development environment for lettuce in a fresh install of
6+
Debian Squeeze.
7+
8+
Variables
9+
=========
10+
11+
The following values are used below. You may customize them depending on your
12+
needs.
13+
14+
.. highlight:: bash
15+
16+
::
17+
18+
# Lettuce installation directory.
19+
lettuce_dir=~/lettuce
20+
# Virtualenv directory.
21+
lettuce_env_dir=$lettuce_dir
22+
# Git.
23+
upstream_url="https://github.com/gabrielfalcao/lettuce.git"
24+
fork_url=$upstream_url
25+
# System's package manager.
26+
system-install() { su -c "aptitude install ${*}" }
27+
28+
Install system dependencies
29+
===========================
30+
31+
Execute the following commands:
32+
33+
.. highlight:: bash
34+
35+
::
36+
37+
system-install python-dev python-virtualenv git libxml2-dev libxslt-dev
38+
39+
Get sources
40+
===========
41+
42+
.. highlight:: bash
43+
44+
::
45+
46+
git clone $fork_url $lettuce_dir
47+
# Configure upstream
48+
cd $lettuce_dir
49+
git remote add upstream $upstream_url
50+
51+
Create virtualenv
52+
=================
53+
54+
.. highlight:: bash
55+
56+
::
57+
58+
virtualenv --distribute --no-site-packages $lettuce_env_dir
59+
source $lettuce_env_dir/bin/activate
60+
cd $lettuce_dir
61+
pip install -r requirements.txt
62+
63+
Install lettuce in develop mode
64+
===============================
65+
66+
.. highlight:: bash
67+
68+
::
69+
70+
python setup.py develop
71+
72+
Check installation
73+
==================
74+
75+
You should be able to run lettuce and tests.
76+
77+
.. highlight:: bash
78+
79+
::
80+
81+
lettuce --help
82+
83+
Done!
84+
=====
85+
86+
Go back to :doc:`/dev/index` and learn about :doc:`/dev/testing`.

docs/dev/install.rst

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#############################################
2+
Install a development environment for lettuce
3+
#############################################
4+
5+
Here are guidelines to get a development environment for lettuce.
6+
7+
***********
8+
OS specific
9+
***********
10+
11+
Here are repcipes for specific operating systems. They should help you go fast
12+
or automate lettuce installation procedure:
13+
14+
.. toctree::
15+
16+
install-debian-squeeze
17+
18+
******************
19+
Generic guidelines
20+
******************
21+
22+
Dependencies
23+
============
24+
25+
**you will need to install these dependencies in order to** *hack* **lettuce**
26+
:)
27+
28+
All of them are used within lettuce tests.
29+
30+
you could use a virtualenv
31+
--------------------------
32+
33+
.. highlight:: bash
34+
35+
::
36+
37+
mkvirtualenv lettuce
38+
workon lettuce
39+
pip install -r requirements.txt
40+
41+
or just install manually
42+
------------------------
43+
44+
.. highlight:: bash
45+
46+
::
47+
48+
sudo pip install -r requirements.txt
49+
50+
or do it really from scratch
51+
----------------------------
52+
53+
* [nose](http://code.google.com/p/python-nose/)
54+
> [sudo] pip install nose
55+
* [mox](http://code.google.com/p/pymox/)
56+
> [sudo] pip install mox
57+
* [sphinx](http://sphinx.pocoo.org/)
58+
> [sudo] pip install sphinx
59+
* [lxml](http://codespeak.net/lxml/)
60+
> [sudo] pip install lxml
61+
* [tornado](http://tornadoweb.org/)
62+
> [sudo] pip install tornado
63+
* [django](http://djangoproject.com/)
64+
> [sudo] pip install django
65+
66+
Installing lettuce itself
67+
=========================
68+
69+
.. highlight:: bash
70+
71+
::
72+
73+
[sudo] python setup.py develop

docs/dev/testing.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#######
2+
Testing
3+
#######
4+
5+
How to run and write tests for lettuce.
6+
7+
*********
8+
Run tests
9+
*********
10+
11+
.. highlight:: bash
12+
13+
::
14+
15+
make unit functional integration doctest

docs/index.rst

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ Fork it, propose features, explore the code
7575

7676
* `lettuce development mailing list <http://groups.google.com/group/lettuce-developers>`_.
7777

78+
**hack**
79+
80+
:doc:`/dev/index`
81+
7882
**donate**
7983

8084
`support lettuce development <http://pledgie.com/campaigns/10604>`_

0 commit comments

Comments
 (0)