1 *******************************
2 How to Get Your Change Into Ryu
3 *******************************
8 Send patches to ryu-devel@lists.sourceforge.net. Please don't use "Pull
9 Request" on GitHub. We expect you to send patches in "git-format-patch"
14 # "N" means the number of commits to be included
15 $ git format-patch -s HEAD~N
17 # To add cover (e.g., [PATCH 0/X]), specify "--cover-letter" option
18 $ git format-patch -s --cover-letter HEAD~N
20 # You can send patches by "git send-email" command
21 $ git send-email --to="ryu-devel@lists.sourceforge.net" *.patch
23 Please check your changes with autopep8, pycodestyle(pep8) and running
24 unit tests to make sure that they don't break the existing features.
25 The following command does all for you.
29 # Install dependencies of tests
30 $ pip install -r tools/test-requires
33 # Also, it is convenient to add settings of your editor or IDE for
34 # applying autopep8 automatically.
35 $ autopep8 --recursive --in-place ryu/
37 # Execute unit tests and pycodestyle(pep8)
40 Of course, you are encouraged to add unit tests when you add new
41 features (it's not a must though).
43 Python version and libraries
44 ============================
45 * Python 2.7, 3.4, 3.5:
47 Ryu supports multiple Python version. CI tests on Travis-CI is running
50 * standard library + widely used library:
52 Basically widely used == OpenStack adopted.
53 As usual there are exceptions. Or python binding library for other
60 As python is used, PEP8 is would be hopefully mandatory for
61 https://www.python.org/dev/peps/pep-0008/
65 Although pylint is useful for finding bugs, but pylint score not very
66 important for now because we're still at early development stage.
67 https://www.pylint.org/
69 * Google python style guide is very helpful:
70 http://google.github.io/styleguide/pyguide.html
72 * Guidelines derived from Guido's Recommendations:
74 ============================= ================= ========
76 ============================= ================= ========
77 Packages lower_with_under
78 Modules lower_with_under _lower_with_under
79 Classes CapWords _CapWords
81 Functions lower_with_under() _lower_with_under()
82 Global/Class Constants CAPS_WITH_UNDER _CAPS_WITH_UNDER
83 Global/Class Variables lower_with_under _lower_with_under
84 Instance Variables lower_with_under _lower_with_under (protected) or __lower_with_under (private)
85 Method Names lower_with_under() _lower_with_under() (protected) or __lower_with_under() (private)
86 Function/Method Parameters lower_with_under
87 Local Variables lower_with_under
88 ============================= ================= ========
90 * OpenStack Nova style guide:
91 https://github.com/openstack/nova/blob/master/HACKING.rst
95 Ryu source tree has JSON files under ryu/tests/unit/ofproto/json.
96 They are used by unit tests. To make patches easier to read,
97 they are normalized using tools/normalize_json.py. Please re-run
98 the script before committing changes to these JSON files.
102 * Python Essential Reference, 4th Edition [Amazon]
103 * Paperback: 717 pages
104 * Publisher: Addison-Wesley Professional; 4 edition (July 19, 2009)
106 * ISBN-10: 0672329786
107 * ISBN-13: 978-0672329784
109 * The Python Standard Library by Example (Developer's Library)
110 * Paperback: 1344 pages
111 * Publisher: Addison-Wesley Professional; 1 edition (June 11, 2011)
113 * ISBN-10: 0321767349
114 * ISBN-13: 978-0321767349