Skip to content

Commit 4d12bfe

Browse files
committed
lines less than 80 chars in /scenarios/
1 parent 70ca1a8 commit 4d12bfe

7 files changed

Lines changed: 119 additions & 70 deletions

File tree

docs/scenarios/ci.rst

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,29 @@ Continuous Integration
55
Why?
66
----
77

8-
Martin Fowler, who first wrote about `Continuous Integration <http://martinfowler.com/articles/continuousIntegration.html>`_ (short: CI) together with Kent Beck, describes the CI as follows:
8+
Martin Fowler, who first wrote about `Continuous Integration <http://martinfowler.com/articles/continuousIntegration.html>`_
9+
(short: CI) together with Kent Beck, describes the CI as follows:
910

10-
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
11+
Continuous Integration is a software development practice where members of
12+
a team integrate their work frequently, usually each person integrates at
13+
least daily - leading to multiple integrations per day. Each integration is
14+
verified by an automated build (including test) to detect integration errors
15+
as quickly as possible. Many teams find that this approach leads to
16+
significantly reduced integration problems and allows a team to develop
17+
cohesive software more rapidly.
1118

1219
Jenkins
1320
-------
1421

15-
`Jenkins CI <http://jenkins-ci.org>`_ is an extensible continuous integration engine. Use it.
22+
`Jenkins CI <http://jenkins-ci.org>`_ is an extensible continuous integration
23+
engine. Use it.
1624

1725

1826

1927
Buildbot
2028
--------
21-
`Buildbot <http://buildbot.net/buildbot/docs/current>`_ is a Python system to automate the compile/test cycle to validate code changes.
29+
`Buildbot <http://buildbot.net/buildbot/docs/current>`_ is a Python system to
30+
automate the compile/test cycle to validate code changes.
2231

2332

2433
Mule?
@@ -29,12 +38,17 @@ Mule?
2938
Tox
3039
---
3140

32-
`tox <https://bitbucket.org/hpk42/tox>`_ is an automation tool providing packaging, testing and deployment of Python software right from the console or CI server.
33-
It is a generic virtualenv management and test command line tool which provides the following features:
34-
35-
* Checking that packages install correctly with different Python versions and interpreters
36-
* Running tests in each of the environments, configuring your test tool of choice
37-
* Acting as a frontend to Continuous Integration servers, reducing boilerplate and merging CI and shell-based testing.
41+
`tox <https://bitbucket.org/hpk42/tox>`_ is an automation tool providing
42+
packaging, testing and deployment of Python software right from the console or
43+
CI server. It is a generic virtualenv management and test command line tool
44+
which provides the following features:
45+
46+
* Checking that packages install correctly with different Python versions and
47+
interpreters
48+
* Running tests in each of the environments, configuring your test tool of
49+
choice
50+
* Acting as a frontend to Continuous Integration servers, reducing boilerplate
51+
and merging CI and shell-based testing.
3852

3953

4054
Travis-CI

docs/scenarios/client.rst

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ Network Applications
66
HTTP
77
::::
88

9-
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.
9+
The Hypertext Transfer Protocol (HTTP) is an application protocol for
10+
distributed, collaborative, hypermedia information systems. HTTP is the
11+
foundation of data communication for the World Wide Web.
1012

1113
Requests
1214
--------
1315

14-
Python’s standard urllib2 module provides most of the HTTP capabilities you need, but the API is thoroughly broken. It was built for a different time — and a different web. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.
16+
Python’s standard urllib2 module provides most of the HTTP capabilities you
17+
need, but the API is thoroughly broken. It was built for a different time —
18+
and a different web. It requires an enormous amount of work (even method
19+
overrides) to perform the simplest of tasks.
1520

16-
Requests takes all of the work out of Python HTTP — making your integration with web services seamless. There’s no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, powered by urllib3, which is embedded within Requests
21+
Requests takes all of the work out of Python HTTP — making your integration
22+
with web services seamless. There’s no need to manually add query strings to
23+
your URLs, or to form-encode your POST data. Keep-alive and HTTP connection
24+
pooling are 100% automatic, powered by urllib3, which is embedded within
25+
Requests.
1726

1827
- `Documention <http://docs.python-requests.org/en/latest/index.html>`_
1928
- `PyPi <http://pypi.python.org/pypi/requests>`_
@@ -27,4 +36,8 @@ Distributed Systems
2736
ZeroMQ
2837
------
2938

