Skip to content

Commit

Permalink
Updated documentation and publish v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Aug 20, 2016
1 parent 6b67926 commit 3500a02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
15 changes: 8 additions & 7 deletions docrep/__init__.py
Expand Up @@ -4,7 +4,7 @@
from warnings import warn


__version__ = '0.0.0.dev1'
__version__ = '0.1.0'

__author__ = 'Philipp Sommer'

Expand Down Expand Up @@ -33,13 +33,13 @@ def safe_modulo(s, meta, checked='', print_warning=True):
----------
s: str
string to apply the modulo operation with
meta: dict
meta informations to insert
meta: dict or tuple
meta informations to insert (usually via ``s % meta``)
checked: {'KEY', 'VALUE'}, optional
Security parameter for the recursive structure of this function. It can
be set to 'VALUE' if an error shall be raised when facing a TypeError
or ValueError or to 'KEY' if an error shall be raised when facing a
KeyError
KeyError. This parameter is mainly for internal processes.
print_warning: bool
If True and a key is not existent in `s`, a warning is raised
Expand All @@ -52,7 +52,7 @@ def safe_modulo(s, meta, checked='', print_warning=True):
>>> s = "That's %(one)s string %(with)s missing 'with' and %s key"
>>> s % {'one': 1}
# raises KeyError because of missing 'with'
>>> s% {'one': 1, 'with': 2}
>>> s % {'one': 1, 'with': 2}
# raises TypeError because of '%s'
>>> safe_modulo(s, {'one': 1})
"That's 1 string %(with)s missing 'with' and %s key"
Expand Down Expand Up @@ -108,7 +108,8 @@ class DocstringProcessor(object):
others) form the docstring for later usage (and make sure, that the
docstring is dedented)::
>>> @d.get_sectionsf('docstring_example')
>>> @d.get_sectionsf('docstring_example',
... sections=['Parameters', 'Examples'])
... @d.dedent
... def doc_test(a=1, b=2):
... '''
Expand All @@ -127,7 +128,7 @@ class DocstringProcessor(object):
... print(a)
>>> @docstrings.dedent
... def second_test(a=1):
... def second_test(a=1, b=2):
... '''
... My second function where I want to use the docstring from
... above
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Expand Up @@ -11,11 +11,11 @@ def readme():


setup(name='docrep',
version='0.0.0.dev1',
description='Python package for docsting repetition',
version='0.1.0',
description='Python package for docstring repetition',
long_description=readme(),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Documentation',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
Expand All @@ -26,7 +26,7 @@ def readme():
'Programming Language :: Python :: 3.5',
'Operating System :: OS Independent',
],
keywords='docstrings docs docstring napoleon numpy',
keywords='docstrings docs docstring napoleon numpy reStructured text',
url='https://github.com/Chilipp/docrep',
author='Philipp Sommer',
author_email='philipp.sommer@unil.ch',
Expand Down

0 comments on commit 3500a02

Please sign in to comment.