Skip to content

Commit

Permalink
update for zenodo caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Reep committed Jul 6, 2024
1 parent 91b8c38 commit 3bb6e51
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 18 deletions.
27 changes: 24 additions & 3 deletions Snakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rule figure1:
rule sim_figure1:
output:
directory("src/data/Figure1")
conda:
Expand All @@ -7,7 +7,7 @@ rule figure1:
True
script:
"src/scripts/run_ebtel_figure1.py"
rule figure2:
rule sim_figure2:
output:
directory("src/data/Figure2")
conda:
Expand All @@ -16,7 +16,7 @@ rule figure2:
True
script:
"src/scripts/run_ebtel_figure2.py"
rule figure3:
rule sim_figure3:
output:
directory("src/data/Figure3")
conda:
Expand All @@ -25,3 +25,24 @@ rule figure3:
True
script:
"src/scripts/run_ebtel_figure3.py"
rule plot_figure1:
input:
"src/data/Figure1"
conda:
"environment.yml"
script:
"src/scripts/render_figure1.py"
rule plot_figure2:
input:
"src/data/Figure2"
conda:
"environment.yml"
script:
"src/scripts/render_figure2.py"
rule plot_figure3:
input:
"src/data/Figure3"
conda:
"environment.yml"
script:
"src/scripts/render_figure3.py"
3 changes: 0 additions & 3 deletions src/data/Figure1/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions src/data/Figure2/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions src/data/Figure3/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions src/scripts/render_figure1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
Script to render the data into Figure 1
"""
import os
# import os
import paths
from plot import plot_figures
from read import read_ebtel_file

# Call the script to run the simulations for Figure 1
os.system("python "+ str(paths.scripts / "run_ebtel_figure1.py"))
# os.system("python "+ str(paths.scripts / "run_ebtel_figure1.py"))

# Let's calculate some cases with single heating events first
lengths = ['40']
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/render_figure2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
Script to render the data into Figure 2
"""
import os
#import os
import paths
from plot import plot_figures
from read import read_ebtel_file

# Call the script to run the simulations for Figure 2
os.system("python "+ str(paths.scripts / "run_ebtel_figure2.py"))
#os.system("python "+ str(paths.scripts / "run_ebtel_figure2.py"))

# Let's calculate some cases with single heating events first
lengths = ['80']
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/render_figure3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
Script to render the data into Figure 3
"""
import os
#import os
import paths
from plot import plot_figures
from read import read_ebtel_file

# Call the script to run the simulations for Figure 3
os.system("python "+ str(paths.scripts / "run_ebtel_figure3.py"))
#os.system("python "+ str(paths.scripts / "run_ebtel_figure3.py"))

# Let's calculate a couple of nanoflare trains for comparison
lengths = ['40', '80']
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/run_ebtel_figure1.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import paths
from configure import read_initial_configuration, write_new_configuration

paths.figure1.mkdir(parents=True, exist_ok=True)

initial_lines = read_initial_configuration()

# single heating events
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/run_ebtel_figure2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import paths
from configure import read_initial_configuration, write_new_configuration

paths.figure2.mkdir(parents=True, exist_ok=True)

initial_lines = read_initial_configuration()

# single heating events
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/run_ebtel_figure3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import paths
from configure import read_initial_configuration, write_new_configuration

paths.figure3.mkdir(parents=True, exist_ok=True)

initial_lines = read_initial_configuration()

# nanoflare trains
Expand Down

0 comments on commit 3bb6e51

Please sign in to comment.