~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to doc/source/development_guidelines.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Chuck Short
  • Date: 2013-08-13 10:37:13 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130813103713-1ctbx4zifyljs2aq
Tags: 1.9.1-0ubuntu1
[ James Page ]
* d/control: Update VCS fields for new branch locations.

[ Chuck Short ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
Coding Guidelines
7
7
-----------------
8
8
 
9
 
For the most part we try to follow PEP 8 guidelines which can be viewed 
 
9
For the most part we try to follow PEP 8 guidelines which can be viewed
10
10
here: http://www.python.org/dev/peps/pep-0008/
11
11
 
12
12
There is a useful pep8 command line tool for checking files for pep8
17
17
------------------
18
18
 
19
19
Swift has a comprehensive suite of tests that are run on all submitted code,
20
 
and it is recommended that developers execute the tests themselves to 
 
20
and it is recommended that developers execute the tests themselves to
21
21
catch regressions early.  Developers are also expected to keep the
22
22
test suite up-to-date with any submitted code changes.
23
23
 
51
51
 
52
52
  - `tox -e pep8,py26`
53
53
 
 
54
------------
 
55
Coding Style
 
56
------------
 
57
 
 
58
Swift use flake8 with the OpenStack `hacking`_ module to enforce
 
59
coding style.
 
60
 
 
61
Install flake8 and hacking with pip or by the packages of your
 
62
Operating System.
 
63
 
 
64
It is advised to integrate flake8+hacking with your editor to get it
 
65
automated and not get `caught` by Jenkins.
 
66
 
 
67
For example for Vim the `syntastic`_ plugin can do this for you.
 
68
 
 
69
.. _`hacking`: https://pypi.python.org/pypi/hacking
 
70
.. _`syntastic`: https://github.com/scrooloose/syntastic
 
71
 
54
72
------------------------
55
73
Documentation Guidelines
56
74
------------------------
57
75
 
58
 
The documentation in docstrings should follow the PEP 257 conventions 
 
76
The documentation in docstrings should follow the PEP 257 conventions
59
77
(as mentioned in the PEP 8 guidelines).
60
78
 
61
79
More specifically:
80
98
---------------------
81
99
 
82
100
You can have the following copyright and license statement at
83
 
the top of each source file. Copyright assignment is optional. 
 
101
the top of each source file. Copyright assignment is optional.
84
102
 
85
103
New files should contain the current year. Substantial updates can have
86
104
another year added, and date ranges are not needed.::