Skip to content

Commit 2f84c75

Browse files
committed
ci: Grab correct source from data repo
1 parent 5592d16 commit 2f84c75

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/examples.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
- name: Checkout devito
3737
uses: actions/checkout@v5
3838

39+
- name: Checkout data
40+
uses: actions/checkout@v5
41+
with:
42+
repository: 'devitocodes/data'
43+
path: 'data'
44+
3945
- name: Setup conda
4046
uses: conda-incubator/setup-miniconda@v3
4147
with:

examples/timestepping/acoustic_superstep.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,14 @@ def acoustic_model(model, t0, t1, t2, critical_dt, source, step=1, snapshots=1):
135135
t2 = 0.5
136136
critical_dt = 0.0013728
137137
zlim = 20
138+
try:
139+
path = f'{os.environ["VIRTUAL_ENV"]}/src'
140+
except KeyError:
141+
path = str(os.environ['GITHUB_WORKSPACE'])
138142
tmp_model = demo_model(
139143
'marmousi-isotropic',
140144
space_order=2,
141-
data_path=f'{os.environ["VIRTUAL_ENV"]}/src/data',
145+
data_path=f'{path}/data',
142146
nbl=0
143147
)
144148
cropped = tmp_model.vp.data[400:701, -321:-20]

0 commit comments

Comments
 (0)