Skip to content

Commit

Permalink
#3: Documentation for fn_composers.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Oct 31, 2014
1 parent 775ebc1 commit 0af9388
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions docs/api/ltp.fn_composers.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
ltp.fn_composers module
=======================
fn_composers submodule
======================

This module holds few functions used to dynamically construct filenames for
files in SIP package.

API
---

.. automodule:: ltp.fn_composers
:members:
:undoc-members:
:show-inheritance:
:private-members:
8 changes: 4 additions & 4 deletions src/edeposit/amqp/ltp/fn_composers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _get_suffix(path):
str: Suffix.
Raises:
UserWarning: When / is detected in suffix.
UserWarning: When ``/`` is detected in suffix.
"""
suffix = os.path.basename(path).split(".")[-1]

Expand Down Expand Up @@ -57,7 +57,7 @@ def metadata_fn(book_id):
book_id (int/str): ID of the book, without special characters.
Returns:
str: Filename in format ``"meds_nk-BOOKID.xml``.
str: Filename in format ``meds_nk-BOOKID.xml``.
"""
return "mods_" + str(book_id) + ".xml"

Expand All @@ -70,7 +70,7 @@ def checksum_fn(book_id):
book_id (int/str): ID of the book, without special characters.
Returns:
str: Filename in format ``"MD5_BOOKID.md5``.
str: Filename in format ``MD5_BOOKID.md5``.
"""
return "MD5_" + str(book_id) + ".md5"

Expand All @@ -83,6 +83,6 @@ def info_fn(book_id):
book_id (int/str): ID of the book, without special characters.
Returns:
str: Filename in format ``"info_BOOKID.xml``.
str: Filename in format ``info_BOOKID.xml``.
"""
return "info_" + str(book_id) + ".xml"

0 comments on commit 0af9388

Please sign in to comment.