Digapis Code Submission Specification White paper

Source: Internet
Author: User

Python
  1. Code style: PEP8 Specification, reference
  2. Annotation specification:

    2.1. File Header:

    #!/usr/bin/env python# -*- coding: utf-8 -*-# @Author    :  Jason# @Mail      :  [email protected]# @File      :  文件名.py

    2.2. Class Notes:

    class SampleClass(object):"""Summary of class here.Longer class information....Longer class information....Attributes:    likes_spam: A boolean indicating if we like SPAM or not.    eggs: An integer count of the eggs we have laid."""def __init__(self, likes_spam=False):    """Inits SampleClass with blah."""    self.likes_spam = likes_spam    self.eggs = 0def public_method(self):    """Performs operation blah."""

    The Chinese readme is as follows:

    """ 类的终结...(主要介绍功能概况)详细描述。。。属性:    参数1:类型,干啥用的    参数:类型,干什么用的"""

    2.3. Function Notes:

    def fetch_bigtable_rows (big_table, Keys, Other_silly_variable=none): "" "fetches rows from a bigtable.retrieves rows  Pertaining to the given keys from the Table instancerepresented by Big_table.    Silly things may happen ifother_silly_variable are not None.Args:big_table:An open Bigtable table instance.    Keys:a sequence of strings representing the key of each table row to fetch. Other_silly_variable:another optional variable, that have a much longer name than the other args, and which does no Thing. Returns:a dict mapping keys to the corresponding table row data fetched. Each row is represented as a tuple of strings. For example: {' Serak ': (' Rigel VII ', ' preparer '), ' Zim ': (' Irk ', ' Invader '), ' lrrr ': (' Omicron Persei 8 ', ' E Mperor ')} If a key from the keys argument are missing from the dictionary and then so row was not found in the TABLE.R Aises:IOError:An error occurred accessing the bigtable. Table object. "" " Pass

    The Chinese readme is as follows:

    """函数整体功能概述详细描述。。。参数:    参数1:干啥用的    参数2:干啥用的返回:    详细描述。。。    例子:    {“参数1,参数2。。。”:返回值)}提示:    程序不完善的或者可能出现报错的情况"""
Git Commit
  1. Submission format

    <type>(<scope>): <subject>//空一行<body>
  2. Description

    Type (required), scope (optional), and subject (required)

    (optional)

  3. Example

    fix: feat(0429留言下单): add 'graphiteWidth' option提交的具体情况

    About<type>

    • The type is used to describe the category of commit, allowing only the following 8 identities to be used.
    • BR: This item is specifically targeted for bug numbers, which are used to respond to bug changes in the bug list to the test
    • Feat: New Feature (feature)
    • FIX: Fix bugs
    • Docs: Documentation (documentation)
    • Style: Format (does not affect changes in code run)
    • Refactor: Refactoring (that is, not a new feature, or a code change that modifies a bug)
    • Test: Add Tests
    • Chore: Changes in the build process or the aid tool
    • Revert:feat (pencil): Add ' graphitewidth ' option (undo previous commit)

    About<scope>
    scope用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同。

    About<subject>
    Subject is a short description of the commit purpose, no more than 50 characters.
    Start with a verb, use the first person present tense, such as change, instead of changed or changes
    First Letter Lowercase
    End without a period (.)

    About<body>
    The Body part is a detailed description of this commit and can be divided into multiple lines.

Digapis Code Submission Specification White paper

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.