API

Exported functions and types

Non-exported functions and types

TransformSpecifications._validate_input_assemblerMethod
_validate_input_assembler(dag::NoThrowDAG, input_assembler::TransformSpecification)
_validate_input_assembler(dag::NoThrowDAG, ::Nothing)

Confirm that an input_assembler, when called on all upstream outputs generated by dag, has access to all fields it needs to construct its input.

This validation assumes that the dag being validated against contains only outputs from upstream steps, an assumption that will be true on DAG construction (where this validation is called from). If called at other times, validation may succeed even though the input_assembler will fail when called in situ.

source
TransformSpecifications.convert_specMethod
convert_spec(::Type{T}, input::T) where {T}
convert_spec(::Type{T}, input::T) where {T<:Legolas.AbstractRecord}
convert_spec(spec::Type{<:Legolas.AbstractRecord}, input)
convert_spec(spec, input)

Return input interpreted as type T: is same as identity function if input is already of type T; otherwise, attempts to construct or Base.converts the the output type from the input. Will throw if conversion fails or is otherwise undefined.

See also: transform!

source
TransformSpecifications.field_dictMethod
field_dict(type::Type{<:NoThrowResult})
field_dict(type)

Return a Dict where keys are fieldnames(type) and the value of each key is that field's own type. Constructed by calling field_dict_value on each input field's type.

When type is a NoThrowResult{T}, generate mapping based on unwrapped type T.

To recurse into a specific type MyType, implement

TransformSpecification.field_dict_value(t::Type{MyType}) = field_dict(t)
Warning

Use caution when implementing a field_dict_value for any type that isn't explicitly impossible to lead to recursion, as otherwise a stack overflow may occur.

source