##// END OF EJS Templates
Small doc updates.
Fernando Perez -
Show More
@@ -1,8 +1,11 b''
1 Documenting IPython
1 .. _documenting-ipython:
2 ===================
2
3 =====================
4 Documenting IPython
5 =====================
3
6
4 Standalone documentation
7 Standalone documentation
5 ------------------------
8 ========================
6
9
7 All standalone documentation should be written in plain text (``.txt``) files
10 All standalone documentation should be written in plain text (``.txt``) files
8 using `reStructuredText`_ for markup and formatting. All such documentation
11 using `reStructuredText`_ for markup and formatting. All such documentation
@@ -12,31 +15,32 b' documentation in this location will serve as the main source for IPython'
12 documentation and all existing documentation should be converted to this
15 documentation and all existing documentation should be converted to this
13 format.
16 format.
14
17
15 In the future, the text files in the ``docs`` directory will be used to
18 The actual HTML and PDF docs are built using the Sphinx_ documentation
16 generate all forms of documentation for IPython. This include documentation on
19 generation tool. Sphinx has been adopted as the default documentation tool for
17 the IPython website as well as *pdf* documentation.
20 Python itself as of version 2.6, as well as by a number of projects that
21 IPython is related with, such as numpy, scipy, matplotlib, sage and nipy.
18
22
19 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
23 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
24 .. _Sphinx: http://sphinx.pocoo.org/
20
25
21 A bit of shell code:
22
26
23 .. code-block:: bash
27 The rest of this document is mostly taken from the `matploblib
28 documentation`__; we are using a number of Sphinx tools and extensions written
29 by the matplotlib team and will mostly follow their conventions, which are
30 nicely spelled out in their guide. What follows is thus a lightly adapted
31 version of the matplotlib documentation guide, taken with permission from the
32 MPL team.
24
33
25 cd /tmp
34 .. __: http://matplotlib.sourceforge.net/doc/html/devel/documenting_mpl.html
26 echo "My home directory is: $HOME"
27 ls
28
35
29 A bit of Python code:
30
36
31 .. code-block:: python
37 A bit of Python code::
32
38
33 for i in range(10):
39 for i in range(10):
34 print i,
40 print i,
35 print "A big number:",2**34
41 print "A big number:",2**34
36
42
37 An interactive Python session:
43 An interactive Python session::
38
39 .. code-block:: python
40
44
41 >>> from IPython import genutils
45 >>> from IPython import genutils
42 >>> genutils.get_ipython_dir()
46 >>> genutils.get_ipython_dir()
@@ -47,15 +51,27 b' An IPython session:'
47
51
48 .. code-block:: ipython
52 .. code-block:: ipython
49
53
50 In [8]: import IPython
54 In [7]: import IPython
51
55
52 In [9]: print "This IPython is version:",IPython.__version__
56 In [8]: print "This IPython is version:",IPython.__version__
53 This IPython is version: 0.9.1
57 This IPython is version: 0.9.1
54
58
59 In [9]: 2+4
60 Out[9]: 6
61
62
63 A bit of shell code:
64
65 .. code-block:: bash
66
67 cd /tmp
68 echo "My home directory is: $HOME"
69 ls
55
70
56
71
72
57 Docstring format
73 Docstring format
58 ----------------
74 ================
59
75
60 Good docstrings are very important. All new code will use `Epydoc`_ for
76 Good docstrings are very important. All new code will use `Epydoc`_ for
61 generating API docs, so we will follow the `Epydoc`_ conventions. More
77 generating API docs, so we will follow the `Epydoc`_ conventions. More
General Comments 0
You need to be logged in to leave comments. Login now