@@ -7,6 +7,12 @@ MEOS_API_PR4 ?= refs/pull/4/head # MEOS-API PR #4 (enrichment)
77MEOS_API_PR13 ?= refs/pull/13/head # MEOS-API PR #13 (OGC MovFeat projection)
88MOBILITYDB_REPO ?= https://github.com/MobilityDB/MobilityDB
99MOBILITYDB_REF ?= master
10+ # The object-model audit reads PyMEOS as its oracle. Without it the audit
11+ # degrades to `oracle-unavailable`, a DIFFERENT artefact from the one a
12+ # checkout with PyMEOS beside it produces, so the drift gate compares two
13+ # shapes and never agrees.
14+ PYMEOS_REPO ?= https://github.com/MobilityDB/PyMEOS
15+ PYMEOS_REF ?= master
1016VENDOR_DIR := vendor/meos-api
1117
1218.PHONY : vendor-meos-api vendor-meos-api-from-prs vendor-meos-api-movfeat
@@ -18,22 +24,28 @@ VENDOR_DIR := vendor/meos-api
1824# 1. clone MEOS-API at the requested ref,
1925# 2. clone MobilityDB at the requested ref so MEOS-API's parser can read its
2026# headers (`meos/include/`),
21- # 3. install libclang,
22- # 4. run `python3 run.py <MobilityDB-headers-path>` to produce output/*.json,
23- # 5. copy the JSON artefacts into $(VENDOR_DIR).
27+ # 3. clone PyMEOS, the oracle the object-model audit reads,
28+ # 4. install libclang,
29+ # 5. run `python3 run.py <MobilityDB-headers-path>` to produce output/*.json,
30+ # 6. copy the JSON artefacts into $(VENDOR_DIR).
2431vendor-meos-api :
2532 @echo " [vendor] regenerating meos-api artefacts from"
2633 @echo " MEOS-API: $( MEOS_API_REPO) @$( MEOS_API_REF) "
2734 @echo " MobilityDB: $( MOBILITYDB_REPO) @$( MOBILITYDB_REF) (headers source)"
35+ @echo " PyMEOS: $( PYMEOS_REPO) @$( PYMEOS_REF) (object-model oracle)"
2836 @mkdir -p $(VENDOR_DIR )
2937 @tmpdir=$$(mktemp -d ) && \
3038 git clone --depth 1 --branch $(MEOS_API_REF ) $(MEOS_API_REPO ) $$ tmpdir/meos-api && \
3139 git clone --depth 1 --branch $(MOBILITYDB_REF ) $(MOBILITYDB_REPO ) $$ tmpdir/mobilitydb && \
40+ git clone --depth 1 --branch $(PYMEOS_REF ) $(PYMEOS_REPO ) $$ tmpdir/PyMEOS && \
3241 cd $$ tmpdir/meos-api && \
3342 pip install --quiet --user -r requirements.txt && \
3443 python3 run.py $$ tmpdir/mobilitydb/meos/include && \
35- if [ -f report.py ]; then python3 report.py $$ tmpdir/mobilitydb/meos/include || true ; fi && \
36- if [ -f object_model_parity.py ]; then python3 object_model_parity.py || true ; fi && \
44+ if [ -f report.py ]; then python3 report.py; fi && \
45+ if [ -f object_model_parity.py ]; then \
46+ python3 object_model_parity.py output/meos-idl.json \
47+ output/meos-object-model-parity.json \
48+ $$ tmpdir/PyMEOS/pymeos/factory.py; fi && \
3749 cp -v output/meos-idl.json $(CURDIR ) /$(VENDOR_DIR ) / && \
3850 ( [ -f output/meos-coverage.json ] && cp -v output/meos-coverage.json $( CURDIR) /$( VENDOR_DIR) / || true ) && \
3951 ( [ -f output/meos-object-model-parity.json ] && cp -v output/meos-object-model-parity.json $( CURDIR) /$( VENDOR_DIR) / || true ) && \
0 commit comments