加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CONTRIBUTING.rst 3.48 KB
一键复制 编辑 原始数据 按行查看 历史
Brad Cowie 提交于 2020-05-12 16:32 . Update how to contribute to Ryu.

How to Get Your Change Into Ryu

Submitting a change

To send patches to ryu, please make a pull request on GitHub.

Please check your changes with autopep8, pycodestyle(pep8) and running unit tests to make sure that they don't break the existing features. The following command does all for you.

# Install dependencies of tests
$ pip install -r tools/test-requires

# Execute autopep8
# Also, it is convenient to add settings of your editor or IDE for
# applying autopep8 automatically.
$ autopep8 --recursive --in-place ryu/

# Execute unit tests and pycodestyle(pep8)
$ ./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.7, 3.5, 3.6, 3.7:

    Ryu supports multiple Python version. CI tests on Travis-CI is running on these versions.

  • standard library + widely used library:

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

Coding style guide

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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化