stop
cauldron.project.stop()

Stops the execution of the project at the current step immediately without raising an error. Use this to abort running the project in situations where some critical branching action should prevent the project from continuing to run.

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

Background
It can sometimes be useful to stop the running of a project at a specific point within a step 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 project 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
09
import cauldron as cd print('This will appear in the notebook') # Stops the execution of the project immediately. Any other steps that # would run after this one will be aborted as well. cd.project.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
11
import cauldron as cd import pandas as pd df = pd.read_csv('example_data.csv') # Abort the running the project if the source data frame is empty and there's # nothing to process if len(df) == 0: cd.project.stop() cd.shared.df = df