Skip to content
YAMAMOTO Takashi edited this page May 16, 2013 · 2 revisions

Participate

Submitting a change

Send patches to [email protected].
Please don't use 'pull request' on github. We expect you to send a patch in Linux kernel development style. If you are not familiar with it, please read the following document:

http://lxr.linux.no/source/Documentation/SubmittingPatches

Please check your changes with PEP 8 and run unit tests to make sure that they don't break the existing features. The following command does both for you:

$ cd ryu/
$ ./run_tests.sh

Of course, you are encouraged to add unit tests when you add new features (it's not a must though).

Python version and libraries

  • Python 2.6+ As RHEL 6 adopted python 2.6, features only for 2.7+ should be avoided.

  • standard library + widely used library Basically widely used == OpenStack adopted As usual there are exceptions. eventlet. Or python binding library for other component.

Coding style guide

Type Public Internal
Packages lower_with_under
Modules lower_with_under _lower_with_under
Classes CapWords _CapWords
Exceptions CapWords
Functions lower_with_under() _lower_with_under()
Global/Class Constants CAPS_WITH_UNDER _CAPS_WITH_UNDER
Global/Class Variables lower_with_under _lower_with_under
Instance Variables lower_with_under _lower_with_under (protected) or __lower_with_under (private)
Method Names lower_with_under() _lower_with_under() (protected) or __lower_with_under() (private)
Function/Method Parameters lower_with_under
Local Variables lower_with_under

Reference

  • Python Essential Reference, 4th Edition [Amazon]

    • Paperback: 717 pages
    • Publisher: Addison-Wesley Professional; 4 edition (July 19, 2009)
    • Language: English
    • ISBN-10: 0672329786
    • ISBN-13: 978-0672329784
  • The Python Standard Library by Example (Developer's Library)

    • Paperback: 1344 pages
    • Publisher: Addison-Wesley Professional; 1 edition (June 11, 2011)
    • Language: English
    • ISBN-10: 0321767349
    • ISBN-13: 978-0321767349