bbp_workflow.luigi¶
Various tools augmenting luigi.
Classes
|
Complete task. |
|
|
|
Optional parameter whose value is a quantity. |
|
Parameter whose value is a quantity. |
|
Parameter whose value is a quantity. |
|
No host key check context. |
|
No host key check target. |
|
Requirement specification. |
|
Composition to replace |
|
Does the same as the base class and ignores permission exception on file cleanup. |
|
Special task inheritance with parameter look-up from parent classes config file sections. |
|
Task inheritance. |
- class bbp_workflow.luigi.Decoder(*, object_pairs_hook=None, parse_constant=None, strict=True)¶
Bases:
JSONDecoder.
- class bbp_workflow.luigi.OptionalQuantityParameter(default=<object object>, is_global=False, significant=True, description=None, config_path=None, positional=True, always_in_help=False, batch_method=None, visibility=ParameterVisibility.PUBLIC)¶
Bases:
QuantityParameterOptional parameter whose value is a quantity.
- normalize(x)¶
Normalize the given value if it is not None.
- parse(x)¶
Parse the given value if it is a string (empty strings are parsed to None).
- serialize(x)¶
Serialize the given value if the value is not None else return an empty string.
- class bbp_workflow.luigi.QuantityDictParameter(*args, schema=None, **kwargs)¶
Bases:
DictParameterParameter whose value is a quantity.
- parse(source)¶
Parse.
- class bbp_workflow.luigi.QuantityParameter(default=<object object>, is_global=False, significant=True, description=None, config_path=None, positional=True, always_in_help=False, batch_method=None, visibility=ParameterVisibility.PUBLIC)¶
Bases:
ParameterParameter whose value is a quantity.
- parse(x)¶
Parse a quantity from the string.
- class bbp_workflow.luigi.RemoteContext(*args, **kwargs)¶
Bases:
RemoteContextNo host key check context.
- class bbp_workflow.luigi.RemoteTarget(*args, **kwargs)¶
Bases:
RemoteTargetNo host key check target.
- class bbp_workflow.luigi.Requirement(task_class, inherit_params=True, **params)¶
Bases:
objectRequirement specification.
- class bbp_workflow.luigi.Requires¶
Bases:
objectComposition to replace
luigi.task.Task.requires().
- class bbp_workflow.luigi.RunAnywayTarget(task_obj)¶
Bases:
RunAnywayTargetDoes the same as the base class and ignores permission exception on file cleanup.
- done(value=None)¶
Create temporary file to mark the task as done.
- get_data()¶
Return the content of the output path.
- class bbp_workflow.luigi.extends(*tasks_to_extend)¶
Bases:
objectSpecial task inheritance with parameter look-up from parent classes config file sections.
Usage:
test.cfg¶[AnotherTask] a: hello [YetAnotherTask] b: world
test.py¶class AnotherTask(luigi.Task): a = luigi.Parameter() class YetAnotherTask(luigi.Task): b = luigi.Parameter() @extends(AnotherTask, YetAnotherTask) class MyTask(luigi.Task): def run(self): print(self.a) # this will be defined print(self.b) # this will be defined # ...
- class bbp_workflow.luigi.inherits(*tasks_to_inherit)¶
Bases:
objectTask inheritance.
New after Luigi 2.7.6: multiple arguments support.
Usage:
class AnotherTask(luigi.Task): m = luigi.IntParameter() class YetAnotherTask(luigi.Task): n = luigi.IntParameter() @inherits(AnotherTask) class MyFirstTask(luigi.Task): def requires(self): return self.clone_parent() def run(self): print(self.m) # this will be defined # ... @inherits(AnotherTask, YetAnotherTask) class MySecondTask(luigi.Task): def requires(self): return self.clone_parents() def run(self): print(self.n) # this will be defined # ...