贡献代码

欢迎贡献,我们将不胜感激!一点一滴都有帮助,我们将永远感激。

您可以通过多种方式做出贡献:

贡献类型

提Bug

您可以在https://github.com/hanzhichao/python-yapi/issues 提Bug

如果您要提Bug,请包含以下内容:

  • 您的操作系统名称和版本

  • 对定位Bug有关的,您的本地设置的任何详细信息。

  • 复现Bug的详细步骤。

修复缺陷

查看该项目GitHub问题中标记为”bug”或”help wanted”,您可以尝试修复或实现这些需求。

实现其他功能

查看该项目GitHub问题中标记为”enhancement”或”help wanted”,您可以尝试实现这些需求。

编写文档

python-yapi项目总是需要更多的文档,无论是作为官方文档、功能注释,或者在网络博客中帖子、文章等等。

提交反馈

提交反馈最好的方式是在 https://github.com/hanzhichao/python-yapi/issues 上提交一个问题。

如果您提出一项功能:

  • 详细解释它是如何工作的。

  • 保持范围尽可能缩小,以便更容易实施。

  • 请记住,这是一个志愿者驱动的项目,并且贡献受欢迎的 :)

现在开始吧!

准备好贡献了吗?以下是如何为本地设置`python-yapi`开发环境。

  1. 在GitHub上Fork`python-yapi`仓库。

  2. 克隆你fork的仓库到你本地:

    $ git clone git@github.com:your_name_here/python-yapi.git
    
  3. 将本地副本安装到虚拟环境virtualenv中。假设你有virtualenvwrapper已安装,这就是您为本地设置fork的方式发展:

    $ mkvirtualenv python-yapi
    $ cd python-yapi/
    $ python setup.py develop
    
  4. 为本地开发创建一个分支

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 python-yapi tests
    $ python setup.py test or pytest
    $ tox
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.

  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.

  3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check https://travis-ci.com/hanzhichao/python-yapi/pull_requests and make sure that the tests pass for all supported Python versions.

提示

运行测试子集:

$ pytest tests.test_python-yapi

发布

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.