stepup.core.stepinfo¶
Information about a step in a StepUp build, intended for defining follow-up steps.
StepInfo
¶
The step()
function returns an instance of this class to help defining follow-up steps.
This object will not contain any information that is amended while the step is executed. It only holds information known at the time the step is defined.
All paths and environment variables are stored in sorted order to ensure consistency.
Source code in stepup/core/stepinfo.py
command = attrs.field(converter=str)
class-attribute
instance-attribute
¶
The command of the step.
env = attrs.field(converter=_convert_to_strs)
class-attribute
instance-attribute
¶
List of environment values used by the step.
inp = attrs.field(converter=_convert_to_paths)
class-attribute
instance-attribute
¶
List of input paths of the step.
If relative, they are relative to the work directory.
out = attrs.field(converter=_convert_to_paths)
class-attribute
instance-attribute
¶
List of output paths of the step.
If relative, they are relative to the work directory.
vol = attrs.field(converter=_convert_to_paths)
class-attribute
instance-attribute
¶
List of volatile output paths of the step.
If relative, they are relative to the work directory.
workdir = attrs.field(converter=Path)
class-attribute
instance-attribute
¶
The work directory of the step.
If relative, it is relative to the StepUp root.
filter_inp(*patterns, **subs)
¶
Return an NGlobMulti
object with matching results from self.inp
.
filter_out(*patterns, **subs)
¶
Return an NGlobMulti
object with matching results from self.out
.
filter_vol(*patterns, **subs)
¶
Return an NGlobMulti
object with matching results from self.vol
.
dump_step_info(filename, step_info)
¶
Dump one or more step info objects to a JSON file.
The file will contain a single JSON object or a JSON array of such objects.
Source code in stepup/core/stepinfo.py
load_step_info(filename)
¶
Load one or more step info object from a JSON file.
The file should contain a single JSON object or a JSON array of such objects.