Skip to content

Commit

Permalink
Merge ad33436 into e0282c6
Browse files Browse the repository at this point in the history
  • Loading branch information
celiafish committed Aug 3, 2015
2 parents e0282c6 + ad33436 commit 673110c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions vt_config/NSLS-II/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def get_modules():
'skxray.io.gsas_file_reader',
'skxray.diffraction',
'vttools.to_wrap.fitting',
'tomopy',
]

for mod_name in mod_targets:
Expand Down
7 changes: 7 additions & 0 deletions vttools/scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,16 @@ def define_output_ports(docstring, short_description_word_count=4):
"""

output_ports = []
idx = 0

# now look at the return Returns section
for (the_name, the_type, the_description) in docstring['Returns']:
# when the return parameter has no name but only type and description
if the_type == '':
the_type = the_name
the_name = 'def_output' + str(idx)
idx += 1

base_type, is_optional = _type_optional(the_type)
if is_optional:
continue
Expand Down
2 changes: 1 addition & 1 deletion vttools/wrap_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def compute(self):
ret = library_func(**params_dict)
if len(output_ports) == 1:
self.set_output(output_ports[0].name, ret)
else:
elif ret: # only when output_ports is not empty
for (out_port, ret_val) in zip(output_ports, ret):
self.set_output(out_port.name, ret_val)

Expand Down

0 comments on commit 673110c

Please sign in to comment.