Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea here is to add the option for a stage to test if the input it is supposed to run on actually have the data-structure the stage expects.
The idea is that to any stage you can add a method
validate
that will be run before running the mainrun
method of the stage. The idea is that the user can then write their own validation for each stage. If novalidate
step is done, it should just pass it by, and continue to the execute part.If an error is found in the validation it should raise an error and prevent an attempt to run the full stage and thereby waste lots of time.
An example for use case would be in TXPipe where the stage
TXTwoPoint
requires the use of a NofZ file, this file is only called at the end, and need to be structured in a specific way. The structure is something that has changed, and hence older files might not work, But you won't know until after several hours.