Skip to content

Commit

Permalink
[FIX] Protocol docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
cfobel committed Sep 12, 2016
1 parent 0202226 commit a023c80
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions microdrop/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,17 @@ def load(cls, filename):
"""
Load a Protocol from a file.
Args:
filename: path to file.
Raises:
TypeError: file is not a Protocol.
FutureVersionError: file was written by a future version of the
software.
Parameters
----------
filename : str
Path to file.
Raises
------
TypeError
If file is not a :class:`Protocol`.
FutureVersionError
If file was written by a future version of the software.
"""
logger.debug("[Protocol].load(\"%s\")" % filename)
logger.info("Loading Protocol from %s" % filename)
Expand Down Expand Up @@ -393,13 +398,14 @@ def to_json(self):
Returns
-------
str
json-encoded dictionary, with two top-level keys:
JSON-encoded dictionary, with two top-level keys:
- ``keys``:
* Each key is a list containing a plugin name and a
corresponding step field name.
- ``values``:
* Maps to list of records (i.e., lists), one per protocol
step.
Each record in the ``values`` list may be *zipped together* with
``keys`` to yield a plugin field name to value mapping for a single
protocol step.
Expand Down

0 comments on commit a023c80

Please sign in to comment.