OpenGenus / vidsum

Generate summary of any video :tv: anywhere and anytime
GNU General Public License v3.0
262 stars 69 forks source link

Add docstrings to functions #20

Closed lwgray closed 7 years ago

lwgray commented 7 years ago

Overall: A docstring should be included at the top of code to summarize project @adiChat This might be good for you to do

Specifically (see example below): This could be done by other contributers

  1. Docstrings should be added to each function.
  2. The docstrings in each function must include argument type with short description
  3. The docstrings in each function must include a return type
    def is_cow(sound):
        ''' Checks if cow makes inputted sound 
        Args:
            sound(str): sound the animal makes
        Returns:
            bool: True for success, False otherwise.
        '''
        if sound == 'moo':
            return True
        else:
            return False
yashasingh commented 7 years ago

@AdiChat I would like to work on this issue.

AdiChat commented 7 years ago

@yashasingh Go for it. 👍

luisdcb97 commented 7 years ago

If the function does not explicitly return do we still need to provide a description beyond returns None?

lwgray commented 7 years ago

I think that for the functions that don't return anything, just include a general description of the function and it's inputs. I would exclude the Returns portion of the docstring in these functions. @AdiChat what do you think? Also, don't use Returns None. None is an object in python.

Please chime in if you think it should be handled differently

AdiChat commented 7 years ago

I agree 👍

lwgray commented 7 years ago

Need to reopen issue... I found several minor issues with the docstrings and will submit a PR

AdiChat commented 7 years ago

Sure 👍