Skip to content

Commit 883e95c

Browse files
committed
ci: Attempt to grab correct source
1 parent 5592d16 commit 883e95c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/examples.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ 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+
3944
- name: Setup conda
4045
uses: conda-incubator/setup-miniconda@v3
4146
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 = '.'
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)