stop
cauldron.step.stop()

Stops the execution of the current step immediately without raising an error. Use this to abort the step running process if you want to return early.

Arguments
Required
Optional
message

str

A custom display message to include in the display for the stop action. This message is ignored if silent is set to True.

Default Value: 

None

silent

bool

When True nothing will be shown in the notebook display when the step is stopped. When False, the notebook display will include information relating to the stopped action.

Default Value: 

False

halt

bool

Whether or not to keep running other steps in the project after this step has been stopped. By default this is False and after this stops running, future steps in the project will continue running if they've been queued to run. If you want stop execution entirely, set this value to True and the current run command will be aborted entirely.

Default Value: 

False

Background
It can sometimes be useful to stop the running of a step early before all of the code has been executed. The reason may be conditional, or it may be that you want to debug a portion of the step without running the rest of it. Whatever the reason, this is the function to use for such a process.
Basic Usage
01
02
03
04
05
06
07
08
import cauldron as cd print('This will appear in the notebook') # Stops the execution of the step immediately. cd.step.stop() print('This will not appear because it will never run')
The stop function can be useful when used conditionally:
01
02
03
04
05
06
07
08
09
10
import cauldron as cd import pandas as pd df = pd.read_csv('example_data.csv') # Abort the running of this step if the loaded data has less than 10 rows if len(df) < 10: cd.step.stop() cd.display.table(df)