Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 566bde6

Browse files
committed
tweak install/contributing
1 parent 9fa2d20 commit 566bde6

File tree

4 files changed

+52
-21
lines changed

4 files changed

+52
-21
lines changed

docs/contributing.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ Contributing
44
Thanks for going into this section! This page tries to summaries all information required to contribute to this project.
55
Any contribution must have its own unit tests to ensure good quality and avoid regressions.
66

7-
Unit Tests
8-
~~~~~~~~~~
97

10-
Unit tests are important to avoid bugs. The current test suite used nosetests, to run tests::
8+
Retrieving the code
9+
~~~~~~~~~~~~~~~~~~~
1110

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
1316
1417
Loading fixtures
1518
~~~~~~~~~~~~~~~~
@@ -19,7 +22,17 @@ run the following commands::
1922

2023
make fixtures
2124

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::
2336

2437
make dev
2538

docs/install.rst

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,24 @@ Install
33

44
Python Element has been tested with python 2.7 only and might not work with python 3.x.
55

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+
619
Install services
720
~~~~~~~~~~~~~~~~
821

22+
The default skeleton required a mongodb server running, this is not mandatory for small website.
23+
924
.. code-block:: bash
1025
1126
apt-get install mongodb-server
@@ -20,24 +35,23 @@ Virtual Env makes sure there are not conflict with any installed lib by creating
2035
virtualenv --system-site-packages element
2136
source element/bin/activate
2237
23-
Install python element code
24-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
25-
26-
.. code-block:: bash
27-
28-
pip install -r requirements_test.txt
38+
Install python element
39+
~~~~~~~~~~~~~~~~~~~~~~
2940

30-
Checking installation
31-
~~~~~~~~~~~~~~~~~~~~~
41+
You can install the package by using the main code on github
3242

3343
.. code-block:: bash
3444
35-
make test
45+
pip install git+http://github.com/rande/python-element.git
3646
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.
3952

4053
.. code-block:: bash
4154
42-
make fixtures
43-
make dev
55+
python -m element my-project
56+
57+
The script will explain the next steps.

element/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
print
2323
print "2. You can now run the small demo project:"
2424
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"
2627
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"
2829
print ""
2930
print "--"
3031
print "Python Element - Thomas Rabaix <[email protected]>"

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"futures",
2121
"redis",
2222
"mailer",
23-
"ioc"
23+
"ioc",
24+
"docutils",
25+
"pymongo",
26+
"python-dateutil"
2427
],
2528
include_package_data = True,
2629
)

0 commit comments

Comments
 (0)