Initial GeoIntel V1 foundation
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user