Procedure to check for valid Sphinx ReST docstrings
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file docstringtest-0.3.0.tar.gz
.
File metadata
- Download URL: docstringtest-0.3.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c762d1157f6c7a21419c8c7bc3453035ebed9c40472b6adf8505f16fc21c8a7 |
|
MD5 | 7076cf1bad1ebddad98c8a244b95f6ec |
|
BLAKE2b-256 | 25e22cdaa8fa607f79ec0bff9741ce8e26822843533bcac45e3c3f80d9b5ed8c |