I have the following function which I'm using to run analysis.
When I set run_analysis_1 = True, it should run the whole first piece of analysis, which outputs plots 1, 2 and 3. When I set run_analysis_2 = True, it should run the whole second piece of analysis, which outputs plots 4, 5 and 6.
def save_locally(self,
run_all_analysis: bool = False,
run_analysis_1: bool = False,
run_analysis_2: bool = False):
if run_analysis_1 = True
plot_1 # some function that creates plot 1 + saves to local folder
plot_2 # some function that creates plot 2 + saves to local folder
plot_3 # some function that creates plot 3 + saves to local folder
if run_analysis_2 = True
plot_4 # some function that creates plot 4 + saves to local folder
plot_5 # some function that creates plot 5 + saves to local folder
plot_6 # some function that creates plot 6 + saves to local folder
I would like a lot of flexibility in choosing what plots I would like to run, such that, I am able to:
- Run the whole of a piece of analysis (for example, run all components of analysis 1 to output plots 1,2 and 3)
- Run a part of the analysis (for example, just run plot 1 from analysis 1)
So it looks something like the below...
save_locally(run_analysis_1.plot_1=True, run_analysis_2.all=True)
Is there a way to do this?