File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -758,14 +758,18 @@ class BaseInterface(Interface):
758
758
_additional_metadata = []
759
759
_redirect_x = False
760
760
761
- def __init__ (self , ** inputs ):
761
+ def __init__ (self , from_file = None , ** inputs ):
762
762
if not self .input_spec :
763
763
raise Exception ('No input_spec in class: %s' %
764
764
self .__class__ .__name__ )
765
765
self .inputs = self .input_spec (** inputs )
766
766
self .estimated_memory_gb = 1
767
767
self .num_threads = 1
768
768
769
+ if from_file is not None :
770
+ self .load_inputs_from_json (from_file )
771
+
772
+
769
773
@classmethod
770
774
def help (cls , returnhelp = False ):
771
775
""" Prints class help
Original file line number Diff line number Diff line change @@ -480,6 +480,8 @@ def __init__(self, **inputs):
480
480
bif2 .load_inputs_from_json (tmp_json )
481
481
yield assert_equal , inputs_dict , bif2 .inputs .get ()
482
482
483
+ bif3 = DerivedInterface (from_file = tmp_json )
484
+ yield assert_equal , inputs_dict , bif3 .inputs .get ()
483
485
484
486
def assert_not_raises (fn , * args , ** kwargs ):
485
487
fn (* args , ** kwargs )
You can’t perform that action at this time.
0 commit comments