Skip to content

Commit 3117803

Browse files
committed
exercise for MTC
1 parent 25597b9 commit 3117803

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.exercises/mtc/run_mtc.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
# This script runs the MTC example model with sharrow, mirroring the GitHub Actions workflow.
6+
7+
cd $(dirname "$0")
8+
9+
for repo in "driftlesslabs/activitysim" "ActivitySim/activitysim-prototype-mtc"; do
10+
dir=$(basename "$repo")
11+
if [ ! -d "$dir" ] || [ -z "$(ls -A "$dir" 2>/dev/null)" ]; then
12+
gh repo clone "$repo" -- --depth 1
13+
else
14+
git -C "$dir" pull --ff-only || git -C "$dir" pull
15+
fi
16+
done
17+
18+
uv venv
19+
source .venv/bin/activate
20+
uv pip install -e ../.. # install sharrow in editable mode
21+
uv pip install ./activitysim
22+
uv pip install pytest nbmake
23+
24+
cd activitysim-prototype-mtc
25+
python -m pytest ./test

0 commit comments

Comments
 (0)