30-
ØMQ (also spelled ZeroMQ, 0MQ or ZMQ) is a high-performance asynchronous messaging library aimed at use in scalable distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ØMQ system can run without a dedicated message broker. The library is designed to have a familiar socket-style API.
39+
ØMQ (also spelled ZeroMQ, 0MQ or ZMQ) is a high-performance asynchronous
40+
messaging library aimed at use in scalable distributed or concurrent
41+
applications. It provides a message queue, but unlike message-oriented
42+
middleware, a ØMQ system can run without a dedicated message broker. The
43+
library is designed to have a familiar socket-style API.

docs/scenarios/db.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Nearly all Python database modules such as `sqlite3`, `psycopg` and
1414
SQLAlchemy
1515
----------
1616

17-
`SQLAlchemy <http://www.sqlalchemy.org/>`_ is a commonly used database toolkit. Unlike many database libraries
18-
it not only provides an ORM layer but also a generalized API for writing
19-
database-agnostic code without SQL.
17+
`SQLAlchemy <http://www.sqlalchemy.org/>`_ is a commonly used database toolkit.
18+
Unlike many database libraries it not only provides an ORM layer but also a
19+
generalized API for writing database-agnostic code without SQL.
2020

2121
::
2222

@@ -25,8 +25,10 @@ database-agnostic code without SQL.
2525
Django ORM
2626
----------
2727

28-
The Django ORM is the interface used by `Django <http://www.djangoproject.com>`_ to provide database access.
28+
The Django ORM is the interface used by `Django <http://www.djangoproject.com>`_
29+
to provide database access.
2930

30-
It's based on the idea of models, an abstraction that makes it easier to manipulate data in Python.
31+
It's based on the idea of models, an abstraction that makes it easier to
32+
manipulate data in Python.
3133

3234
Documentation can be found `here <https://docs.djangoproject.com/en/1.3/#the-model-layer>`_

docs/scenarios/gui.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ GUI Applications
44

55
Qt
66
::
7-
Qt is a cross-platform application framework that is widely used for developing software with a GUI but can also be used for non-GUI applications.
7+
Qt is a cross-platform application framework that is widely used for developing
8+
software with a GUI but can also be used for non-GUI applications.
89

910
PySide
1011
------
@@ -30,15 +31,16 @@ WXPython
3031

3132
Install (Stable)
3233
----------------
33-
*Go to http://www.wxpython.org/download.php#stable and download the appropriate package for your OS.*
34+
*Go to http://www.wxpython.org/download.php#stable and download the appropriate
35+
package for your OS.*
3436

3537
Gtk
3638
:::
3739
PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library
3840
itself, it is currently licensed under the GNU LGPL. It is worth noting that
3941
PyGTK only currenty supports the Gtk-2.X API (NOT Gtk-3.0). It is currently
40-
recommended that PyGTK is not used for new projects and existing applications be
41-
ported from PyGTK to PyGObject.
42+
recommended that PyGTK is not used for new projects and existing applications
43+
be ported from PyGTK to PyGObject.
4244

4345
Tk
4446
::

docs/scenarios/scientific.rst

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,71 @@ Scientific Applications
55
Context
66
:::::::
77

8-
Python is frequently used for high-performance scientific applications. Python is widely used in academia
9-
and scientific projects because it is easy to write, and it performs really well.
8+
Python is frequently used for high-performance scientific applications. Python
9+
is widely used in academia and scientific projects because it is easy to write,
10+
and it performs really well.
1011

11-
Due to its high performance nature, scientific computing in python often refers to external libraries, typically
12-
written in faster languages (like C, or FORTRAN for matrix operations). The main libraries used are NumPy and SciPy
12+
Due to its high performance nature, scientific computing in python often refers
13+
to external libraries, typically written in faster languages (like C, or FORTRAN
14+
for matrix operations). The main libraries used are NumPy and SciPy
1315

1416
Libraries
1517
:::::::::
1618

1719
Numpy
1820
-----
19-
`NumPy <http://numpy.scipy.org/>`_ is a low level library written in C (and FORTRAN) for high level mathematical functions.
20-
NumPy cleverly overcomes the problem of running slower algorithms on Python by using multidimensional arrays and functions that operate on arrays.
21-
Any algorithm can then be expressed as a function on arrays, allowing the algorithms to be run quickly.
21+
`NumPy <http://numpy.scipy.org/>`_ is a low level library written in C (and
22+
FORTRAN) for high level mathematical functions. NumPy cleverly overcomes the
23+
problem of running slower algorithms on Python by using multidimensional arrays
24+
and functions that operate on arrays. Any algorithm can then be expressed as a
25+
function on arrays, allowing the algorithms to be run quickly.
2226

2327

24-
NumPy is part of the SciPy project, and is released as a separate library so people who only need the basic requirements can just use NumPy.
28+
NumPy is part of the SciPy project, and is released as a separate library so
29+
people who only need the basic requirements can just use NumPy.
2530

