Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Documentaion #132

Open
jatin56 opened this issue May 24, 2019 · 1 comment
Open

Code Documentaion #132

jatin56 opened this issue May 24, 2019 · 1 comment

Comments

@jatin56
Copy link

jatin56 commented May 24, 2019

The code for the application is not properly documented. New members wanting to
contribute to the Project may find Difficult to understand the code and may have to spend more
time to understand the code rather than improving it.

Properly Documenting the code will be useful for people who want to contribute or
learn from the code

@theSage21
Copy link
Member

A few guidelines for this issue:

  • Use sphinx
  • don't add noise. Add meaningful docstrings.

For example, this is a useless docstring:

def add(x, y):
    """
    add: method
        adds two things
    parameters: x, y
    returns: number
    """

While I understand that your IDE might be doing this automatically for you please avoid the temptation to follow whatever your IDE tells you to do. A useful docstring/comment would be:

def some_fn():
    ...
    total = cost + damages + repair + 1
    # a comment explaining the significance of 1 and WHY we need it here
    ...

Comments like the following are also quiet useless:

x = a + b  # add a and b and store in x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants