@@ -1802,14 +1802,17 @@ def _get_ssh_client(self):
1802
1802
client .connect (host ['hostname' ], username = host ['user' ], sock = proxy )
1803
1803
return client
1804
1804
1805
+
1805
1806
class JSONFileGrabberInputSpec (DynamicTraitedSpec , BaseInterfaceInputSpec ):
1806
1807
in_file = File (exists = True , mandatory = True ,
1807
1808
desc = 'JSON source file' )
1808
1809
1810
+
1809
1811
class JSONFileGrabber (IOBase ):
1812
+
1810
1813
"""
1811
- Datagrabber module that loads a json file and generates an output for every
1812
- first-level object
1814
+ Datagrabber interface that loads a json file and generates an output for
1815
+ every first-level object
1813
1816
1814
1817
Example
1815
1818
-------
@@ -1828,7 +1831,6 @@ class JSONFileGrabber(IOBase):
1828
1831
output_spec = DynamicTraitedSpec
1829
1832
_always_run = True
1830
1833
1831
-
1832
1834
def _list_outputs (self ):
1833
1835
import json
1834
1836
@@ -1854,6 +1856,7 @@ class JSONFileSinkOutputSpec(TraitedSpec):
1854
1856
1855
1857
1856
1858
class JSONFileSink (IOBase ):
1859
+
1857
1860
""" Very simple frontend for storing values into a JSON file.
1858
1861
1859
1862
.. warning::
@@ -1864,7 +1867,8 @@ class JSONFileSink(IOBase):
1864
1867
Examples
1865
1868
--------
1866
1869
1867
- >>> jsonsink = JSONFileSink(input_names=['subject_id', 'some_measurement'])
1870
+ >>> jsonsink = JSONFileSink(input_names=['subject_id',
1871
+ ... 'some_measurement'])
1868
1872
>>> jsonsink.inputs.subject_id = 's1'
1869
1873
>>> jsonsink.inputs.some_measurement = 11.4
1870
1874
>>> jsonsink.run() # doctest: +SKIP
@@ -1897,3 +1901,4 @@ def _list_outputs(self):
1897
1901
outputs = self .output_spec ().get ()
1898
1902
outputs ['out_file' ] = out_file
1899
1903
return outputs
1904
+
0 commit comments