26-
NumPy is compatible with Python versions 2.4 through to 2.7.2 and 3.1+.
31+
NumPy is compatible with Python versions 2.4 through to 2.7.2 and 3.1+.
2732

2833
SciPy
2934
-----
30-
`SciPy <http://scipy.org/>`_ is a library that uses Numpy for more mathematical function. SciPy uses NumPy arrays as its basic data structure.
31-
SciPy comes with modules for various commonly used tasks in scientific programing like linear algebra, integration (calculus),
32-
ordinary differential equation solvers and signal processing.
35+
`SciPy <http://scipy.org/>`_ is a library that uses Numpy for more mathematical
36+
function. SciPy uses NumPy arrays as its basic data structure. SciPy comes with
37+
modules for various commonly used tasks in scientific programing like linear
38+
algebra, integration (calculus), ordinary differential equation solvers and
39+
signal processing.
3340

3441
Enthought
3542
---------
3643

37-
Installing NumPy and SciPy can be a daunting task. Which is why the `Enthought Python distribution <http://enthought.com/>`_ was created. With Enthought,
38-
scientific python has never been easier (one click to install about 100 scientific python packages). User beware: Enthought is not free.
44+
Installing NumPy and SciPy can be a daunting task. Which is why the
45+
`Enthought Python distribution <http://enthought.com/>`_ was created. With
46+
Enthought, scientific python has never been easier (one click to install about
47+
100 scientific python packages). User beware: Enthought is not free.
3948

4049
Matplotlib
4150
----------
4251

43-
`matplotlib <http://matplotlib.sourceforge.net/>`_ is a flexible plotting library
44-
for creating interactive 2D and 3D plots that can also be saved as manuscript-quality
45-
figures. The API in many ways reflects that of `MATLAB <http://www.mathworks.com/products/matlab/>`_, easing transition of MATLAB
46-
users to Python. Many examples, along with the source code to re-create them,
47-
can be browsed at the `matplotlib gallery <http://matplotlib.sourceforge.net/gallery.html>`_.
52+
`matplotlib <http://matplotlib.sourceforge.net/>`_ is a flexible plotting
53+
library for creating interactive 2D and 3D plots that can also be saved as
54+
manuscript-quality figures. The API in many ways reflects that of `MATLAB <http://www.mathworks.com/products/matlab/>`_,
55+
easing transition of MATLAB users to Python. Many examples, along with the
56+
source code to re-create them, can be browsed at the `matplotlib gallery <http://matplotlib.sourceforge.net/gallery.html>`_.
4857

4958

5059
PyQwt
5160
-----
5261

5362
`PyQwt <http://pyqwt.sourceforge.net/>`_ is a solid library for plotting
54-
numerical data. It is built on top of the popular `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_ GUI framework.
55-
It typically has better performance than matplotlib, but the range of built-in
56-
chart/plot types is slightly smaller than matplotlib.
63+
numerical data. It is built on top of the popular `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_
64+
GUI framework. It typically has better performance than matplotlib, but the
65+
range of built-in chart/plot types is slightly smaller than matplotlib.
5766

5867
Resources
5968
:::::::::
6069

61-
Many people who do scientific computing are on Windows. And yet many of the scientific computing packages are notoriously difficult to build and install.
62-
`Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_ however, has compiled a list of Windows binaries for many useful Python packages.
63-
The list of packages has grown from a mainly scientific python resource to a more general list. It might be a good idea to check it out if you're on Windows.
70+
Many people who do scientific computing are on Windows. And yet many of the
71+
scientific computing packages are notoriously difficult to build and install.
72+
`Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_ however, has
73+
compiled a list of Windows binaries for many useful Python packages. The list
74+
of packages has grown from a mainly scientific python resource to a more
75+
general list. It might be a good idea to check it out if you're on Windows.

docs/scenarios/speed.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
Speed
22
=====
33

4-
CPython, the most commonly used implementation of Python, is slow for CPU bound tasks. `PyPy`_ is fast.
4+
CPython, the most commonly used implementation of Python, is slow for CPU bound
5+
tasks. `PyPy`_ is fast.
56

6-
Using a slightly modified version of `David Beazleys`_ CPU bound test code(added loop for multiple tests), you can see the difference between CPython and PyPy's processing.
7+
Using a slightly modified version of `David Beazleys`_ CPU bound test code
8+
(added loop for multiple tests), you can see the difference between CPython
9+
and PyPy's processing.
710

811
::
912

