You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/scenarios/ci.rst
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,29 @@ Continuous Integration
5
5
Why?
6
6
----
7
7
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:
9
10
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.
11
18
12
19
Jenkins
13
20
-------
14
21
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.
16
24
17
25
18
26
19
27
Buildbot
20
28
--------
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.
22
31
23
32
24
33
Mule?
@@ -29,12 +38,17 @@ Mule?
29
38
Tox
30
39
---
31
40
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
Copy file name to clipboardExpand all lines: docs/scenarios/client.rst
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,23 @@ Network Applications
6
6
HTTP
7
7
::::
8
8
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.
10
12
11
13
Requests
12
14
--------
13
15
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.
15
20
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
Ø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.
Copy file name to clipboardExpand all lines: docs/scenarios/scientific.rst
+37-25Lines changed: 37 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,59 +5,71 @@ Scientific Applications
5
5
Context
6
6
:::::::
7
7
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.
10
11
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
13
15
14
16
Libraries
15
17
:::::::::
16
18
17
19
Numpy
18
20
-----
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.
22
26
23
27
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.
25
30
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+.
27
32
28
33
SciPy
29
34
-----
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.
33
40
34
41
Enthought
35
42
---------
36
43
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.
39
48
40
49
Matplotlib
41
50
----------
42
51
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>`_.
48
57
49
58
50
59
PyQwt
51
60
-----
52
61
53
62
`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.
57
66
58
67
Resources
59
68
:::::::::
60
69
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.
Copy file name to clipboardExpand all lines: docs/scenarios/speed.rst
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,16 @@
1
1
Speed
2
2
=====
3
3
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.
5
6
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.
7
10
8
11
::
9
12
10
-
PyPy
13
+
PyPy
11
14
$ ./pypy -V
12
15
Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:10)
13
16
[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
23
26
CPython
24
27
$ ./python -V
25
28
Python 2.7.1
26
-
$ ./python measure2.py
29
+
$ ./python measure2.py
27
30
1.06774401665
28
31
1.45412397385
29
32
1.51485204697
@@ -37,13 +40,16 @@ Context
37
40
The GIL
38
41
-------
39
42
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.
43
47
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.
47
53
48
54
C Extentions
49
55
------------
@@ -52,8 +58,8 @@ C Extentions
52
58
The GIL
53
59
-------
54
60
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
0 commit comments