@@ -56,7 +56,7 @@ class PrintMessenger(Messenger):
5656
5757 def send (self , message , ** kwargs ):
5858 """
59- Send to standard output.
59+ Send the message to standard output.
6060
6161 Parameters
6262 ----------
@@ -88,6 +88,10 @@ def send(self, message, append=True, **kwargs):
8888 append : :obj:`bool`
8989 Do not truncate file when opening (i.e. append to it).
9090
91+ Returns
92+ -------
93+ str
94+ Returns the unique identifier used in the file's name.
9195 """
9296 import json
9397
@@ -114,6 +118,11 @@ def send(self, message, **kwargs):
114118 message : :obj:`dict`
115119 The message to be printed.
116120
121+ Returns
122+ -------
123+ int
124+ The status code from the `request.post`
125+
117126 """
118127 import requests
119128
@@ -134,7 +143,21 @@ def send_message(message, messengers=None, **kwargs):
134143
135144
136145def make_message (obj , context = None ):
137- """Build a message."""
146+ """
147+ Build a message using the specific context
148+
149+ Parameters
150+ ----------
151+ obj : :obj:`dict`
152+ A dictionary containing the non-context information of a message record.
153+ context : :obj:`dict`, optional
154+ Dictionary with the link to the context file or containing a JSON-LD context.
155+
156+ Returns
157+ -------
158+ dict
159+ The message with the context.
160+ """
138161 if context is None :
139162 context = {
140163 "@context" : "https://raw.githubusercontent.com/nipype/pydra/master/pydra/schema/context.jsonld"
@@ -145,7 +168,19 @@ def make_message(obj, context=None):
145168
146169
147170def collect_messages (collected_path , message_path , ld_op = "compact" ):
148- """Gather messages."""
171+ """
172+ Compile all messages into a single provenance graph.
173+
174+ Parameters
175+ ----------
176+ collected_path : :obj:`os.pathlike`
177+ A place to write all of the collected messages. (?TODO)
178+ message_path : :obj:`os.pathlike`
179+ A path with the message file (?TODO)
180+ ld_op : :obj:`str`, optional
181+ Option used by pld.jsonld
182+ """
183+
149184 import pyld as pld
150185 import json
151186 from glob import glob
0 commit comments