Skip to content

Little package to test if docstrings are up-to-date in Python code

License

Notifications You must be signed in to change notification settings

jakelever/docstringtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docstringtest

PyPI Release Travis CI status Coverage status Documentation status MIT license

docstringtest is a small package for regression testing of docstrings in Python code. It checks that all appropriate methods and functions are using ReST docstrings with parameter information so that nice documentation can be generated. This format looks like:

def example_function(varA,varB):
   """
   This function does nothing

   :param varA: The first variable
   :param varB: The second variable
   :type varA: The type of the first variable
   :type varB: The type of the second variable
   """
   pass

It makes it easy to check that the docstrings match with the current parameters so that documentation doesn't become out-of-step with the code.

If you wanted to add docstringtest to a standard test algorithm, it would simply be something like this

import mymodule
import docstringtest

def test_docstringtest():
        docstringtest.testModule(mymodule)

Installation

You can install "docstringtest" via pip from PyPI:

$ pip install docstringtest

Contributing

Contributions are very welcome.

License

Distributed under the terms of the MIT license, "docstringtest" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

About

Little package to test if docstrings are up-to-date in Python code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages