GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
36 lines
765 B
Python
36 lines
765 B
Python
from __future__ import annotations
|
|
|
|
import importlib
|
|
import json
|
|
from typing import Any
|
|
|
|
|
|
REQUIRED_MODULES = ("rasterio", "geopandas", "pyogrio")
|
|
|
|
|
|
def _module_version(module_name: str) -> str | None:
|
|
module = importlib.import_module(module_name)
|
|
version = getattr(module, "__version__", None)
|
|
return str(version) if version is not None else None
|
|
|
|
|
|
def main() -> int:
|
|
versions: dict[str, Any] = {}
|
|
for module_name in REQUIRED_MODULES:
|
|
versions[module_name] = _module_version(module_name)
|
|
|
|
print(
|
|
json.dumps(
|
|
{
|
|
"status": "ok",
|
|
"gis_imports": versions,
|
|
},
|
|
sort_keys=True,
|
|
)
|
|
)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|