1414from tempfile import mkdtemp
1515
1616from . import state
17- from . import auxiliary as aux
17+ from . import helpers_state as hlpst
1818from .specs import File , BaseSpec , RuntimeSpec , Result , SpecInfo , LazyField , TaskHook
1919from .helpers import (
2020 make_klass ,
@@ -54,11 +54,6 @@ class TaskBase:
5454 _cache_dir = None # Working directory in which to operate
5555 _references = None # List of references for a task
5656
57- # dj: do we need it??
58- input_spec = BaseSpec
59- output_spec = BaseSpec
60-
61- # TODO: write state should be removed
6257 def __init__ (
6358 self ,
6459 name : str ,
@@ -351,7 +346,7 @@ def split(self, splitter, **kwargs):
351346 self .inputs = dc .replace (self .inputs , ** kwargs )
352347 # dj:??, check if I need it
353348 self .state_inputs = kwargs
354- splitter = aux . change_splitter (splitter , self .name )
349+ splitter = hlpst . add_name_splitter (splitter , self .name )
355350 if self .state :
356351 raise Exception ("splitter has been already set" )
357352 else :
@@ -376,7 +371,7 @@ def combine(self, combiner):
376371 def get_input_el (self , ind ):
377372 """collecting all inputs required to run the node (for specific state element)"""
378373 if ind is not None :
379- # TODO: doesnt work properly for more cmplicated wf
374+ # TODO: doesnt work properly for more cmplicated wf (check if still an issue)
380375 state_dict = self .state .states_val [ind ]
381376 input_ind = self .state .inputs_ind [ind ]
382377 inputs_dict = {}
@@ -417,7 +412,7 @@ def done(self):
417412
418413 def _combined_output (self ):
419414 combined_results = []
420- for (gr , ind_l ) in self .state .final_groups_mapping .items ():
415+ for (gr , ind_l ) in self .state .final_combined_ind_mapping .items ():
421416 combined_results .append ([])
422417 for ind in ind_l :
423418 result = load_result (self .checksum_states (ind ), self .cache_locations )
0 commit comments