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

Expand docstring for each function by author and email (updated 13.06.16) #32

Open
SinaB0ck opened this issue May 31, 2016 · 0 comments

Comments

@SinaB0ck
Copy link

SinaB0ck commented May 31, 2016

tmw-functions will be merged with the cophi-toolbox that contains functions from other projects.
For documentation purposes please expand docstrings by author and email.
If necessary enhance the function's description as well.

Conventions:

At the beginning of each file:

author = "" <-- project/s
authors = "" <-- name of the developer/s
email = "" <-- email of the developer
version = "0.3.0"
date = "2016-03-20"

For each function:

def example_function (args):
""
description ....

Args: ....

ToDo: .....

Author: ...

""

Example:

def read_tei5(teiPath, txtFolder, xpath):
"""
Extract selected text from TEI P5 files and write TXT files.

Args:
    teiPath (str): Path / glob pattern of the TEI files to process.
    txtFolder (str): Path to a folder where to write the text files. Will
        be created if it doesn't exist yet.
    xpath (str): From what should the text be extracted?

        ``alltext``
            all text nodes, including header
        ``bodytext``
            text nodes from the body only
        ``seg``
            Only text that is included in ``seg`` elements
        ``said``
            Only text that is included in ``said`` elements

Todo:
    * do we need :func:`lxml.etree.strip_tags` at all? If so, make configurable & sanitize with `xpath` 
     option
    * the :func:`lxml.etree.strip_elements` stuff should be made configurable
    * filename munging should use os.path etc.
    * code cleanup
    * logging instead of print()

Author:
    CLiGS
"""
@SinaB0ck SinaB0ck changed the title Expand docstring for each function by author and email Expand docstring for each function by author and email (updated 13.06.16) Jun 13, 2016
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

1 participant