File tree Expand file tree Collapse file tree 4 files changed +52
-21
lines changed Expand file tree Collapse file tree 4 files changed +52
-21
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ Contributing
4
4
Thanks for going into this section! This page tries to summaries all information required to contribute to this project.
5
5
Any contribution must have its own unit tests to ensure good quality and avoid regressions.
6
6
7
- Unit Tests
8
- ~~~~~~~~~~
9
7
10
- Unit tests are important to avoid bugs. The current test suite used nosetests, to run tests::
8
+ Retrieving the code
9
+ ~~~~~~~~~~~~~~~~~~~
11
10
12
- make test
11
+ .. code-block ::
12
+
13
+ git clone https://github.com/rande/python-element.git
14
+ pip install -e python-element
15
+ cd python-element
13
16
14
17
Loading fixtures
15
18
~~~~~~~~~~~~~~~~
@@ -19,7 +22,17 @@ run the following commands::
19
22
20
23
make fixtures
21
24
22
- Once fixtures are loaded you can start the http webserver with the command::
25
+ Unit Tests
26
+ ~~~~~~~~~~
27
+
28
+ Unit tests are important to avoid bugs. The current test suite used nosetests, to run tests::
29
+
30
+ make test
31
+
32
+ Running code
33
+ ~~~~~~~~~~~~
34
+
35
+ Once fixtures are loaded, you can start the http webserver with the command::
23
36
24
37
make dev
25
38
Original file line number Diff line number Diff line change 3
3
4
4
Python Element has been tested with python 2.7 only and might not work with python 3.x.
5
5
6
+ Short story
7
+ ~~~~~~~~~~~
8
+
9
+ sudo apt-get install mongodb-server
10
+ virtualenv --system-site-packages foobar
11
+ source foobar/bin/activate
12
+ pip install git+http://github.com/rande/python-element.git
13
+ python -m element my-project
14
+ cd my-project
15
+ python start.py element:demo: fixtures
16
+ python start.py tornado:start --verbose -d
17
+
18
+
6
19
Install services
7
20
~~~~~~~~~~~~~~~~
8
21
22
+ The default skeleton required a mongodb server running, this is not mandatory for small website.
23
+
9
24
.. code-block :: bash
10
25
11
26
apt-get install mongodb-server
@@ -20,24 +35,23 @@ Virtual Env makes sure there are not conflict with any installed lib by creating
20
35
virtualenv --system-site-packages element
21
36
source element/bin/activate
22
37
23
- Install python element code
24
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
25
-
26
- .. code-block :: bash
27
-
28
- pip install -r requirements_test.txt
38
+ Install python element
39
+ ~~~~~~~~~~~~~~~~~~~~~~
29
40
30
- Checking installation
31
- ~~~~~~~~~~~~~~~~~~~~~
41
+ You can install the package by using the main code on github
32
42
33
43
.. code-block :: bash
34
44
35
- make test
45
+ pip install git+http://github.com/rande/python-element.git
36
46
37
- Running dummy site
38
- ~~~~~~~~~~~~~~~~~~
47
+ Setup your first project
48
+ ~~~~~~~~~~~~~~~~~~~~~~~~
49
+
50
+ The following command will help you creating your first project based on a skeleton website that you can tweak to
51
+ match your needs.
39
52
40
53
.. code-block :: bash
41
54
42
- make fixtures
43
- make dev
55
+ python -m element my-project
56
+
57
+ The script will explain the next steps.
Original file line number Diff line number Diff line change 22
22
print
23
23
print "2. You can now run the small demo project:"
24
24
print " cd %s" % options .destination
25
- print " python start.py tornado:start --host=127.0.0.1 --port=80"
25
+ print " python start.py element:demo:fixtures"
26
+ print " python start.py tornado:start --verbose -d"
26
27
print
27
- print "3. Open a browser and go to http://127.0.0.1"
28
+ print "3. Open a browser and go to http://127.0.0.1:5000 "
28
29
print ""
29
30
print "--"
30
31
print "Python Element - Thomas Rabaix <[email protected] >"
Original file line number Diff line number Diff line change 20
20
"futures" ,
21
21
"redis" ,
22
22
"mailer" ,
23
- "ioc"
23
+ "ioc" ,
24
+ "docutils" ,
25
+ "pymongo" ,
26
+ "python-dateutil"
24
27
],
25
28
include_package_data = True ,
26
29
)
You can’t perform that action at this time.
0 commit comments