def __init__(self, system, method=DEFAULT, identifier=DEFAULT, inputs=tuple(), path=DEFAULT, shorthand=DEFAULT, parameters=DEFAULT, ): self.__system = system is_relaxed = hasattr(self.system(), 'mainTask') if method is DEFAULT: if hasattr(system, 'method'): method = system.method() if parameters is DEFAULT: parameters = system.parameters() else: sub_folder = True self.__parameters = parameters if identifier is DEFAULT: identifier = parameters.identifier() inputs = list(inputs) if isinstance(system, HasInputs): inputs.extend(self.system().tasks()) if path is DEFAULT: if parameters != self.system().parameters(): path = system.mainTask().runDirectory() if shorthand is DEFAULT: shorthand = 'Analysis' else: path = system.path() shorthand = system.mainTask().shorthand() if shorthand is DEFAULT: if is_relaxed: shorthand = self.system().mainTask().shorthand() else: shorthand = 'Analysis' Task.__init__( self, shorthand=shorthand, method=method, inputs=inputs, path=path, identifier=identifier, )
def __init__(self, system, method, path=DEFAULT, host=DEFAULT, submit_type=DEFAULT, ): Task.__init__( self, method=method, path=path, host=host, submit_type=submit_type, ) self.__system = system
def __init__( self, item, shorthand, ): identifier = item.parameters().identifier() Task.__init__( self, path=item.path(), shorthand=shorthand, identifier=identifier, inputs=item.inputs(), ) self.__system = item