11set dotenv-load
22
33mod test ' tasks/test'
4- mod chart ' tasks/chart'
54mod docs ' tasks/docs'
65
76# List available commands
@@ -13,6 +12,18 @@ default:
1312help :
1413 just --justfile {{ justfile ()}} --list
1514
15+ # Prep module from https://github.com/hotosm/justfiles
16+ prep * args :
17+ @ curl -sS https:// raw.githubusercontent.com/ hotosm/ justfiles/ main/ prep.just \
18+ - o {{ justfile_directory ()}} / tasks/ prep.just;
19+ @ just --justfile {{ justfile_directory ()}} / tasks/ prep.just {{ args}}
20+
21+ # Chart module from https://github.com/hotosm/justfiles
22+ chart * args :
23+ @ curl -sS https:// raw.githubusercontent.com/ hotosm/ justfiles/ main/ chart.just \
24+ - o {{ justfile_directory ()}} / tasks/ chart.just;
25+ @ just --justfile {{ justfile_directory ()}} / tasks/ chart.just --set chart_name " scaleodm" {{ args}}
26+
1627# Install curl if missing
1728[private ]
1829_ install-curl :
@@ -191,6 +202,37 @@ example-python:
191202 echo " Shutting down containers..."
192203 docker compose down --remove-orphans
193204
205+ # Example the API usage via pyodm SDK
206+ example-pyodm :
207+ #!/usr/bin/env bash
208+ set -euo pipefail
209+
210+ just test cluster-available
211+
212+ echo " Starting API..."
213+ docker compose up --wait --detach api
214+
215+ echo " Running pyodm example inside container..."
216+ docker run --rm \
217+ - -network host \
218+ - -env -file .env \
219+ - v " $PWD/examples/pyodm:/app" \
220+ - -workdir / app \
221+ - e PYTHONDONTWRITEBYTECODE=1 \
222+ - e PYTHONUNBUFFERED=1 \
223+ - e PYTHONFAULTHANDLER=1 \
224+ docker.io/ python:3.13 -slim-trixie \
225+ bash -lc '
226+ set -euo pipefail
227+ python -V
228+ pip install --no-cache-dir uv
229+ uv sync
230+ uv run python main.py
231+ '
232+
233+ echo " Shutting down containers..."
234+ docker compose down --remove-orphans
235+
194236# Echo to terminal with blue colour
195237[no-cd ]
196238_ echo-blue text :
0 commit comments