10-
PyPy
13+
PyPy
1114
$ ./pypy -V
1215
Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:10)
1316
[PyPy 1.7.0 with GCC 4.4.3]
@@ -23,7 +26,7 @@ Using a slightly modified version of `David Beazleys`_ CPU bound test code(added
2326
CPython
2427
$ ./python -V
2528
Python 2.7.1
26-
$ ./python measure2.py
29+
$ ./python measure2.py
2730
1.06774401665
2831
1.45412397385
2932
1.51485204697
@@ -37,13 +40,16 @@ Context
3740
The GIL
3841
-------
3942

40-
`The GIL`_ (Global Interpreter Lock) is how Python allows multiple threads to operate at the same time. Python's
41-
memory management isn't entirely thread-safe, so the GIL is requried to prevents multiple threads from running
42-
the same Python code at once.
43+
`The GIL`_ (Global Interpreter Lock) is how Python allows multiple threads to
44+
operate at the same time. Python's memory management isn't entirely thread-safe,
45+
so the GIL is requried to prevents multiple threads from running the same
46+
Python code at once.
4347

44-
David Beazley has a great `guide`_ on how the GIL operates. He also covers the `new GIL`_ in Python 3.2. His
45-
results show that maximizing performance in a Python application requires a strong understanding of the GIL,
46-
how it affects your specific application, how many cores you have, and where your application bottlenecks are.
48+
David Beazley has a great `guide`_ on how the GIL operates. He also covers the
49+
`new GIL`_ in Python 3.2. His results show that maximizing performance in a
50+
Python application requires a strong understanding of the GIL, how it affects
51+
your specific application, how many cores you have, and where your application
52+
bottlenecks are.
4753

4854
C Extentions
4955
------------
@@ -52,8 +58,8 @@ C Extentions
5258
The GIL
5359
-------
5460

55-
`Special care`_ must be taken when writing C extensions to make sure you register your threads
56-
with the interpreter.
61+
`Special care`_ must be taken when writing C extensions to make sure you r
62+
egister your threads with the interpreter.
5763

5864
C Extentions
5965
::::::::::::

docs/scenarios/web.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The Web Server Gateway Interface (or "WSGI" for short) is a standard
1414
interface between web servers and Python web application frameworks. By
1515
standardizing behavior and communication between web servers and Python web
1616
frameworks, WSGI makes it possible to write portable Python web code that
17-
can be deployed in any :ref:`WSGI-compliant web server <wsgi-servers-ref>`. WSGI is
18-
documented in `PEP-3333 <http://www.python.org/dev/peps/pep-3333/>`_.
17+
can be deployed in any :ref:`WSGI-compliant web server <wsgi-servers-ref>`.
18+
WSGI is documented in `PEP-3333 <http://www.python.org/dev/peps/pep-3333/>`_.
1919

2020

2121
Frameworks
@@ -71,8 +71,8 @@ you may need, such as database access or form generation and validation. For
7171
many popular modules, `Extensions <http://flask.pocoo.org/extensions/>`_ may
7272
already exist to suit your needs.
7373

74-
**Support** for flask can best be found in its mailing list. Just shoot an email to
75-
flask@librelist.com and reply to the confirmation email.
74+
**Support** for flask can best be found in its mailing list. Just shoot an
75+
email to flask@librelist.com and reply to the confirmation email.
7676

7777

7878
.. todo:: Explain Pyramid
@@ -126,8 +126,8 @@ The majority of self hosted Python applications today are hosted with a WSGI
126126
server such as :ref:`gUnicorn <gunicorn-ref>`, either directly or behind a
127127
lightweight web server such as :ref:`nginx <nginx-ref>`.
128128

129-
The WSGI servers serve the Python applications while the web server handles tasks
130-
better suited for it such as static file serving, request routing, DDoS
129+
The WSGI servers serve the Python applications while the web server handles
130+
tasks better suited for it such as static file serving, request routing, DDoS
131131
protection, and basic authentication.
132132

133133
Hosting
@@ -158,10 +158,10 @@ Heroku
158158
`Cedar stack <http://devcenter.heroku.com/articles/cedar>`_ offers first class
159159
support for Python 2.7 applications.
160160

161-
Heroku allows you to run as many Python web applications as you like, 24/7 and free
162-
of charge. Heroku is best described as a horizontal scaling platform. They start
163-
to charge you once you "scale" you application to run on more than one Dyno
164-
(abstacted servers) at a time.
161+
Heroku allows you to run as many Python web applications as you like, 24/7 and
162+
free of charge. Heroku is best described as a horizontal scaling platform. They
163+
start to charge you once you "scale" you application to run on more than one
164+
Dyno (abstacted servers) at a time.
165165

166166
Heroku publishes `step-by-step instructions
167167
<http://devcenter.heroku.com/articles/python>`_ on how to set up your first

0 commit comments

Comments
 (0)